From 9967d408625c0d967546ddbb820e2c302ae7b50f Mon Sep 17 00:00:00 2001 From: Surferlul Date: Fri, 13 Oct 2023 19:14:42 +0200 Subject: [PATCH] added annotations about the status written to home md file --- main.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/main.py b/main.py index 0091342..567a48f 100644 --- a/main.py +++ b/main.py @@ -74,9 +74,11 @@ def main() -> None: with open(page, "w") as f: f.write(content) - if missing_any_svgs and home_md_file is not None: - with open(home_md_file, "a") as f: - f.write("\n" + """ + if missing_any_svgs: + if home_md_file is not None: + eprint(f"::notice::Writing error message to {home_md_file}") + with open(home_md_file, "a") as f: + f.write("\n" + """ -

Some drawings were not loaded

\t- ## How to fix as a Contributor \t\t- drawings are located in /draws @@ -91,7 +93,10 @@ def main() -> None: \t\t\t- Click "SVG" and copy to /assets/excalidraw_svgs \t\t\t- Rename the file so the base names match """ - ) + ) + else: + eprint("::warning::home-md-file not set for logseq-publish-excalidraw-to-svg, won't write error message to " + "website") if __name__ == "__main__":