Coverage for gws-app/gws/plugin/template/__init__.py: 100%
0 statements
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-05 13:35 +0200
« prev ^ index » next coverage.py v7.16.2, created at 2026-10-05 13:35 +0200
1"""Template types.
3This package contains the template plugins. Templates format feature
4descriptions, labels, pages and print layouts; they implement the
5``gws.Template`` interface and extend ``gws.base.template.Object``, which
6provides the common options (``subject``, ``title``, ``mimeTypes``,
7``pageSize``, ``mapSize``, ``pageMargin``) and the template arguments.
9Subpackages
10-----------
12- ``html`` - templates in the Jump language that produce HTML, PDF or PNG
13 output, with commands for maps, legends, page setup, headers and footers.
14 This is the main template type, used for feature formatting and printing.
15- ``text`` - Jump templates for plain text output, without the HTML
16 commands.
17- ``map`` - a template that renders only the map, as HTML, PDF or PNG.
18- ``py`` - a template implemented as a Python module with a ``main``
19 function.
21Print templates based on QGIS layouts are in ``gws.plugin.qgis.template``.
23Example::
25 templates+ {
26 subject "feature.description"
27 type "html"
28 path "/data/templates/description.cx.html"
29 }
31 printers+ {
32 template {
33 type "html"
34 path "/data/templates/print.cx.html"
35 mimeTypes [ "application/pdf" ]
36 }
37 }
38"""