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

Added support for current mutools versions

parent bb2fbcac
__version_info__ = (0, 1, 2) __version_info__ = (0, 1, 3)
__version__ = '.'.join(map(str, __version_info__)) __version__ = '.'.join(map(str, __version_info__))
...@@ -112,12 +112,19 @@ def render_tikz(tikz_code, options, output_png=False): ...@@ -112,12 +112,19 @@ def render_tikz(tikz_code, options, output_png=False):
sys.stderr.write( sys.stderr.write(
raise raise
if output_png: if output_png:
subprocess.check_call( for command in (["mudraw"], ["mutool", "draw"]):
["mudraw", "-r", "360", "-o", TMP_PNG_FILENAME, TMP_PDF_FILENAME], try:
cwd=tmp_dir, subprocess.check_call(
stdout=devnull, command + ["-r", "360", "-o", TMP_PNG_FILENAME, TMP_PDF_FILENAME],
stderr=devnull, cwd=tmp_dir,
) stdout=devnull,
except (OSError, subprocess.CalledProcessError) as e:
last_exception = e
raise last_exception
if output_png: if output_png:
shutil.move(tmp_png_path, out_png_filename) shutil.move(tmp_png_path, out_png_filename)
else: 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