From a41f42002db0355c99bb9dbbcb518af30313f6c8 Mon Sep 17 00:00:00 2001 From: Surferlul Date: Tue, 10 Oct 2023 05:07:16 +0200 Subject: [PATCH] fixed svg link --- main.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/main.py b/main.py index 5bf4cdb..56dad3d 100644 --- a/main.py +++ b/main.py @@ -13,10 +13,10 @@ def iter_svgs(vault_path, draws): for draw in draws: svg = Path("assets/excalidraw_svg").joinpath(Path(draw).with_suffix(".svg").name) if vault_path.joinpath(svg).is_file(): - print(svg) + print("[found]", svg) yield draw, svg else: - eprint(svg) + eprint("[missing]:", svg) yield draw, None @@ -54,10 +54,7 @@ def main() -> None: if svg is None: replace_dict[f"[[{draw}]]"] = "

MISSING IMAGE

" else: - replace_dict[f"[[{draw}]]"] = f"[[{svg}]]" - - print(replace_dict) - print(pages) + replace_dict[f"[[{draw}]]"] = f"![]({svg})]" for page in pages: with open(page) as f: