diff --git a/tools/generate-plugin-documentation.py b/tools/generate-plugin-documentation.py index 5938a674f..44d9d58a5 100755 --- a/tools/generate-plugin-documentation.py +++ b/tools/generate-plugin-documentation.py @@ -64,28 +64,40 @@ def genHeader(title, meta=''):
''' % (title, meta) -def genNavbar(path): +def genNavbar(path, cActive=True): download = 'http://sourceforge.net/project/showfiles.php?group_id=58965' bug = 'http://sourceforge.net/tracker/?func=add&group_id=58965&'\ 'atid=489447' + if cActive: + command = '
  • \nCommands Index\n
  • '\ + % path[3:] + else: + command = '
  • \nCommands Index\n
  • ' return ''' - ''' % (path, download, bug) + ''' % (path, download, bug, command) def genFooter(): return ''' @@ -116,7 +128,7 @@ def prepIndex(): %s
    Supybot Plugin Documentation Index
    %s -
    +
    ''' % (genHeader('Supybot Plugin Documentation'), genNavbar('../')))) fd.close() @@ -153,6 +165,7 @@ def makePluginDocumentation(pluginWindow): %s
    %s
    %s +
    @@ -188,11 +201,12 @@ def makePluginDocumentation(pluginWindow): fd.write('
    CommandArgs Detailed Help
    \n') fd.write(textwrap.dedent('''
    +

    <- %s | - Plugin Index | - Command Index | + Plugins Index | + Commands Index | %s -> %s ''' % (prev, cprev, next, cnext, genFooter()))) @@ -220,8 +234,10 @@ def makeCommandsIndex(): %s
    %s
    %s -
    - ''' % (genHeader(title), title, genNavbar('../')))) +
    + ''' % (genHeader(title), + title, + genNavbar('../', cActive=False)))) commands = [c for c in commandDict.iterkeys()] commands.sort() for i in ascii_lowercase: