Closed noseshimself closed 2 years ago
The following new variables can be used in weasyprint templates:
kraft.VERSION - The kraft version string, example "Kraft 0.98+git Lyonel"
kraft.DB_SCHEME - The number of the database scheme, example "DB-Scheme 23"
kraft.SYS_USER - The linux user name running kraft
kraft.HOSTNAME - The hostname of the machine running kraft
Add version to XML file in b64bd431c57321a35ea75b61be46bb37fb584afe
I added
{% if kraft.VERSION %}
<meta name="generated by" content="Kraft {{ kraft.VERSION }}"/>
{% endif %}
and depending on the local Grantlee installation (v51 does not work, v56 seems to) the metadata is added to the PDF.
The label should at least expand to "Kraft v(xx.xx.xx)". If it is containing additional information like the compilation date "of yyyymmdd" and whether it is the AppImage (or any other specially crafted package) it might help, too.
This version (number) should also be included in documents (especially the saved XML archive files).