mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Edit scripts/supybot-plugin-create to fit plugin templates changes
This commit is contained in:
parent
4a5b98507f
commit
90a0ea3c3a
@ -95,6 +95,9 @@ from supybot.commands import *
|
|||||||
import supybot.plugins as plugins
|
import supybot.plugins as plugins
|
||||||
import supybot.ircutils as ircutils
|
import supybot.ircutils as ircutils
|
||||||
import supybot.callbacks as callbacks
|
import supybot.callbacks as callbacks
|
||||||
|
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
||||||
|
|
||||||
|
_ = PluginInternationalization('%s')
|
||||||
|
|
||||||
|
|
||||||
class %s(callbacks.Plugin):
|
class %s(callbacks.Plugin):
|
||||||
@ -114,6 +117,9 @@ configTemplate = '''
|
|||||||
|
|
||||||
import supybot.conf as conf
|
import supybot.conf as conf
|
||||||
import supybot.registry as registry
|
import supybot.registry as registry
|
||||||
|
from supybot.i18n import PluginInternationalization, internationalizeDocstring
|
||||||
|
|
||||||
|
_ = PluginInternationalization('%s')
|
||||||
|
|
||||||
def configure(advanced):
|
def configure(advanced):
|
||||||
# This will be called by supybot to configure this module. advanced is
|
# This will be called by supybot to configure this module. advanced is
|
||||||
@ -127,7 +133,7 @@ def configure(advanced):
|
|||||||
%s = conf.registerPlugin(%r)
|
%s = conf.registerPlugin(%r)
|
||||||
# This is where your configuration variables (if any) should go. For example:
|
# This is where your configuration variables (if any) should go. For example:
|
||||||
# conf.registerGlobalValue(%s, 'someConfigVariableName',
|
# conf.registerGlobalValue(%s, 'someConfigVariableName',
|
||||||
# registry.Boolean(False, """Help for someConfigVariableName."""))
|
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||||
@ -266,9 +272,10 @@ def main():
|
|||||||
finally:
|
finally:
|
||||||
fd.close()
|
fd.close()
|
||||||
|
|
||||||
writeFile('plugin.py', pluginTemplate % (copyright, name,
|
writeFile('plugin.py', pluginTemplate % (copyright, name, name,
|
||||||
name, threaded, name))
|
name, threaded, name))
|
||||||
writeFile('config.py', configTemplate % (copyright, name, name, name, name))
|
writeFile('config.py', configTemplate % (copyright, name, name, name, name,
|
||||||
|
name))
|
||||||
writeFile('__init__.py', __init__Template % (copyright, name))
|
writeFile('__init__.py', __init__Template % (copyright, name))
|
||||||
writeFile('test.py', testTemplate % (copyright, name, name))
|
writeFile('test.py', testTemplate % (copyright, name, name))
|
||||||
writeFile('README.txt', readmeTemplate)
|
writeFile('README.txt', readmeTemplate)
|
||||||
|
Loading…
Reference in New Issue
Block a user