diff --git a/filters/pandoc_plantuml_filter.py b/filters/pandoc_plantuml_filter.py index e6b0755..25c1917 100755 --- a/filters/pandoc_plantuml_filter.py +++ b/filters/pandoc_plantuml_filter.py @@ -41,8 +41,8 @@ def plantuml(key, value, format_, meta): else: latex_img_format = "eps" - os.makedirs("images", exist_ok=True) - filename = "images/" + hashlib.sha1(code.encode(sys.getfilesystemencoding())).hexdigest() + os.makedirs("output/images", exist_ok=True) + filename = "output/images/" + hashlib.sha1(code.encode(sys.getfilesystemencoding())).hexdigest() filetype = get_extension(format_, "png", html="svg", latex=latex_img_format, beamer=latex_img_format) src = filename + '.uml' @@ -55,7 +55,6 @@ def plantuml(key, value, format_, meta): with open(src, "wb") as f: f.write(txt) subprocess.check_call(PLANTUML_BIN.split() + ["-t" + filetype, src]) - sys.stderr.write('Created image ' + dest + '\n') if (filetype == "latex") and (latex_img_format == 'latex'): latex = open(dest).read() return RawBlock('latex', latex.split("\\begin{document}")[-1].split("\\end{document}")[0])