labelle-org / labelle

Label printing software
Apache License 2.0
27 stars 4 forks source link

Labelle

GitHub Actions (Tests) PyPI version pre-commit.ci status

logo

Open-source label printing software

Features

Supported devices

Labelle is not affiliated with DYMO. Please see the disclaimer below.

For more information about experimental device support, see #4.

If you have a device or tape size that we do not yet support, the first step is to try and get it to print. In some cases this is as simple as adding the device id. Once you can print, you can help us determine the print head size and margins for your tape sizes by following these instructions.

Installation

It is recommended to install Labelle with pipx so that it runs in an isolated virtual environment:

pipx install labelle

In case pipx is not already installed, it can be installed on Ubuntu/Debian with

sudo apt-get install pipx

or on Arch with

sudo pacman -S python-pipx

By default, users don't have permission to access generic USB devices, so you will need to add a rule. The first time you run labelle, it will give instructions about how to do this:

$ labelle "Hello world"
...
You do not have sufficient access to the device. You probably want to add the a udev rule in /etc/udev/rules.d with the following command:

  echo 'ACTION=="add", SUBSYSTEMS=="usb", ATTRS{idVendor}=="0922", ATTRS{idProduct}=="1001", MODE="0666"' | sudo tee /etc/udev/rules.d/91-labelle-1001.rules
...

Testing experimental features

To install a test branch, by GitHub user ghuser for the branch branchname, run

pipx install --force git+https://github.com/ghuser/labelle@branchname

To revert back to the release version, run

pipx install --force labelle

To install a particular release version, specify labelle==x.y.z in place of labelle in the above command.

Development and code style

To install for development, fork and clone this repository, and run (ideally within a venv):

pip install --editable .

This project uses pre-commit to run some checks before committing. After installing the pre-commit executable, please run

pre-commit install

Font management

Default fonts are managed via labelle.ini. This should be placed in your config folder (normally ~/.config). An example file is provided here.

For my Arch-Linux System, fonts are located at e.g.

/usr/share/fonts/TTF/DejaVuSerif.ttf

It is also possible to Download a font from http://font.ubuntu.com/ and use it.

For font discovery, Labelle contains code excerpts from matplotlib. See here for more information and LICENSE for the license.

Labelle includes the Carlito font, licensed under the SIL Open Font License.

Modes

Print text

labelle MyText

Multilines will be generated on whitespace

labelle MyLine MySecondLine # Will print two Lines

If you want whitespaces just enclose in " "

labelle "prints a single line"

Print QRCodes and Barcodes

labelle --help

Print Codes and Text

Just add a text after your qr or barcode text

labelle -qr "QR Content" "Cleartext printed"

Picture printing

Any picture with JPEG standard may be printed. Beware it will be downsized to tape.

labelle -p mypic.jpg ""

Take care of the trailing "" - you may enter text here which gets printed in front of the image

GUI

Run Labelle GUI

labelle-gui

GUI App Features

Nodes can be freely arranged, simply drag&drop rows on the list. To add or delete the node from the label - right-click on the list and select the action from the context menu. To print - click the print button.

Example

Example 1: multiple text + QR code

alt

Example 2: two images + text with frame, white on red

alt

Example 3: barcode with text, text, image

alt

About the name

The name "Labelle" is a multilingual pun by @claui.

Language Word/Interpretation Meaning Pronunciation (IPA) Simplified Phonetic Spelling
English Label A printed sticker /ˈleɪbəl/ LAY-buhl
French La belle The beautiful /la bɛl/ lah BEL
German Libelle (sounds like) Dragonfly /liˈbɛlə/ lee-BELL-uh

Disclaimers