-
Notifications
You must be signed in to change notification settings - Fork 225
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] Unfortunate HTML output template placeholder #377
Comments
I propose to use the default placeholder pattern that is used in Jinja. It would allow using this as a templating engine that is much more powerful than the simple replacements that we are currently using: Note that Jinja could also be used to generate the GV files from templates, though I would consider that a major change that is to be discussed separately. |
@formatc1702 - Is my original issue here trivial, or might there be bad side-effects? The suggestion by @martinrieder is also valid, but that must be handled later, in a separate issue. |
TL;DR: it's debug legacy and can be changed. The initial design of the technical drawing templates happened quite a while ago but I seem to recall the following reason: Using |
Fixes #377 (makes HTML output template placeholders more consistent)
Fixes #377 (makes HTML output template placeholders more consistent)
Fixes #377 (makes HTML output template placeholders more consistent)
Fixes #377 (makes HTML output template placeholders more consistent)
Closed after releasing v0.4.1. |
HTML output templates with placeholders for generated text is a new feature introduced in v0.4. All placeholders are named
<!-- %something% -->
, except one placeholder called"sheetsize_default"
only.sheetsize_default
and notsheetsize
ortemplate_sheetsize
? The replacement text is fetched frommetadata.template.sheetsize
.<!-- %template_sheetsize% -->
to be consistent with the other placeholders?<!-- %template_sheetsize% -->
could be placed within the quote characters in the template, but the quote characters need not be replaced, and special treatment of this placeholder is no longer needed. The code would be cleaner, and a documentation description would be easier to understand because all placeholders are treated equally.I suggest replacing https://github.com/wireviz/WireViz/blob/v0.4/src/wireviz/wv_html.py#L104-L106 with a simple entry
inserted together with the others at https://github.com/wireviz/WireViz/blob/v0.4/src/wireviz/wv_html.py#L88
and then update the placeholder to
<!-- %template_sheetsize% -->
intemplates/din-6771.html
The text was updated successfully, but these errors were encountered: