Skip to content

Commit

Permalink
Update README
Browse files Browse the repository at this point in the history
  • Loading branch information
rbaron committed Sep 21, 2024
1 parent ac57b9c commit 836c95e
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 16 deletions.
24 changes: 9 additions & 15 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@ $ pip install -r requirements.txt
# Usage
```bash
$ ./print.py --help
usage: print.py [-h] [-l {debug,info,warn,error}]
[-b {mean-threshold,floyd-steinberg,halftone,none}] [-s]
[-d DEVICE] [-t]
usage: print.py [-h] [-l {debug,info,warn,error}] [-b {mean-threshold,floyd-steinberg,atkinson,halftone,none}] [-s] [-d DEVICE] [-e ENERGY]
filename

prints an image on your cat thermal printer
Expand All @@ -33,19 +31,15 @@ options:
-h, --help show this help message and exit
-l {debug,info,warn,error}, --log-level {debug,info,warn,error}
-b {mean-threshold,floyd-steinberg,atkinson,halftone,none}, --img-binarization-algo {mean-threshold,floyd-steinberg,atkinson,halftone,none}
Which image binarization algorithm to use. If 'none'
is used, no binarization will be used. In this case
the image has to have a width of 384 px.
-s, --show-preview If set, displays the final image and asks the user for
confirmation before printing.
Which image binarization algorithm to use. If 'none' is used, no binarization will be used. In this case the image has to
have a width of 384 px.
-s, --show-preview If set, displays the final image and asks the user for confirmation before printing.
-d DEVICE, --device DEVICE
The printer's Bluetooth Low Energy (BLE) address (MAC
address on Linux; UUID on macOS) or advertisement name
(e.g.: "GT01", "GB02", "GB03"). If omitted, the the
script will try to auto discover the printer based on
its advertised BLE services.
-t, --darker Print the image in text mode. This leads to more
contrast, but slower speed.
The printer's Bluetooth Low Energy (BLE) address (MAC address on Linux; UUID on macOS) or advertisement name (e.g.:
"GT01", "GB02", "GB03"). If omitted, the the script will try to auto discover the printer based on its advertised BLE
services.
-e ENERGY, --energy ENERGY
Thermal energy. Between 0x0000 (light) and 0xffff (darker, default).
```
# Example
Expand Down
2 changes: 1 addition & 1 deletion print.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ def parse_args():
'the printer based on its advertised BLE services.'
))
args.add_argument('-e', '--energy', type=lambda h: int(h.removeprefix("0x"), 16),
help="Thermal energy. Between 0x0000 (light) and 0xffff (darker)",
help="Thermal energy. Between 0x0000 (light) and 0xffff (darker, default).",
default="0xffff")
return args.parse_args()

Expand Down

0 comments on commit 836c95e

Please sign in to comment.