From dc61cfb45cac6663cd30d3f700a2fb737762e50b Mon Sep 17 00:00:00 2001 From: Mauricio Baeza Date: Fri, 18 Dec 2020 23:20:36 -0600 Subject: [PATCH] Separate files --- source/ZAZLaTex2SVG.py | 4 ++++ source/pythonpath/main.py | 14 ++++++++++++++ 2 files changed, 18 insertions(+) create mode 100644 source/pythonpath/main.py diff --git a/source/ZAZLaTex2SVG.py b/source/ZAZLaTex2SVG.py index 9ae5f29..1ce2538 100644 --- a/source/ZAZLaTex2SVG.py +++ b/source/ZAZLaTex2SVG.py @@ -101,6 +101,10 @@ class ZAZLaTex2SVG(unohelper.Base, XJobExecutor): self.ctx = ctx def trigger(self, args=''): + main.ID_EXTENSION = ID_EXTENSION + main.run(args, __file__) + return + if args == 'app': self._app() return diff --git a/source/pythonpath/main.py b/source/pythonpath/main.py new file mode 100644 index 0000000..c5ace66 --- /dev/null +++ b/source/pythonpath/main.py @@ -0,0 +1,14 @@ +#!/usr/bin/env python3 + +import easymacro as app + + +ID_EXTENSION = '' +_ = None + + +def run(args, path_locales): + global _ + _ = app.install_locales(path_locales) + globals()[args]() + return