diff --git a/tools/generate-plugin-documentation.py b/tools/generate-plugin-documentation.py index 4a2efcdbb..d861cdb11 100755 --- a/tools/generate-plugin-documentation.py +++ b/tools/generate-plugin-documentation.py @@ -93,6 +93,7 @@ def prepIndex(): %s
Supybot Plugin Documentation Index

+
''' % genHeader('Supybot Plugin Documentation'))) fd.close() @@ -103,25 +104,27 @@ def makePluginDocumentation(pluginWindow): trClass = 'even' (pluginName, module, plugin) = pluginWindow[1] print 'Generating documentation for %s.py' % pluginName - prev = pluginWindow[0][0] or 'index' - next = pluginWindow[2][0] or 'index' + prev = pluginWindow[0][0] or '../plugins' + next = pluginWindow[2][0] or '../plugins' # can't use string.capitalize() because it lowercases every character # except the first. must create our own capitalized names cpluginName = '%s%s' % (pluginName[0].upper(), pluginName[1:]) - cprev = '%s%s' % (prev[0].upper(), prev[1:]) - cnext = '%s%s' % (next[0].upper(), next[1:]) + temp = prev.strip('./') + cprev = '%s%s' % (temp[0].upper(), temp[1:]) + temp = next.strip('./') + cnext = '%s%s' % (temp[0].upper(), temp[1:]) directory = os.path.join('docs', 'plugins') if not os.path.exists(directory): os.mkdir(directory) id = file(os.path.join('docs', 'plugins.html'), 'a') - id.write('%s\n' % + id.write('%s\n' % (pluginName, cpluginName)) fd = file(os.path.join(directory,'%s.html' % pluginName), 'w') title = 'Documentation for the %s plugin for Supybot' % pluginName meta = ''' - - - + + + ''' % (next, prev) fd.write(textwrap.dedent(''' %s @@ -175,7 +178,7 @@ def finishIndex(): if not os.path.exists(directory): os.mkdir(directory) fd = file(os.path.join(directory, 'plugins.html'), 'a') - fd.write(textwrap.dedent(genFooter())) + fd.write(textwrap.dedent('
\n%s' % genFooter())) fd.close() def makeCommandsIndex():