A web service running in docker used for printing with Dymo LabelManager PnP. Based on Flask and labelle.
Print using POST request:
curl --header "Content-Type: application/json" \
--request POST \
--data '{"text1": "First row", "text2": "Second row", "qr": "https://tiny-url.com"}' \
http://localhost:5001/print
Supported parameters. One of either text1
, qr
or img_url
is mandatory, rest is optional.
{
"text1": "First row",
"text2": "Second row",
"text3": "Third row",
"text4": "Forth row",
"img_url": "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png",
"qr": "https://tiny-url.com"
}
- On the host machine, download repository and update modeswitch settings to switch LabelManager PnP from beeing recognized as USB storage device, to be recognized as a printer.
# Clone GitHub repo
git clone https://github.com/cr3ation/dymo-webprint.git
# Move to folder
cd dymo-webprint
- Physically disconnect and reconnect the LabelManager PnP (more info).
- Finally, build and run image
docker compose up
It's recommended to use docker compose up
(see installation section above). If you manually want to build and run the container, below are the required steps.
In order to build and run you'll need docker installed.
- Build image:
docker build -t dymo-webprint:latest .
- Run container:
sudo docker run -d --privileged -v /dev/bus/usb:/dev/bus/usb -p 5001:5001 dymo-webprint:latest
/app/app.py
- Main webservicelabelle
- Tool for managing printing
Please read CONTRIBUTING.md for details on code of conduct, and the process for submitting pull requests. Special thanks to the labelle team.
- Henrik Engström - Initial work - cr3ation See also the list of contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details.