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

add encoding list

This commit is contained in:
Patrick Kanzler
2023-07-29 00:34:12 +02:00
parent 18365fe653
commit 1309976e6e
5 changed files with 53 additions and 5 deletions

View File

@@ -0,0 +1,28 @@
{% for item in data.encodings %}
{% set encoding = data.encodings[item] %}
{% macro draw_with_underline(text, symbol='-') -%}
{{ escape_rst(text) }}
{{ escape_rst(text) | length * symbol }}
{%- endmacro %}
{{ '.. _encoding-label-' + item + ':' }}
{{ draw_with_underline(encoding.name) }}
{{ escape_rst(encoding.notes) }}
Mapping Information
^^^^^^^^^^^^^^^^^^^
====================== ================================================================
identifier {{ escape_rst(item) }}
Name {{ escape_rst(encoding.name|default('Unknown')) }}
Iconv Name {{ escape_rst(encoding.iconv|default('Unknown')) }}
``python_encode`` Name {{ escape_rst(encoding.python_encode|default('Unknown')) }}
====================== ================================================================
{% if encoding.data is defined %}
{{ draw_with_underline('Code page data', symbol='^') }}
{{ encoding.data }}
{% endif %}
{% endfor %}

View File

@@ -4,10 +4,13 @@
{{ escape_rst(text) }}
{{ escape_rst(text) | length * symbol }}
{%- endmacro %}
{{ '.. _printer-label-' + item + ':' }}
{{ draw_with_underline(printer.name) }}
{{ escape_rst(printer.notes) }}
You can select this profile in python-escpos with this identifier: `{{ item }}`.
You can select this profile in python-escpos with this identifier: ``{{ item }}``.
Basic information
^^^^^^^^^^^^^^^^^
@@ -54,6 +57,8 @@ starCommands clear
Text code pages
^^^^^^^^^^^^^^^
todo example encoding: :ref:`encoding-label-CP3011`
.. todo: list code pages (ID, Encoding, link to Encoding list)
{% endfor %}