\n") outfile.write("\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*'), ("tizen", "", '$%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=categorize(reverse, i) if "ready" in reverse[i] or "pending" in reverse[i]: done.append(out) out='
%s' % out else: pending.append(out) outfile.write(out+"\n") print "done=%s" % len(done) outfile.write("
\n" % "\n".join(pending)) outfile.write("%s
\n" % "\n".join(done)) outfile.write("%s
\n")" % (i,i,k)) outfile.write(" ".join(todo)) outfile.write("