Skip to content

Commit

Permalink
Add HTML template placeholders for filename (#371)
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 committed Jun 11, 2024
1 parent b0f75b8 commit 2d2fad6
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 2d2fad6

Please sign in to comment.