No description
Find a file
2026-03-15 20:10:56 +01:00
epson Add license 2024-09-25 21:48:36 +02:00
resources Add image presets functionality 2025-11-02 15:56:02 +01:00
templates Disable print button if form changes 2026-03-15 20:10:56 +01: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 Scale image on page based on print size 2026-03-15 19:04:30 +01:00
config.py Fix links in default config 2026-03-15 19:14:12 +01:00
fonts.py Implement a checkbox to choose if the text will be bold or not 2025-10-22 16:06:09 +02:00
gen_image.py Prevent bleedover of generated preview between text and image page 2026-03-15 17:11:17 +01:00
html_gen.py Improve orientation svg 2026-03-07 16:58:05 +01: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 Code cleanup and old users data in ram is now removed 2026-03-15 15:33:24 +01:00
process_image.py Fix bug where image in portrait would be rotated twice 2026-03-15 17:35:33 +01:00
README.md Remove part of the nginx setup (in README.md) to prevent redirect to request.url issues 2024-12-04 22:02:11 +01:00
requirements.txt Freeze requirements.txt 2024-11-28 00:04:09 +01:00
user_handler.py Code cleanup and old users data in ram is now removed 2026-03-15 15:33:24 +01:00

Setup

On a raspberry pi:

user: pi
password: itoldyoualready

Install

from the home directory:

git clone https://code.techinc.nl/amy/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)

navigate into the label_printer directory

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;
}
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