import uno import unohelper from com.sun.star.task import XJobExecutor import main ID_EXTENSION = 'net.elmau.zaz.latex2svg' SERVICE = ('com.sun.star.task.Job',) class ZAZLaTex2SVG(unohelper.Base, XJobExecutor): def __init__(self, ctx): self.ctx = ctx def trigger(self, args=''): main.ID_EXTENSION = ID_EXTENSION main.run(args, __file__) return g_ImplementationHelper = unohelper.ImplementationHelper() g_ImplementationHelper.addImplementation(ZAZLaTex2SVG, ID_EXTENSION, SERVICE)