A Python-based web service to print labels on Brother QL label printers. Based on brother_ql: https://github.com/pklaus/brother_ql
Go to file
2017-09-11 12:01:20 +02:00
static fix: fonts missing in 1c74517 2017-01-24 15:31:27 +01:00
views some more candy (glyphicons) in the web UI 2017-02-10 10:49:27 +01:00
brother_ql_web.py empty line → line containing ' ' (workaround for #5) 2017-09-11 12:01:20 +02:00
font_helpers.py restructuring the label creation a lot for /api/preview/text/xyz 2016-11-21 11:39:09 +01:00
README.md --default-label-size and --default-orientation 2017-02-06 14:10:13 +01:00
requirements.txt requirements: removing unnecessary markdown & numpy 2016-12-10 14:45:49 +01:00

brother_ql_web

This is a web service to print labels on Brother QL label printers.

It offers:

  • a Web GUI allowing you to print your labels at /labeldesigner,
  • an API at /api/print/text/Your_Text?font_size=100&font_family=Minion%20Pro&font_style=Semibold to print a label containing 'Your Text' with the specified font properties.

You need Python 3 for this software to work.

Installation

Get the code:

git clone https://github.com/pklaus/brother_ql_web.git

or download the ZIP file and unpack it.

Install the requirements:

pip install -r requirements.txt

Usage

To start the server, run ./brother_ql_web.py. Here's its command line interface:

usage: brother_ql_web.py [-h] [--port PORT] [--loglevel LOGLEVEL]
                         [--font-folder FONT_FOLDER]
                         [--default-label-size DEFAULT_LABEL_SIZE]
                         [--default-orientation {standard,rotated}]
                         [--model {QL-500,QL-550,QL-560,QL-570,QL-580N,QL-650TD,QL-700,QL-710W,QL-720NW,QL-1050,QL-1060N}]
                         printer

This is a web service to print labels on Brother QL label printers.

positional arguments:
  printer               String descriptor for the printer to use (like
                        tcp://192.168.0.23:9100 or file:///dev/usb/lp0)

optional arguments:
  -h, --help            show this help message and exit
  --port PORT
  --loglevel LOGLEVEL
  --font-folder FONT_FOLDER
                        folder for additional .ttf/.otf fonts
  --default-label-size DEFAULT_LABEL_SIZE
                        Label size inserted in your printer. Defaults to 62.
  --default-orientation {standard,rotated}
                        Label orientation, defaults to "standard". To turn
                        your text by 90°, state "rotated".
  --model {QL-500,QL-550,QL-560,QL-570,QL-580N,QL-650TD,QL-700,QL-710W,QL-720NW,QL-1050,QL-1060N}
                        The model of your printer (default: QL-500)