A slimmed-down fork of the Adafruit Python-Thermal-Printer library.
This one just prints out a filtered Trello board when the button is pressed.
Set up the printer with the Adafruit instructions.
Update the system and install prequisities:
sudo apt-get update
sudo apt-get install git cups wiringpi build-essential libcups2-dev libcupsimage2-dev python3-serial python-pil python-requests
Install the printer driver. Don't worry about the warnings that g++ gives.
git clone https://github.com/adafruit/zj-58
cd zj-58
make
sudo ./install
Make the printer the default printer. This is useful if you are going to be doing other things with it.
sudo lpadmin -p ZJ-58 -E -v serial:/dev/serial0?baud=19200 -m zjiang/ZJ-58.ppd
sudo lpoptions -d ZJ-58
Restart the system. Clone this repository and try to run printertest.py.
git clone https://github.com/stvnrlly/Python-Thermal-Printer/
cd Python-Thermal-Printer
python3 printertest.py
Create a config.py
file for your credentials and config:
consumer_key = 'fancy_secret_trello_key'
consumer_secret = 'fancy_secret_trello_secret'
config_board = 'the_board_long_string'
config_list = 'the_list_long_string'
config_member = 'the_member_long_string'
You may need to grab the board, list, and member strings through some API calls. For more about the API, see the API docs.
If that all works, set it up to start automatically.
Get up and running with pipenv
:
pipenv install