diff --git a/README.md b/README.md index c3ef2d0..ab64886 100644 --- a/README.md +++ b/README.md @@ -32,10 +32,11 @@ Essentially, the script takes an input images, scales it to the printers native * Peripage A6 * Peripage A6+ * Peripage A40 + * Peripage A40+ ## Prerequisites -* Peripage A6/A6+/A40/e.t.c printer +* Peripage A6/A6+/A40/A40+/e.t.c printer * Python 3 ## Installation @@ -130,7 +131,7 @@ Install module and run ``` $ python -m peripage -h -usage: __main__.py [-h] -m MAC [-c [0-2]] [-b [0-255]] -p {A6,A6p,A40} (-t TEXT | -s | -i IMAGE | -q QR | -e) +usage: __main__.py [-h] -m MAC [-c [0-2]] [-b [0-255]] -p {A6,A6p,A40,A40p} (-t TEXT | -s | -i IMAGE | -q QR | -e) Print on a Peripage printer via bluetooth @@ -141,7 +142,7 @@ optional arguments: Concentration value for printing (temperature) -b [0-255], --break [0-255] Size of the break inserted after printed image or text - -p {A6,A6p,A40}, --printer {A6,A6p,A40} + -p {A6,A6p,A40,A40p}, --printer {A6,A6p,A40,A40p} Printer model selection -t TEXT, --text TEXT ASCII text to print. Text must be ASCII-safe and will be filtered for invalid characters -s, --stream Print text received from STDIN, line by line. Text must be ASCII-safe and will be filtered for invalid characters diff --git a/peripage/__init__.py b/peripage/__init__.py index 11924ef..cc6b3e4 100644 --- a/peripage/__init__.py +++ b/peripage/__init__.py @@ -40,7 +40,7 @@ def __init__(self, row_bytes: int, row_width: int, row_characters: int): class PrinterType(enum.Enum): """ Defines names for supported printer types. - Currently supported printers are: Peripage A6, A6+, A40 + Currently supported printers are: Peripage A6, A6+, A40, A40+ """ A6 = PrinterTypeSpecs( @@ -61,6 +61,12 @@ class PrinterType(enum.Enum): row_characters=144 ) + A40p = PrinterTypeSpecs( + row_bytes=231, + row_width=1848, + row_characters=154 + ) + @classmethod def names(cls) -> typing.List[str]: """List available keys from Enum"""