def migrate(destdir): plugindir = opj(destdir, 'plugin') makedir(plugindir) fname = opj(plugindir, '__init__.py') f = open(fname, 'w') f.write('''\ # *** Do not remove this! *** # Although being empty, the presence of this file is important for plugins # working correctly. ''') f.close() for d in [ 'action', 'formatter', 'macro', 'parser', 'processor', 'theme', 'xmlrpc', ]: thisdir = opj(plugindir, d) makedir(thisdir) fname = opj(thisdir, '__init__.py') f = open(fname, 'w') f.write('''\ # -*- coding: iso-8859-1 -*- from MoinMoin.util import pysupport modules = pysupport.getPackageModules(__file__) ''') f.close()
def execute(script, data_dir, rev): plugindir = opj(data_dir, 'plugin') for d in ['filter', ]: thisdir = opj(plugindir, d) makedir(thisdir) fname = opj(thisdir, '__init__.py') f = open(fname, 'w') f.write("""\ # -*- coding: iso-8859-1 -*- from MoinMoin.util import pysupport modules = pysupport.getPackageModules(__file__) """) f.close() return rev + 1
def execute(script, data_dir, rev): plugindir = opj(data_dir, 'plugin') for d in [ 'filter', ]: thisdir = opj(plugindir, d) makedir(thisdir) fname = opj(thisdir, '__init__.py') f = open(fname, 'w') f.write("""\ # -*- coding: iso-8859-1 -*- from MoinMoin.util import pysupport modules = pysupport.getPackageModules(__file__) """) f.close() return rev + 1
def migrate(destdir): plugindir = opj(destdir, 'plugin') makedir(plugindir) fname = opj(plugindir, '__init__.py') f = open(fname, 'w') f.write('''\ # *** Do not remove this! *** # Although being empty, the presence of this file is important for plugins # working correctly. ''') f.close() for d in ['action', 'formatter', 'macro', 'parser', 'processor', 'theme', 'xmlrpc', ]: thisdir = opj(plugindir, d) makedir(thisdir) fname = opj(thisdir, '__init__.py') f = open(fname, 'w') f.write('''\ # -*- coding: iso-8859-1 -*- from MoinMoin.util import pysupport modules = pysupport.getPackageModules(__file__) ''') f.close()