Edit the script to generate the doc for unofficial plugins.

This commit is contained in:
Valentin Lorentz 2011-10-29 13:28:46 +02:00
parent 1cb25b34a0
commit e71865d02f
2 changed files with 10 additions and 6 deletions

View File

@ -18,14 +18,16 @@ class ConfigPlugin(Config.Config):
# Commands instances are converted into SynchronizedAndFirewalled
from supybot.callbacks import SynchronizedAndFirewalled as Commands
sys.path.append('/home/progval/workspace/Supybot/Limnoria/plugins')
sys.path.append('/home/progval/workspace/Supybot/Supybot-plugins')
def main():
pluginNames = sys.argv[1:]
for pluginName in pluginNames:
supybot = __import__('supybot.plugins.%s.config' % pluginName)
pluginConfig = getattr(getattr(supybot.plugins, pluginName).config,
pluginName) # combo!
#supybot = __import__('supybot.plugins.%s.config' % pluginName)
supybot = __import__('%s.config' % pluginName)
#pluginConfig = getattr(getattr(supybot.plugins, pluginName).config,
# pluginName) # combo!
pluginConfig = getattr(supybot.config, pluginName)
filename = 'use/plugins/%s.rst' % pluginName.lower()
configRoot = 'supybot.plugins.%s' % pluginName
with open(filename, 'a') as fd:

View File

@ -11,11 +11,13 @@ from supybot.callbacks import SynchronizedAndFirewalled as Commands
validCommandName = re.compile('^[a-z]+$')
sys.path.append('/home/progval/workspace/Supybot/Supybot-plugins')
def main():
pluginNames = sys.argv[1:]
for pluginName in pluginNames:
supybot = __import__('supybot.plugins.%s.plugin' % pluginName)
PluginClass = getattr(supybot.plugins, pluginName).plugin.Class
supybot = __import__('%s.plugin' % pluginName)
PluginClass = supybot.plugin.Class
filename = 'use/plugins/%s.rst' % pluginName.lower()
try:
os.unlink(filename)