From 38995ea9e969854eefbff990bac1d609bcb06400 Mon Sep 17 00:00:00 2001 From: KV Date: Sun, 26 May 2024 17:28:09 +0200 Subject: [PATCH] Add HTML template placeholders for filename This will e.g. enable users to replace the SVG diagram with PNG, that is needed as a work-around when the SVG output from Graphviz is not looking good. Suggested as work-around for Graphviz bug in https://github.com/wireviz/WireViz/issues/175#issuecomment-2132206026 --- src/wireviz/wv_html.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/wireviz/wv_html.py b/src/wireviz/wv_html.py index 763da9d7..6fde7cdd 100644 --- a/src/wireviz/wv_html.py +++ b/src/wireviz/wv_html.py @@ -81,6 +81,9 @@ def generate_html_output( "": options.fontname, "": wv_colors.translate_color(options.bgcolor, "hex"), "": svgdata, + # TODO: "": base64 of png file + "": str(filename), + "": Path(filename).stem, "": bom_html, "": bom_html_reversed, "": "1", # TODO: handle multi-page documents