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 SVG diagram with PNG,
that is needed as a work-around when the SVG output from Graphviz
is not looking good.

#175 (comment)
  • Loading branch information
kvid committed May 27, 2024
1 parent 954c4f5 commit 7394dcc
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% -->": filename.stem,
"<!-- %bom% -->": bom_html,
"<!-- %bom_reversed% -->": bom_html_reversed,
"<!-- %sheet_current% -->": "1", # TODO: handle multi-page documents
Expand Down

0 comments on commit 7394dcc

Please sign in to comment.