Updated docs generation scripts

This commit is contained in:
Bartek Kryza
2023-09-10 00:03:47 +02:00
parent 2cc70bcd7e
commit 9a6def801c
6 changed files with 34 additions and 14 deletions

View File

@@ -38,8 +38,11 @@ ok = 0
for f in files:
try:
print(f'Generating Mermaid diagram from {f}')
f_svg = Path(f).with_suffix('.svg')
subprocess.check_call(['mmdc', '-i', f, '-o', f_svg])
f_svg = Path(f).with_suffix('.svg').name
target = Path(f).parent.absolute()
target = target.joinpath('mermaid')
target = target.joinpath(f_svg)
subprocess.check_call(['mmdc', '-i', f, '-o', target])
except subprocess.CalledProcessError:
ok = 1
print(f'ERROR: Generating Mermaid diagram from {f} failed')