output path
This commit is contained in:
parent
40650a5839
commit
ce1887a8df
@ -41,8 +41,8 @@ def plantuml(key, value, format_, meta):
|
|||||||
else:
|
else:
|
||||||
latex_img_format = "eps"
|
latex_img_format = "eps"
|
||||||
|
|
||||||
os.makedirs("images", exist_ok=True)
|
os.makedirs("output/images", exist_ok=True)
|
||||||
filename = "images/" + hashlib.sha1(code.encode(sys.getfilesystemencoding())).hexdigest()
|
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)
|
filetype = get_extension(format_, "png", html="svg", latex=latex_img_format, beamer=latex_img_format)
|
||||||
|
|
||||||
src = filename + '.uml'
|
src = filename + '.uml'
|
||||||
@ -55,7 +55,6 @@ def plantuml(key, value, format_, meta):
|
|||||||
with open(src, "wb") as f:
|
with open(src, "wb") as f:
|
||||||
f.write(txt)
|
f.write(txt)
|
||||||
subprocess.check_call(PLANTUML_BIN.split() + ["-t" + filetype, src])
|
subprocess.check_call(PLANTUML_BIN.split() + ["-t" + filetype, src])
|
||||||
sys.stderr.write('Created image ' + dest + '\n')
|
|
||||||
if (filetype == "latex") and (latex_img_format == 'latex'):
|
if (filetype == "latex") and (latex_img_format == 'latex'):
|
||||||
latex = open(dest).read()
|
latex = open(dest).read()
|
||||||
return RawBlock('latex', latex.split("\\begin{document}")[-1].split("\\end{document}")[0])
|
return RawBlock('latex', latex.split("\\begin{document}")[-1].split("\\end{document}")[0])
|
||||||
|
Loading…
x
Reference in New Issue
Block a user