Skip to content

Commit

Permalink
Use output_name as default title
Browse files Browse the repository at this point in the history
The CLI handling code was redesigned for v0.4 and it seems the code
to assigned a default title from v0.3.1 has been messed up. This bug
has not been triggered by build_examples.py due to it seems to call
the parse() function differently.

The output_name should be as default title when present.

This will fix the #360 bug report.
  • Loading branch information
kvid committed May 23, 2024
1 parent 954c4f5 commit c9e733e
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions src/wireviz/wireviz.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,10 +117,7 @@ def parse(

# When title is not given, either deduce it from filename, or use default text.
if "title" not in harness.metadata:
if yaml_file is None:
harness.metadata["title"] = "WireViz diagram and BOM"
else:
harness.metadata["title"] = Path(yaml_file).stem
harness.metadata["title"] = output_name or "WireViz diagram and BOM"

# add items
# parse YAML input file ====================================================
Expand Down

0 comments on commit c9e733e

Please sign in to comment.