Correct quicklink template with the right parameters.
import imp
import sys
import os
class Action:
def __init__(self, mname, fname):
self.mname = mname
self.fname = fname
def _getmodule(self):
modpath = os.path.join(os.path.dirname(__file__), 'actions')
fp, pathname, description = imp.find_module(self.mname, [modpath])
try:
return imp.load_module(self.mname, fp, pathname, description)
finally:
if fp:
fp.close()
def __call__(self, *args):
apply(self._getmodule().__dict__[self.fname],args)
actions = {}
actions['index'] = Action('index', 'do_it')
actions['import'] = Action('imp_xbel', 'do_it')
actions['bookmark'] = Action('bookmark', 'do_it')
actions['keywords'] = Action('editkw', 'do_it')
actions['prefs'] = Action('edit_prefs', 'do_it')
actions['folder'] = Action('folder', 'do_it')
actions['default'] = actions['index']