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
"""
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>
"""
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):
"""
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):
<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>
<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()
</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())
<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">
</pre>
</div>
</body>
-""" % (gr, self.createNavigator(), gr, groups)
+""" % (gr, self.createNavigator(), description, gr, groups)
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