Skip to content

Latest commit

 

History

204 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

label_web

This is a web service to print labels on (label) printers exposed via CUPS. Based on, but heavily modified from Brother_QL_Web.

Primarily, I use this in conjunction with Grocy for label printing, so there are some features that are built with that tool in mind, but the intent is to make this flexible and useful in other scenarios.

If not using the docker container, you need Python 3 for this software to work.

Screenshot

The web interface is responsive. There's also a screenshot showing how it looks on a smartphone

Installation

Docker Compose (preferred)

services:
  label_web:
    image: cvergaray/label_web_2:latest
    container_name: label_web
    ports:
      - 8013:8013
    volumes:
      - <Your Local Path>/Label_Config:/appconfig
      - <Your Local Path>/label_plugins:/app/elements/Custom

Configure the application

Configuration can be done via the UI (recommended) or by editing the config file directly. Details are provided in the Configuration Documentation, with a description of each configuration property in the Configuration Sections document.

Configure via UI (recommended)

  1. Start the container (or run the app locally) and open http://localhost:8013.
  2. Go to Settings and adjust server, CUPS, printers, labels, and website options.
  3. Click Save All Settings. The app writes config.json for you under Label_Config.

Manual config (legacy, still supported)

If you prefer to edit files directly or are scripting installs:

  1. Copy config.example.json to <Your Local Path>/Label_Config/config.json.
  2. Edit the values to match your environment. See the Configuration Section for details.
  3. Add any template (.lbl) files to the same Label_Config folder.
  4. Add any custom element plugins to Label_Config/label_plugins. See the

Documentation

Comprehensive documentation is available in the docs/ folder:

Template File

Labels are defined in template files. The templates are specific to how you want the label to look, which depends on the printer/media available and what data you would like on the label. An in-depth description of the label template elements can be found in the Template File Elements Documentation.

Usage

Once it's running, access the web interface by opening the page with your browser. If you run it on your local machine, go to http://localhost:8013 (You can change the default port 8013 by remapping in the docker-compose file or using the --port argument if not using docker). You will then be forwarded by default to the interactive web gui located at /labeldesigner.

All in all, the web server offers:

  • a Web GUI allowing you to print your labels at /labeldesigner,
  • an API at /api/print/text?text=Your_Text&font_size=100&font_family=Minion%20Pro%20(%20Semibold%20) to print a label containing 'Your Text' with the specified font properties.
  • an API at /api/print/template/your_template_file_name.lbl to print labels using a label template found at your_template_file_name.lbl
  • a Web GUI for selecting and printing label templates.

Roadmap

Features:

  • Support any CUPS printer instead of only Brother QL Printers
  • Select from any shared printer on the CUPS server
  • Automatically resize text to fit the label
  • Print Quantity (printing multiple labels at a time)
  • Label Template support (e.g. Configure a Grocy label without code changes)
  • Containerized for ease of deployment
  • Created Plugin Architecture for visual elements
  • GUI for printing template files from web UI
  • GUI for Creating/Editing template files from Web UI

Element Plugins:

These plugins are built-in, but please feel free to request additional ones or develop your own!

License

This software is published under the terms of the GPLv3, see the LICENSE file in the repository.

Parts of this package are redistributed software products from 3rd parties. They are subject to different licenses:

Plugin architecture based on example code provided by GitHub user Victor Dorneau

About

An extensible label print service for printing to CUPS printers

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Sponsor this project

Packages

Used by

Contributors

Languages