- <- %s | Plugin Index |
+ <- %s |
+ Plugin Index |
Home | Command Index
- | %s ->
+ | %s ->
%s
- """ % (prev, cprev, next, cnext, genFooter())))
+ ''' % (prev, cprev, next, cnext, genFooter())))
fd.close()
id.close()
def finishIndex():
- directory = os.path.join('docs', 'plugins')
+ directory = 'docs'
if not os.path.exists(directory):
os.mkdir(directory)
fd = file(os.path.join(directory, 'plugins.html'), 'a')
@@ -192,16 +181,16 @@ def makeCommandsIndex():
from string import ascii_lowercase
global commandDict
global firstChars
- directory = os.path.join('docs', 'plugins')
+ directory = 'docs'
if not os.path.exists(directory):
os.mkdir(directory)
fd = file(os.path.join(directory, 'commands.html'), 'w')
title = 'Supybot Commands Index'
- fd.write(textwrap.dedent("""
+ fd.write(textwrap.dedent('''
%s
%s
- """ % (genHeader(title), title)))
+ ''' % (genHeader(title), title)))
commands = [c for c in commandDict.iterkeys()]
commands.sort()
for i in ascii_lowercase:
@@ -211,6 +200,7 @@ def makeCommandsIndex():
fd.write('%s ' % i.capitalize())
firstChars.clear()
fd.write('
\n ')
+ pluginLink = '%s'
for command in commands:
c = command[0]
if c not in firstChars:
@@ -222,9 +212,9 @@ def makeCommandsIndex():
(c, c, c.capitalize()))
plugins = commandDict[command]
plugins.sort()
- fd.write('%s (%s) \n' % (command,
- ', '.join(['%s' % (p,command,p)
- for p in plugins])))
+ fd.write('%s (%s) \n' %
+ (command,
+ ', '.join([pluginLink % (p,command,p) for p in plugins])))
fd.write('\n