1
0
mirror of https://github.com/python-escpos/python-escpos synced 2025-09-13 09:09:58 +00:00

add first draft of printer profile listing

This commit is contained in:
Patrick Kanzler
2023-07-27 23:26:29 +02:00
committed by Patrick Kanzler
parent 09a598883c
commit 8222c1e587
6 changed files with 35 additions and 1 deletions

View File

@@ -0,0 +1,20 @@
{% for item in data.profiles %}
{% set printer = data.profiles[item] %}
{% macro draw_with_underline(text, symbol='-') -%}
{{ escape_rst(text) }}
{{ escape_rst(text) | length * symbol }}
{%- endmacro %}
{{ draw_with_underline(printer.name) }}
{{ escape_rst(printer.notes) }}
Basic information
^^^^^^^^^^^^^^^^^
====================== ================================================================
Name {{ escape_rst(printer.name|default('Unknown')) }}
Vendor {{ escape_rst(printer.vendor|default('Unknown')) }}
Media width (mm) {{ escape_rst(printer.media.width.mm|default('Unknown')|string) }}
Media width (pixels) {{ escape_rst(printer.media.width.pixels|default('Unknown')|string) }}
DPI {{ escape_rst(printer.media.dpi|default('Unknown')|string) }}
====================== ================================================================
{% endfor %}