diff options
author | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-03-17 23:29:43 +0000 |
---|---|---|
committer | Holger Hans Peter Freyther <zecke@selfish.org> | 2006-03-17 23:29:43 +0000 |
commit | 0e230f1beb02b3c24dfa854b45d43e298e2b1b16 (patch) | |
tree | a117b245c34915482d7cb2994dbd202b6cd3ca0d /bin | |
parent | e18c4858e5be51560cbba5d6f81a2d7c0ca5a3f7 (diff) | |
download | bitbake-0e230f1beb02b3c24dfa854b45d43e298e2b1b16.tar.gz |
bitbake/bitdoc:
-Work on case insensitive filesystems where keys.html == keyS.html
-Create all_groups.html and all_keys site
-Sort the keys in a group
-Emit the ',' only when needed
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/bitdoc | 26 |
1 files changed, 15 insertions, 11 deletions
diff --git a/bin/bitdoc b/bin/bitdoc index 7c0c95615..ae2a23ce3 100755 --- a/bin/bitdoc +++ b/bin/bitdoc @@ -45,8 +45,8 @@ class HTMLFormatter: one site for each key with links to the relations and groups. index.html - keys.html - groups.html + all_keys.html + all_groups.html groupNAME.html keyNAME.html """ @@ -75,8 +75,8 @@ class HTMLFormatter: return """<table class="navigation" width="100%" summary="Navigation header" cellpadding="2" cellspacing="2"> <tr valign="middle"> <td><a accesskey="g" href="index.html">Home</a></td> -<td><a accesskey="n" href="groups.html">Groups</a></td> -<td><a accesskey="u" href="keys.html">Keys</a></td> +<td><a accesskey="n" href="all_groups.html">Groups</a></td> +<td><a accesskey="u" href="all_keys.html">Keys</a></td> </tr></table> """ @@ -89,10 +89,11 @@ class HTMLFormatter: return "" txt = "<p><b>See also:</b><br>" + txts = [] for it in item.related(): - txt += """<a href="key%s.html">%s</a>, """ % (it, it) + txts.append("""<a href="key%(it)s.html">%(it)s</a>""" % vars() ) - return txt + return txt + ",".join(txts) def groups(self,item): """ @@ -103,11 +104,12 @@ class HTMLFormatter: return "" - txt = "<p><b>Seel also:</b><br>" + txt = "<p><b>See also:</b><br>" + txts = [] for group in item.groups(): - txt += """<a href="group%s.html">%s</a>, """ % (group,group) + txts.append( """<a href="group%s.html">%s</a> """ % (group,group) ) - return txt + return txt + ",".join(txts) def createKeySite(self,item): @@ -213,6 +215,8 @@ class HTMLFormatter: inside this group """ groups = "" + + items.sort(cmp=lambda x,y:cmp(x.name(),y.name())) for group in items: groups += """<a href="key%s.html">%s</a><br>""" % (group.name(), group.name()) @@ -508,10 +512,10 @@ def main(): f = file('index.html', 'w') print >> f, html_slave.createIndex() - f = file('groups.html', 'w') + f = file('all_groups.html', 'w') print >> f, html_slave.createGroupsSite(doc) - f = file('keys.html', 'w') + f = file('all_keys.html', 'w') print >> f, html_slave.createKeysSite(doc) # now for each group create the site |