# HG changeset patch # User Rob Landley # Date 1378038337 18000 # Node ID 6b4529a50b72083e159fcd6c94fd0cbb345637ef # Parent 54c9d4a0d46ee33574c490c7970c3fb47c62331e Update status and roadmap pages, and status page generator script. diff -r 54c9d4a0d46e -r 6b4529a50b72 scripts/mkstatus.py --- a/scripts/mkstatus.py Sat Aug 31 12:30:41 2013 +0200 +++ b/scripts/mkstatus.py Sun Sep 01 07:25:37 2013 -0500 @@ -15,10 +15,14 @@ arr.extend(i) return ret,arr -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"]) +# Run sed on roadmap and status pages to get command lists, and run toybox too +# This gives us a dictionary of types, each with a list of commands +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"]) +# Create reverse mappings: command is in which + reverse={} for i in stuff: for j in stuff[i]: @@ -39,21 +43,36 @@ outfile=open("www/status.gen", "w") outfile.write("

All commands

\n") +conv = [("posix", '%%s', "[%s]"), + ("lsb", '%%s', '<%s>'), + ("development", '%%s', '(%s)'), + ("toolbox", "", '{%s}'), ("klibc_cmd", "", '=%s='), + ("sash_cmd", "", '#%s#'), ("sbase_cmd", "", '@%s@'), + ("beastiebox_cmd", "", '*%s*'), + ("request", '%%s', '+%s+')] + + +def categorize(reverse, i, skippy=""): + linky = "%s" + out = i + + if skippy: types = filter(lambda a: a != skippy, reverse[i]) + else: types = reverse[i] + + for j in conv: + if j[0] in types: + if j[1]: linky = j[1] % i + out = j[2] % out + if not skippy: break + if (not skippy) and out == i: + sys.stderr.write("unknown %s %s\n" % (i,reverse[i])) + + return linky % out + blah=list(reverse) blah.sort() for i in blah: - out=i - if "posix" in reverse[i]: out='[%s]' % (i,out) - elif "lsb" in reverse[i]: out='<%s>' % (i,out) - elif "development" in reverse[i]: out='(%s)' % (i,out) - elif "toolbox" in reverse[i]: out='{%s}' % out - elif "klibc_cmd" in reverse[i]: out='=%s=' % out - elif "sash_cmd" in reverse[i]: out='#%s#' % out - elif "sbase_cmd" in reverse[i]: out='@%s@' % out - elif "beastiebox_cmd" in reverse[i]: out='*%s*' % out - elif "request" in reverse[i]: out='+%s+' % (i,out) - elif "ready" in reverse[i]: pass - else: sys.stderr.write("unknown %s %s\n" % (i, reverse[i])) + out=categorize(reverse, i) if "ready" in reverse[i] or "pending" in reverse[i]: done.append(out) out='%s' % out @@ -66,3 +85,22 @@ outfile.write("

TODO

%s

\n" % "\n".join(pending)) outfile.write("

Done

%s

\n" % "\n".join(done)) + +outfile.write("

Categories of remaining todo items

") + +for i in stuff: + todo = [] + + for j in stuff[i]: + if "ready" in reverse[j]: continue + else: todo.append(categorize(reverse,j,i)) + + if todo: + k = i + for j in conv: + if j[0] == i: + k = j[2] % i + + outfile.write("

%s

" % (i,i,k)) + outfile.write(" ".join(todo)) + outfile.write("

\n") diff -r 54c9d4a0d46e -r 6b4529a50b72 www/roadmap.html --- a/www/roadmap.html Sat Aug 31 12:30:41 2013 +0200 +++ b/www/roadmap.html Sun Sep 01 07:25:37 2013 -0500 @@ -399,7 +399,7 @@

So the list of things actually in klibc are:

- + cat chroot dmesg false kill ln losetup ls mkdir mkfifo readlink rm switch_root sleep sync true uname @@ -463,7 +463,7 @@ implemented:

- + basename cat chmod chown cksum cmp cp date dirname echo false fold grep head kill ln ls mc mkdir mkfifo mv nl nohup pwd rm seq sleep sort tail tee test touch true tty uname uniq wc yes @@ -473,7 +473,7 @@

And has a TODO list:

- + cal chgrp chvt comm cut df diff du env expand expr id md5sum nice paste printenv printf readlink rmdir seq sha1sum split sync test tr unexpand unlink who diff -r 54c9d4a0d46e -r 6b4529a50b72 www/status.html --- a/www/status.html Sat Aug 31 12:30:41 2013 +0200 +++ b/www/status.html Sun Sep 01 07:25:37 2013 -0500 @@ -8,16 +8,17 @@ -

The current status of toybox (as of 0.4.1 release):

+

The current status of toybox (as of 0.4.5 release):

These commands are reasonably finished:

basename cal cat catv chgrp chmod chown chvt cksum clear cmp comm count cp -df dirname dmesg dos2unix echo env false gethostname groups killall link logname -losetup ls lsmod md5sum mkdir mkfifo mkswap mktemp mv nice nohup od oneit -pivot_root pwd readahead realpath rev rm seq setsid sha1sum sleep sort split -stat swapoff swapon sync tac taskset tee time true truncate tty uniq unix2dos +df dirname dmesg dos2unix echo egrep env false fgrep gethostname grep groups +killall link logname losetup ls lsmod md5sum mkdir mkfifo mkswap mktemp mv +nice nohup od oneit paste pivot_root pmap pwd readahead realpath renice rev +rm seq setsid sha1sum sleep sort split stat swapoff swapon sync tac taskset +tee time timeout true truncate tty uniq unix2dos unlink usleep uudecode uuencode wc which whoami yes