Skip to content
/ tapen Public

Print labels on Brother PTouch label printers with highly customizable HTML templates

License

Notifications You must be signed in to change notification settings

corvis/tapen

Repository files navigation

Tapen Picture

Tapen


Tapen is a tool for composing and printing labels on label printers. At the moment only Brother printers are supported. Developed and tested on linux only.

Basic Usage

Just print a line of text covering all available height of the tape:

tapen print "Hello world"

Shortcut version: tpp "Hello world".

Note: Short syntax (tpp ... command is equal to tapen print ...). Here and bellow in the docs we will use short syntax for simplicity.

Print multiple labels at time:

tpp "Label 1" "label 2" "Label 3"

Print 2 copies of of each label:

tpp -q 2 "Label 1" "Label 2"

Installation

There are a couple of possible installation methods:

  1. With pipx (recommended, works for all platforms): pipx install tapen
  2. With pip: pip install tapen
  3. Use pre-compiled binary. Just download binary from releases page. At the moment only linux x64 binary is available.

Usage guide

Libraries

Library is a collection of templates to be used for printing. You can connect a library using tapen import-lib command. The general syntax is:

tapen import-lib <library-name> <library-locator>

Where:

  • library-name - name you will be using to refer to the library locally. You decide how you want to call the library, however the name should be unique for your local installation.
  • library-locator - locator pointing the library. It can be a path to a local directory or a URL to a remote library. The exact syntax depends on the storage. See below for details.

There are a few library storages supported:

Storage Locator syntax Description
Local directory local:/path/to/library Path to a directory containing library files.
Github repository github://owner/repo[@tag-or-branch] Github repository containing library files, optionaly you can include the tag or branch name. Example: github://JointBox/labels@master

Examples:

# Import library from local directory
tapen import-lib my-lib1 local:/path/to/library
# Import library from github repository
tapen import-lib my-lib2 github://JointBox/labels
tapen import-lib my-lib3 github://JointBox/labels@master

Credits

  • Dmitry Berezovsky (@corvis) - author and main maintainer
  • Dominic Radermacher (blip@mockmoon-cybernetics.ch) - creator of libptouch, the source code of this library was used to understand the interface to Brotehr devices.
  • CLI Rack

Disclaimer

This module is licensed under MIT. This means you are free to use it in commercial projects.

The GPLv3 license clearly explains that there is no warranty for this free software. Please see the included LICENSE file for details.