No description
Find a file
2024-10-09 15:04:05 +02:00
epson Add license 2024-09-25 21:48:36 +02:00
resources Add license file for comicmono 2024-09-15 21:19:51 +02:00
templates Implement label length restrictions, and label width recommendation 2024-09-26 20:38:41 +02:00
.gitignore add user_data to .gitignore 2024-09-25 22:37:37 +02:00
.gitmodules Fully integrate the go library and reorganize files 2024-09-15 20:53:03 +02:00
app.py Set debug to false again 2024-09-26 22:01:05 +02:00
config.py Implement label length restrictions, and label width recommendation 2024-09-26 20:38:41 +02:00
file_handler.py Add license 2024-09-25 21:48:36 +02:00
gen_image.py Implement label length restrictions, and label width recommendation 2024-09-26 20:38:41 +02:00
label_printer.service add label_printer.service 2024-09-25 22:24:25 +02:00
LICENSE Add license 2024-09-25 21:48:36 +02:00
Makefile Make compiling on rpi possible 2024-09-25 22:20:55 +02:00
print.py Implement label length restrictions, and label width recommendation 2024-09-26 20:38:41 +02:00
process_image.py Handle pillow file errors and move intermediate file storage to ram 2024-09-26 22:00:59 +02:00
README.md Add install guide 2024-10-09 15:04:05 +02:00

Setup

On a raspberry pi:

Install

git clone https://code.techinc.nl/emilevs/label_printer.git
sudo apt install python3-flask
sudo apt install golang

(there might be more dependencies, I wasn't starting from a clean raspbian install when testing this)

run make to build the go library

cp label_printer.service to /etc/systemd/system/

sudo systemctl enable label_printer
sudo systemctl start label_printer

The interface will now be running on localhost:5000, which we need to route to the outside world in the next step

Setup the nginx

sudo apt install nginx edit /etx/nginx/sites-available/default and change the contents of:

location / { }

to:

location / {
    proxy_pass http://127.0.0.1:5000;
    proxy_redirect http://127.0.0.1:5000 $scheme://$host:5000;
}
sudo systemctl restart nginx

Setup static ip on the pi

edit /etc/dhcpcd.conf and add:

static ip_address=10.209.10.2/24
static routers=10.209.10.254
static domain_name_servers=10.209.10.255