prnti for wnti
a systemd service that listens for new mails from wnti.ch using imap-tools. Once it gets a new mail, it extracts the link to the online version of the newsletter, captures a screenshot using playwright, resizes the image to a width of 384px with Pillow. Then it prints it to a Epson TM-T88IV Thermo Printer using python-escpos.
Install the printer (or use setup.sh)
lsusb | grep Epson # shows the ids
sudo touch /etc/udev/rules.d/99-escpos.rules
echo 'SUBSYSTEM=="usb", ATTRS{idVendor}=="04b8", ATTRS{idProduct}=="0202", MODE="0664", GROUP="dialout"' |sudo tee -a /etc/udev/rules.d/99-escpos.rules
sudo usermod -aG dialout $USER
sudo service udev restart
sudo udevadm control --reload-rules
sudo udevadm trigger
sudo apt install python3-dev libcups2-dev -y
python3 -m venv .venv
source .venv/bin/activate
python3 -m ensurepip
python3 -m pip install python-escpos[all]sudo nmtuiworks better than wpa_supplicant.conf and raspi-config