Redo to grep pending for pending data and trust toybox
defconfig output for ready command list, to reduce manual updating.
diff --git a/scripts/ b/scripts/
index 82592c7..3b1bbc8 100755
--- a/scripts/
+++ b/scripts/
@@ -4,10 +4,10 @@
 import subprocess,sys
-def readit(args):
+def readit(args, shell=False):
-  blob=subprocess.Popen(args, stdout=subprocess.PIPE, shell=False)
+  blob=subprocess.Popen(args, stdout=subprocess.PIPE, shell=shell)
   for i in"\n"):
     if not i: continue
@@ -15,36 +15,37 @@
   return ret,arr
-# Run sed on roadmap and status pages to get command lists, and run toybox too
+# Run sed on roadmap and source to get command lists, and run toybox too
 # This gives us a dictionary of types, each with a list of commands
+print "Collecting data..."
 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,pending=readit(["sed -n 's/[^ \\t].*TOY(\\([^,]*\\),.*/\\1/p' toys/pending/*.c"], 1)
-# Create reverse mappings: command is in which
+print "Analyzing..."
+# Create reverse mappings: reverse["command"] gives list of categories it's in
 for i in stuff:
   for j in stuff[i]:
     try: reverse[j].append(i)
     except: reverse[j]=[i]
-for i in toystuff:
-  try:
-    if ("ready" in reverse[i]) and ("pending" in reverse[i]): print "barf", i
-  except: pass
-  try:
-    if ("ready" in reverse[i]) or ("pending" in reverse[i]): continue
-  except: pass
-  print "Not ready or pending:", i
 print "all commands=%s" % len(reverse)
-outfile=open("www/status.gen", "w")
-outfile.write("<a name=all><h2><a href=#all>All commands</a></h2><blockquote><p>\n")
+# Run a couple sanity checks on input
+for i in toystuff:
+  if (i in pending): print "barf %s" % i
+for i in toystuff + pending:
+  if not i in reverse: unknowns.append(i)
+if unknowns: print "uncategorized: %s" % " ".join(unknowns)
 conv = [("posix", '<a href="">%%s</a>', "[%s]"),
         ("lsb", '<a href="">%%s</a>', '&lt;%s&gt;'),
@@ -72,22 +73,38 @@
   return linky % out
+# Sort/annotate done, pending, and todo item lists
 for i in blah:
   out=categorize(reverse, i)
-  if "ready" in reverse[i] or "pending" in reverse[i]:
-    done.append(out)
+  allcmd.append(out)
+  if i in toystuff or i in pending:
+    if i in toystuff: done.append(out)
+    else: pend.append(out)
     out='<strike>%s</strike>' % out
-  else: pending.append(out)
+  else: todo.append(out)
-  outfile.write(out+"\n")
+print "implemented=%s" % len(toystuff)
-print "done=%s" % len(done)
+# Write data to output file
-outfile.write("<a name=todo><h2><a href=#todo>TODO</a></h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(pending))
-outfile.write("<a name=done><h2><a href=#done>Done</a></h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(done))
+outfile=open("www/status.gen", "w")
+outfile.write("<h1>Status of toybox %s</h1>\n" % version[0]);
+outfile.write("<h3>Legend: [posix] &lt;lsb&gt; (development) {android}\n")
+outfile.write("=klibc= #sash# @sbase@ *beastiebox* $tizen$ +request+ other\n")
+outfile.write("<a name=done><h2><a href=#done>Completed</a></h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(done))
+outfile.write("<a name=part><h2><a href=#part>Partially implemented</a></h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(pend))
+outfile.write("<a name=todo><h2><a href=#todo>Not started yet</a></h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(todo))
+# Output unfinished commands by category
 outfile.write("<hr><h2>Categories of remaining todo items</h2>")
@@ -95,8 +112,8 @@
   todo = []
   for j in stuff[i]:
-    if "ready" in reverse[j]: continue
-    elif "pending" in reverse[j]: todo.append('<strike>%s</strike>' % j)
+    if j in toystuff: continue
+    if j in pending: todo.append('<strike>%s</strike>' % j)
     else: todo.append(categorize(reverse,j,i))
   if todo:
@@ -108,3 +125,5 @@
     outfile.write("<a name=%s><h2><a href=#%s>%s<a></h2><blockquote><p>" % (i,i,k))
     outfile.write(" ".join(todo))
+outfile.write("<hr><a name=all><h2><a href=#all>All commands together in one big list</a></h2><blockquote><p>%s</p></blockquote>\n" % "\n".join(allcmd))
diff --git a/www/status.html b/www/status.html
index bb0c7ad..8d50080 100755
--- a/www/status.html
+++ b/www/status.html
@@ -2,56 +2,8 @@
 <!--#include file="header.html" -->
 <title>Toybox Status</title>
-<h1>How are we doing on implementing stuff so far?</h1>
-<p>Legend: [posix] &lt;lsb&gt; (development) {android} =klibc= #sash# @sbase@
-*beastiebox* $tizen$ +request+ other <strike>implemented</strike></p>
 <!--#include file="status.gen" -->
-<h1>The current status of toybox (as of 0.5.2 release):</h1>
-<h3><u>These commands are reasonably finished (in defconfig)</u>:</h3>
-<span id=ready>
-acpi basename blkid blockdev bzcat cal cat catv chattr chgrp chmod
-chown chvt cksum clear cmp comm count cp cpio date df dirname
-dmesg dos2unix echo egrep eject env factor fallocate false
-fgrep find free freeramdisk fsfreeze fstype grep groups halt head
-help hostname id ifconfig inotifyd insmod install kill killall killall5
-link ln logname losetup ls lsattr lsmod lspci lsusb makedevs
-md5sum mkdir mkfifo mknod mkpasswd mkswap mktemp mount
-mv nbd-client nc netcat nice nl nohup od oneit partprobe passwd paste
-patch pidof pivot_root pmap poweroff printenv pwd pwdx readahead readlink
-realpath reboot renice rev rfkill rm rmdir rmmod seq setsid sha1sum
-sleep sort split stat strings su swapoff swapon switch_root sync sysctl
-tac tail taskset tee time timeout true truncate tty umount uname
-uniq unix2dos unlink unshare uptime usleep uudecode uuencode
-w wc which who whoami yes sed mix base64
-<h3><u>These commands are at least partially implemented (in toys/pending)
-but have todo items remaining:</u></h3>
-<span id=pending>
-ar arp arping bc bootchartd brctl compress crond dhcp dhcpd diff dumpleases
-expr fdisk fold fsck ftpget getty groupadd groupdel host iconv init ip ipcs
-kexec klogd last logger mdev mix mke2fs modprobe more netstat openvt p9d pgrep
-ping printf ps reset route sh sulogin syslogd tar tcpsvd telnet telnetd test
-tftpd top traceroute tr useradd userdel watch xzcat
-<h3><u>These commands predate the pending directory but also have unfinished
-todo items:</u></h3>
-<span id=pending>
-vmstat login du vconfig mountpoint chroot cut touch modinfo expand xargs
 <p>There is also <a href="todo.txt">a todo list</a>, but development's moved
 on a bit since it was written.</p>