Feat: dockerfile to test bopytex in new environment

This commit is contained in:
2022-05-08 09:15:13 +02:00
parent 8f1d9cb4d4
commit 78f6ddc813
4 changed files with 36 additions and 22 deletions

View File

@@ -2,17 +2,32 @@ import subprocess
from bopytex.message import Message, SubprocessMessage
def pdfjam(args: dict, deps, output):
joining_process = subprocess.Popen(
["pdfjam"] + deps + ["-o", output],
["pdfjam"] + deps + ["-o", output],
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
#return SubprocessMessage(joining_process)
return Message(
joining_process.wait(),
list(joining_process.stdout),
list(joining_process.stderr),
)
)
def gs(args: dict, deps, output):
""" Not working. The command works in terminal but not here """
joining_process = subprocess.Popen(
["gs", f"-dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile={output}"]
+ deps,
stdout=subprocess.PIPE,
stderr=subprocess.PIPE,
universal_newlines=True,
)
return Message(
joining_process.wait(),
list(joining_process.stdout),
list(joining_process.stderr),
)