aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2012-07-21 00:29:27 -0500
committerRob Landley <rob@landley.net>2012-07-21 00:29:27 -0500
commit37aa821e7bdeb135894ae7ba5a775557c3f6c2d1 (patch)
tree7b0e88d2a66e2f3bf486c6912b5493a388c21b08 /scripts
parentfe8c07e8db55ff31b5f85fcbbba474e06525c50d (diff)
downloadtoybox-37aa821e7bdeb135894ae7ba5a775557c3f6c2d1.tar.gz
Add status.html and script to calculate it from roadmap info.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/mkstatus.py47
1 files changed, 47 insertions, 0 deletions
diff --git a/scripts/mkstatus.py b/scripts/mkstatus.py
new file mode 100755
index 00000000..a50026c5
--- /dev/null
+++ b/scripts/mkstatus.py
@@ -0,0 +1,47 @@
+#!/usr/bin/python
+
+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:]
+
+reverse={}
+for i in stuff:
+ for j in stuff[i]:
+ try:
+ reverse[j].append(i)
+ except:
+ reverse[j]=[i]
+
+pending=[]
+done=[]
+
+outfile=open("www/status.gen", "w")
+outfile.write("<h2>All commands</h2><blockquote><p>\n")
+
+blah=list(reverse)
+blah.sort()
+for i in blah:
+ out=i
+ if "posix" in reverse[i]: out='[<a href="http://opengroup.org/onlinepubs/9699919799/utilities/%s.html">%s</a>]' % (i,out)
+ elif "lsb" in reverse[i]: out='&lt;<a href="http://refspecs.linuxfoundation.org/LSB_4.1.0/LSB-Core-generic/LSB-Core-generic/%s.html">%s</a>&gt;' % (i,out)
+ elif "development" in reverse[i]: out='(<a href="http://linux.die.net/man/1/%s">%s</a>)' % (i,out)
+ elif "toolbox" in reverse[i]: out='{%s}' % out
+ elif "ready" in reverse[i]: pass
+ else: sys.stderr.write("unknown %s %s\n" % (i, reverse[i]))
+
+ if "ready" in reverse[i] or "pending" in reverse[i]:
+ out='<strike>%s</strike>' % out
+ done.append(out)
+ else: pending.append(out)
+
+ outfile.write(out+"\n")
+
+outfile.write("</p></blockquote>\n")
+
+outfile.write("<h2>TODO</h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(pending))
+outfile.write("<h2>Done</h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(done))