Skip to content

cr3ation/dymo-webprint

Repository files navigation

Dymo webprint

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

Installation

Ubuntu/Debian

  1. 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
  1. Physically disconnect and reconnect the LabelManager PnP (more info).
  2. Finally, build and run image
docker compose up

Docker

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.

Prerequisities

In order to build and run you'll need docker installed.

Build and run

  1. Build image:
docker build -t dymo-webprint:latest .
  1. Run container:
sudo docker run -d --privileged -v /dev/bus/usb:/dev/bus/usb -p 5001:5001 dymo-webprint:latest

Useful File Locations (inside container)

  • /app/app.py - Main webservice
  • labelle - Tool for managing printing

Contributing

Please read CONTRIBUTING.md for details on code of conduct, and the process for submitting pull requests. Special thanks to the labelle team.

Authors

  • Henrik Engström - Initial work - cr3ation See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License - see the LICENSE.md file for details.

About

Webservice to print on Dymo

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published