annotate scripts/mkstatus.py @ 678:ae3455c2989b

Update roadmap/status with new toolbox analysis based on android system/core git repo.
author Rob Landley <rob@landley.net>
date Tue, 16 Oct 2012 17:09:30 -0500
parents 3c591e7a367d
children 76e7bf56b2e6
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
635
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
1 #!/usr/bin/python
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
2
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
3 import subprocess,sys
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
4
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
5 stuff={}
639
3c591e7a367d More web page roadmap/status update stuff.
Rob Landley <rob@landley.net>
parents: 635
diff changeset
6 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)
635
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
7 for i in blob.stdout.read().split("\n"):
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
8 if not i: continue
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
9 i=i.split()
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
10 stuff[i[0]]=i[1:]
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
11
678
ae3455c2989b Update roadmap/status with new toolbox analysis based on android system/core git repo.
Rob Landley <rob@landley.net>
parents: 639
diff changeset
12 stuff['toolbox']
639
3c591e7a367d More web page roadmap/status update stuff.
Rob Landley <rob@landley.net>
parents: 635
diff changeset
13
635
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
14 reverse={}
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
15 for i in stuff:
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
16 for j in stuff[i]:
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
17 try:
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
18 reverse[j].append(i)
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
19 except:
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
20 reverse[j]=[i]
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
21
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
22 pending=[]
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
23 done=[]
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
24
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
25 outfile=open("www/status.gen", "w")
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
26 outfile.write("<h2>All commands</h2><blockquote><p>\n")
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
27
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
28 blah=list(reverse)
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
29 blah.sort()
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
30 for i in blah:
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
31 out=i
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
32 if "posix" in reverse[i]: out='[<a href="http://opengroup.org/onlinepubs/9699919799/utilities/%s.html">%s</a>]' % (i,out)
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
33 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)
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
34 elif "development" in reverse[i]: out='(<a href="http://linux.die.net/man/1/%s">%s</a>)' % (i,out)
639
3c591e7a367d More web page roadmap/status update stuff.
Rob Landley <rob@landley.net>
parents: 635
diff changeset
35 elif "request" in reverse[i]: out='<a href="http://linux.die.net/man/1/%s">%s</a>' % (i,out)
635
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
36 elif "toolbox" in reverse[i]: out='{%s}' % out
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
37 elif "ready" in reverse[i]: pass
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
38 else: sys.stderr.write("unknown %s %s\n" % (i, reverse[i]))
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
39
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
40 if "ready" in reverse[i] or "pending" in reverse[i]:
639
3c591e7a367d More web page roadmap/status update stuff.
Rob Landley <rob@landley.net>
parents: 635
diff changeset
41 done.append(out)
635
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
42 out='<strike>%s</strike>' % out
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
43 else: pending.append(out)
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
44
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
45 outfile.write(out+"\n")
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
46
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
47 outfile.write("</p></blockquote>\n")
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
48
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
49 outfile.write("<h2>TODO</h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(pending))
cffb9b7f1c60 Add status.html and script to calculate it from roadmap info.
Rob Landley <rob@landley.net>
parents:
diff changeset
50 outfile.write("<h2>Done</h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(done))