root/stuff/sandbox/sourceforge/status.py
| Revision 192 (by effbot, 04/02/06 17:40:20) |
|---|
# $Id$ # dataset summary import glob, os, re full = 0 for tracker in glob.glob("tracker-*"): if not os.path.isdir(tracker): continue print tracker ni = np = nf = 0 if not full: for file in os.listdir(tracker): if re.match("item-\d+\.xml$", file): ni += 1 elif re.match("item-\d+-page\.xml$", file): np += 1 elif re.match("item-\d+-data-\d+\.dat$", file): nf += 1 else: pass # print file, "?" print " ", ni, "items" print " ", np, "pages", "(%d%%)" % (100 * np / ni) print " ", nf, "files" else: pass # full status to be added
Note: See TracBrowser for help on using the browser.
