diff options
author | Richard Purdie <richard@openedhand.com> | 2006-03-20 17:45:11 +0000 |
---|---|---|
committer | Richard Purdie <richard@openedhand.com> | 2006-03-20 17:45:11 +0000 |
commit | b26a945734ce271aa7d443ff9e96fe2851b21138 (patch) | |
tree | f540b8d58a7411cf0cabe5c8f4ad40f9f597352a /bitbake/bin/bitdoc | |
parent | 3cd47ad235d54a9c539ae6fe4a5a2b4b5f7e5621 (diff) | |
download | openembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.gz openembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.tar.bz2 openembedded-core-b26a945734ce271aa7d443ff9e96fe2851b21138.zip |
Update to latest bitbake
git-svn-id: https://svn.o-hand.com/repos/poky/trunk@309 311d38ba-8fff-0310-9ca6-ca027cbcb966
Diffstat (limited to 'bitbake/bin/bitdoc')
-rwxr-xr-x | bitbake/bin/bitdoc | 55 |
1 files changed, 33 insertions, 22 deletions
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 """<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): @@ -125,23 +127,23 @@ class HTMLFormatter: <div class="refsynopsisdiv"> <h2>Synopsis</h2> -<pre class="synopsis"> +<p> %s -</pre> +</p> </div> <div class="refsynopsisdiv"> <h2>Related Keys</h2> -<pre class="synopsis"> +<p> %s -</pre> +</p> </div> <div class="refsynopsisdiv"> <h2>Groups</h2> -<pre class="synopsis"> +<p> %s -</pre> +</p> </div> @@ -181,8 +183,8 @@ class HTMLFormatter: <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> %s <h2>Documentation Entrance</h2> -<a href="groups.html">All available groups</a><br> -<a href="keys.html">All available keys</a><br> +<a href="all_groups.html">All available groups</a><br> +<a href="all_keys.html">All available keys</a><br> </body> """ % self.createNavigator() @@ -206,13 +208,21 @@ class HTMLFormatter: </body> """ % (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 += "<h2 Description of Grozp %s</h2>" % gr + description += _description + + items.sort(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()) @@ -221,6 +231,7 @@ class HTMLFormatter: <link rel="stylesheet" href="style.css" type="text/css"> <body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"> %s +%s <div class="refsynopsisdiv"> <h2>Keys in Group %s</h2> <pre class="synopsis"> @@ -228,7 +239,7 @@ class HTMLFormatter: </pre> </div> </body> -""" % (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 |