2020-12-18 23:20:36 -06:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
|
|
|
|
import easymacro as app
|
|
|
|
|
|
|
|
|
|
|
|
ID_EXTENSION = ''
|
|
|
|
_ = None
|
|
|
|
|
|
|
|
|
2020-12-18 23:26:16 -06:00
|
|
|
def from_selection():
|
2020-12-18 23:23:29 -06:00
|
|
|
app.debug('From selection')
|
|
|
|
return
|
|
|
|
|
|
|
|
|
2020-12-18 23:26:16 -06:00
|
|
|
def from_dialog():
|
|
|
|
app.debug('From dialog')
|
|
|
|
return
|
|
|
|
|
|
|
|
|
|
|
|
def validate_app():
|
2020-12-18 23:29:18 -06:00
|
|
|
msg1 = _('Not found')
|
|
|
|
msg2 = _('Found')
|
|
|
|
|
|
|
|
result = msg1
|
|
|
|
if app.paths.exists_app('pdflatex'):
|
|
|
|
result = msg2
|
|
|
|
msg = f'pdflatex = {result}\n'
|
|
|
|
|
|
|
|
result = msg1
|
|
|
|
if app.paths.exists_app('pdfcrop'):
|
|
|
|
result = msg2
|
|
|
|
msg += f'pdfcrop = {result}\n'
|
|
|
|
|
|
|
|
result = msg1
|
|
|
|
if app.paths.exists_app('pdf2svg'):
|
|
|
|
result = msg2
|
|
|
|
msg += f'pdf2svg = {result}\n\n'
|
|
|
|
|
|
|
|
msg += _('Not used, if not found some application.')
|
|
|
|
|
|
|
|
app.msgbox(msg)
|
2020-12-18 23:26:16 -06:00
|
|
|
return
|
|
|
|
|
|
|
|
|
2020-12-18 23:20:36 -06:00
|
|
|
def run(args, path_locales):
|
|
|
|
global _
|
|
|
|
_ = app.install_locales(path_locales)
|
|
|
|
globals()[args]()
|
|
|
|
return
|