Feat: dockerfile to test bopytex in new environment
This commit is contained in:
@@ -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),
|
||||
)
|
||||
|
Reference in New Issue
Block a user