entropia / paperless-asn-qr-codes

GNU General Public License v3.0
32 stars 20 forks source link

paperless-asn-qr-codes

paperless-asn-qr-codes is a command line utility for generating ASN labels for paperless with both a human-readable representation, as well as a QR code for machine consumption. The labels are Avery 4731 labels.

Installation

pip install paperless-asn-qr-codes

Usage

usage: paperless-asn-qr-codes [-h] [--format {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371}] [--digits DIGITS] [--border] [--row-wise] [--num-labels NUM_LABELS] [--pages PAGES]
                              [--start-position START_POSITION]
                              start_asn output_file

CLI Tool for generating paperless ASN labels with QR codes

positional arguments:
  start_asn             The value of the first ASN
  output_file           The output file to write to (default: labels.pdf)

options:
  -h, --help            show this help message and exit
  --format {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371}, -f {averyL4731,avery5160,avery5161,avery5163,avery5167,avery5371}
  --digits DIGITS, -d DIGITS
                        Number of digits in the ASN (default: 7, produces 'ASN0000001')
  --border, -b          Display borders around labels, useful for debugging the printer alignment
  --row-wise, -r        Increment the ASNs row-wise, go from left to right
  --num-labels NUM_LABELS, -n NUM_LABELS
                        Number of labels to be printed on the sheet
  --pages PAGES, -p PAGES
                        Number of pages to be printed, ignored if NUM_LABELS is set (default: 1)
  --start-position START_POSITION, -s START_POSITION
                        Define the starting position on the sheet, eighter as ROW:COLUMN or COUNT, both starting from 1 (default: 1:1 or 1)

Mandatory arguments

Optional arguments


Supported Sheets

Some different sheet types are supported with the -f/--format argument, however, not all are tested.

The default is Avery L4731.

Currently tested and known working are:

Tips & Tricks

In case your printer has alignment issues, you can generate a PDF with borders around the labels by using the -b/--border option.

License

paperless-asn-qr-codes is distributed under the terms of the GPL-3.0 license.