
Cat Printer by newman314
Cat printer is a portable thermal printer sold on AliExpress for around $20.
This repository contains Python code for talking to the cat printer over Bluetooth Low Energy (BLE). The code has been reverse engineered from the official Android app.
# Clone the repository. $ git clone git@github.com:rbaron/catprinter.git $ cd catprinter # Create a virtualenv on venv/ and activate it. $ virtualenv --python=python3 venv $ source venv/bin/activate # Install requirements from requirements.txt. $ pip install -r requirements.txt
$ python print.py --help usage: print.py [-h] [--devicename] [--log-level {debug,info,warn,error}] [--img-binarization-algo {mean-threshold,floyd-steinberg}] [--show-preview] filename prints an image on your cat thermal printer positional arguments: filename optional arguments: -h, --help show this help message and exit --devicename Specify the Bluetooth device name to search for. Default value is GT01. --log-level {debug,info,warn,error} --img-binarization-algo {mean-threshold,floyd-steinberg, halftone} Which image binarization algorithm to use. --show-preview If set, displays the final image and asks the user for confirmation before pri