From 836c95edc702bcbf701d50dd1a04d232eb34b88c Mon Sep 17 00:00:00 2001 From: rbaron Date: Sat, 21 Sep 2024 21:57:48 +0200 Subject: [PATCH] Update README --- README.md | 24 +++++++++--------------- print.py | 2 +- 2 files changed, 10 insertions(+), 16 deletions(-) diff --git a/README.md b/README.md index 66ba7c5..f0b2ddc 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 diff --git a/print.py b/print.py index 59c3669..ba47cc6 100755 --- a/print.py +++ b/print.py @@ -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()