Skip to content

Commit

Permalink
Add HTML template placeholders for filename
Browse files Browse the repository at this point in the history
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
#175 (comment)
  • Loading branch information
kvid authored and formatc1702 committed Jun 11, 2024
1 parent 65b7994 commit f9f0773
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/wireviz/wv_html.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,9 @@ def generate_html_output(
"<!-- %fontname% -->": options.fontname,
"<!-- %bgcolor% -->": wv_colors.translate_color(options.bgcolor, "hex"),
"<!-- %diagram% -->": svgdata,
# TODO: "<!-- %diagram_png_base64% -->": base64 of png file
"<!-- %filename% -->": str(filename),
"<!-- %filename_stem% -->": Path(filename).stem,
"<!-- %bom% -->": bom_html,
"<!-- %bom_reversed% -->": bom_html_reversed,
"<!-- %sheet_current% -->": "1", # TODO: handle multi-page documents
Expand Down

0 comments on commit f9f0773

Please sign in to comment.