dragotin / kraft

Kraft helps to handle your daily quotes and invoices in your small business.
http://volle-kraft-voraus.de
GNU General Public License v2.0
56 stars 18 forks source link

Feature Request: Define a label.VERSIONSTRING #166

Closed noseshimself closed 2 years ago

noseshimself commented 2 years ago

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).

dragotin commented 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
dragotin commented 2 years ago

Add version to XML file in b64bd431c57321a35ea75b61be46bb37fb584afe

noseshimself commented 2 years ago

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.