WireViz
WireViz copied to clipboard
Improve output of diagram + BOM as technical drawing
New version of #74.
Reason for new PR:
- 74 was based on the original branch for #214, called
feature/metadata
- # 214 was then squash-merged onto
dev
. - Deleting
feature/metadata
(since it was no longer needed for # 214) without changing # 74's base first, cause it to auto-close, with no way to re-open
This PR is ready for review. I have been using this feature and the included DIN 6771 template files for quite a while and I am very pleased with the results.
In the interest of not delaying the merge too much, I would request to address the following minor issues as separate PRs:
- Optimization of the HTML templates themselves
- Dealing with resolving template file paths specified in the prepend YAML file.
- I would like to fix this together with the related issue from the comment in #189 afterwards
- The newly added
smart_file_resolve()
may help fix both issues
- Parsing any color/font specs from the
options
section of the YAML and applying them to the HTML - I have purposely only edited
demo02.yml
to include metadata and template specs, but notdemo01.yml
, so as to keep01
as simple as possible.
- This preliminary review is only based on inspection of changes, not testing.
Thanks, I will incorporate some of your changes soon and wait for some testing.
- Consider also replacing all keywords from the template in one pass to avoid replacement of replacements (and to increase efficiency), e.g. like in the lead answer here: https://stackoverflow.com/questions/6116978/how-to-replace-multiple-substrings-of-a-string
👍
- Have you considered supporting an optional default value of each keyword in templates? (e.g. something like this:
<!-- %bgcolor%white% -->
)
Sounds like a nice follow-up PR.