From 0e230f1beb02b3c24dfa854b45d43e298e2b1b16 Mon Sep 17 00:00:00 2001 From: Holger Hans Peter Freyther Date: Fri, 17 Mar 2006 23:29:43 +0000 Subject: [PATCH] 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 --- bin/bitdoc | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) diff --git a/bin/bitdoc b/bin/bitdoc index 7c0c9561..ae2a23ce 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 """ - - + + """ @@ -89,10 +89,11 @@ class HTMLFormatter: return "" txt = "

See also:
" + txts = [] for it in item.related(): - txt += """%s, """ % (it, it) + txts.append("""%(it)s""" % vars() ) - return txt + return txt + ",".join(txts) def groups(self,item): """ @@ -103,11 +104,12 @@ class HTMLFormatter: return "" - txt = "

Seel also:
" + txt = "

See also:
" + txts = [] for group in item.groups(): - txt += """%s, """ % (group,group) + txts.append( """%s """ % (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 += """%s
""" % (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 -- 2.20.1