Bopytex/bopytex/worker/compile.py
Bertrand Benjamin cd2fdc162e
All checks were successful
continuous-integration/drone/push Build is passing
Fix: run pre-commit hooks
2022-07-28 09:39:51 +02:00

27 lines
671 B
Python

import subprocess
from bopytex.message import Message
from ..message import SubprocessMessage
def curstomtex(command: str, options: str):
def func(args: dict, deps, output) -> Message:
compile_process = subprocess.Popen(
[command, options, deps[0]],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
return Message(
compile_process.wait(),
list(compile_process.stdout),
list(compile_process.stderr),
)
return func
latexmk = curstomtex("latexmk", "-f")
pdflatex = curstomtex("pdflatex", "--interaction=nonstopmode")