Skip to content

Commit c52b15a

Browse files
authored
Merge pull request #19 from anthony-foulfoin/feat/add-peripage-A40+
Add support for Peripage A40+
2 parents b2d2a9b + 82ad42f commit c52b15a

2 files changed

Lines changed: 11 additions & 4 deletions

File tree

README.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,10 +32,11 @@ Essentially, the script takes an input images, scales it to the printers native
3232
* Peripage A6
3333
* Peripage A6+
3434
* Peripage A40
35+
* Peripage A40+
3536

3637
## Prerequisites
3738

38-
* Peripage A6/A6+/A40/e.t.c printer
39+
* Peripage A6/A6+/A40/A40+/e.t.c printer
3940
* Python 3
4041

4142
## Installation
@@ -130,7 +131,7 @@ Install module and run
130131

131132
```
132133
$ python -m peripage -h
133-
usage: __main__.py [-h] -m MAC [-c [0-2]] [-b [0-255]] -p {A6,A6p,A40} (-t TEXT | -s | -i IMAGE | -q QR | -e)
134+
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)
134135
135136
Print on a Peripage printer via bluetooth
136137
@@ -141,7 +142,7 @@ optional arguments:
141142
Concentration value for printing (temperature)
142143
-b [0-255], --break [0-255]
143144
Size of the break inserted after printed image or text
144-
-p {A6,A6p,A40}, --printer {A6,A6p,A40}
145+
-p {A6,A6p,A40,A40p}, --printer {A6,A6p,A40,A40p}
145146
Printer model selection
146147
-t TEXT, --text TEXT ASCII text to print. Text must be ASCII-safe and will be filtered for invalid characters
147148
-s, --stream Print text received from STDIN, line by line. Text must be ASCII-safe and will be filtered for invalid characters

peripage/__init__.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ def __init__(self, row_bytes: int, row_width: int, row_characters: int):
4040
class PrinterType(enum.Enum):
4141
"""
4242
Defines names for supported printer types.
43-
Currently supported printers are: Peripage A6, A6+, A40
43+
Currently supported printers are: Peripage A6, A6+, A40, A40+
4444
"""
4545

4646
A6 = PrinterTypeSpecs(
@@ -61,6 +61,12 @@ class PrinterType(enum.Enum):
6161
row_characters=144
6262
)
6363

64+
A40p = PrinterTypeSpecs(
65+
row_bytes=231,
66+
row_width=1848,
67+
row_characters=154
68+
)
69+
6470
@classmethod
6571
def names(cls) -> typing.List[str]:
6672
"""List available keys from Enum"""

0 commit comments

Comments
 (0)