From 7a78d92da70d24947fa9e828a960658ea32b74e7 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Sun, 23 Dec 2012 00:37:42 -0600 Subject: Update mkstatus.py, roadmap.html, and status.html. --- scripts/mkstatus.py | 32 +++++++++++++++++++++----------- 1 file changed, 21 insertions(+), 11 deletions(-) (limited to 'scripts') 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//\\1 /;t good;d;:good;h;:loop;n;s@@@;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//\\1 /;t good;d;:good;h;:loop;n;s@@@;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=[] -- cgit v1.2.3