diff options
author | Rob Landley <rob@landley.net> | 2012-12-23 00:37:42 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2012-12-23 00:37:42 -0600 |
commit | 7a78d92da70d24947fa9e828a960658ea32b74e7 (patch) | |
tree | f9965b54c26152b44f8ae09f9defedf4bf44404e /scripts/mkstatus.py | |
parent | 7d01b3180735273710d63bd58b90748f4ecf21da (diff) | |
download | toybox-7a78d92da70d24947fa9e828a960658ea32b74e7.tar.gz |
Update mkstatus.py, roadmap.html, and status.html.
Diffstat (limited to 'scripts/mkstatus.py')
-rwxr-xr-x | scripts/mkstatus.py | 32 |
1 files changed, 21 insertions, 11 deletions
diff --git a/scripts/mkstatus.py b/scripts/mkstatus.py index 6c24d1a1..51adc2cd 100755 --- a/scripts/mkstatus.py +++ b/scripts/mkstatus.py @@ -2,22 +2,32 @@ import subprocess,sys -stuff={} -blob=subprocess.Popen(["sed","-n", 's/<span id=\\([a-z_]*\\)>/\\1 /;t good;d;:good;h;:loop;n;s@</span>@@;t out;H;b loop;:out;g;s/\\n/ /g;p', "www/roadmap.html", "www/status.html"], stdout=subprocess.PIPE, shell=False) -for i in blob.stdout.read().split("\n"): - if not i: continue - i=i.split() - stuff[i[0]]=i[1:] +def readit(args): + ret={} + arr=[] + blob=subprocess.Popen(args, stdout=subprocess.PIPE, shell=False) + for i in blob.stdout.read().split("\n"): + if not i: continue + i=i.split() + ret[i[0]]=i[1:] + arr.extend(i) + return ret,arr -stuff['toolbox'] +stuff,blah=readit(["sed","-n", 's/<span id=\\([a-z_]*\\)>/\\1 /;t good;d;:good;h;:loop;n;s@</span>@@;t out;H;b loop;:out;g;s/\\n/ /g;p', "www/roadmap.html", "www/status.html"]) + +blah,toystuff=readit(["./toybox"]) reverse={} for i in stuff: for j in stuff[i]: - try: - reverse[j].append(i) - except: - reverse[j]=[i] + try: reverse[j].append(i) + except: reverse[j]=[i] + +for i in toystuff: + try: + if ("ready" in reverse[i]) or ("pending" in reverse[i]): continue + except: pass + print i pending=[] done=[] |