Commit 9672d830 authored by Ingo Heimbach's avatar Ingo Heimbach

Added support for current mutools versions

parent bb2fbcac
__version_info__ = (0, 1, 2)
__version_info__ = (0, 1, 3)
__version__ = '.'.join(map(str, __version_info__))
......@@ -112,12 +112,19 @@ def render_tikz(tikz_code, options, output_png=False):
sys.stderr.write(f.read())
raise
if output_png:
subprocess.check_call(
["mudraw", "-r", "360", "-o", TMP_PNG_FILENAME, TMP_PDF_FILENAME],
cwd=tmp_dir,
stdout=devnull,
stderr=devnull,
)
for command in (["mudraw"], ["mutool", "draw"]):
try:
subprocess.check_call(
command + ["-r", "360", "-o", TMP_PNG_FILENAME, TMP_PDF_FILENAME],
cwd=tmp_dir,
stdout=devnull,
stderr=devnull,
)
break
except (OSError, subprocess.CalledProcessError) as e:
last_exception = e
else:
raise last_exception
if output_png:
shutil.move(tmp_png_path, out_png_filename)
else:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment