From b26a945734ce271aa7d443ff9e96fe2851b21138 Mon Sep 17 00:00:00 2001 From: Richard Purdie Date: Mon, 20 Mar 2006 17:45:11 +0000 Subject: Update to latest bitbake git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966 --- bitbake/bin/bitdoc | 55 ++++++++++++++++++++++++++++++++---------------------- 1 file changed, 33 insertions(+), 22 deletions(-) (limited to 'bitbake/bin/bitdoc') diff --git a/bitbake/bin/bitdoc b/bitbake/bin/bitdoc index 64d32945ba..84d2ee23ce 100755 --- a/bitbake/bin/bitdoc +++ b/bitbake/bin/bitdoc @@ -30,7 +30,7 @@ import optparse, os, sys # bitbake sys.path.append(os.path.join(os.path.dirname(os.path.dirname(sys.argv[0])), 'lib')) import bb -from bb import make +import bb.parse from string import split, join __version__ = "0.0.2" @@ -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): @@ -125,23 +127,23 @@ class HTMLFormatter:

Synopsis

-
+

%s -

+

Related Keys

-
+

%s -

+

Groups

-
+

%s -

+

@@ -181,8 +183,8 @@ class HTMLFormatter: %s

Documentation Entrance

-All available groups
-All available keys
+All available groups
+All available keys
""" % self.createNavigator() @@ -206,13 +208,21 @@ class HTMLFormatter: """ % (self.createNavigator(), keys) - def createGroupSite(self,gr, items): + def createGroupSite(self, gr, items, _description = None): """ Create a site for a group: Group the name of the group, items contain the name of the keys inside this group """ groups = "" + description = "" + + # create a section with the group descriptions + if _description: + description += "

" % gr + description += _description + + items.sort(lambda x,y:cmp(x.name(),y.name())) for group in items: groups += """%s
""" % (group.name(), group.name()) @@ -221,6 +231,7 @@ class HTMLFormatter: %s +%s

Keys in Group %s

@@ -228,7 +239,7 @@ class HTMLFormatter:
 
-""" % (gr, self.createNavigator(), gr, groups) +""" % (gr, self.createNavigator(), description, gr, groups) @@ -508,10 +519,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 -- cgit v1.2.3