2023-11-18 16:59:00 +00:00
# paperless-asn-qr-codes
`paperless-asn-qr-codes` is a command line utility for generating ASN labels
2024-01-22 06:56:37 +00:00
for paperless with both a human-readable representation, as well as a QR code
2023-11-18 16:59:00 +00:00
for machine consumption. The labels are Avery 4731 labels.
## Installation
```console
pip install paperless-asn-qr-codes
```
2024-01-22 06:56:37 +00:00
## Usage
```
2024-05-05 20:38:15 +00:00
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
2024-01-22 06:56:37 +00:00
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}
2024-01-15 15:09:54 +00:00
--digits DIGITS, -d DIGITS
Number of digits in the ASN (default: 7, produces 'ASN0000001')
2024-01-22 06:56:37 +00:00
--border, -b Display borders around labels, useful for debugging the printer alignment
2024-05-05 20:38:15 +00:00
--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)
2024-01-22 06:56:37 +00:00
```
### Mandatory arguments
- `<start_asn>` : The value of the first ASN to generate
### Optional arguments
- `<output_file>` : The name of the output file to write to (default: labels.pdf)
---
- `-h` , `--help` : Shows the help message
- `-f` , `--format` : Selects the format of the output sheet (see [Supported Sheets ](#supported-sheets ))
2024-01-15 15:09:54 +00:00
- `-d` , `--digits` : Specifies the number of digits in the ASN (e.g. for the default number 7, the ASN will look like 'ASN0000001')
2024-01-22 06:56:37 +00:00
- `-b` , `--border` : Generates the borders around the labels to help debug alignment issues (see [Tips & Tricks ](#tips--tricks ))
2024-05-05 20:38:15 +00:00
- `-r` , `--row-wise` : Increments the labels from left to right instead of top to bottom
- `-n` , `--num-labels` : Number of lables to be printed on the sheet
- `-p` , `--pages` : Number of pages to be generated, ignored if -n is present.
- `-s` , `--start-position` : Positon of first label to be printed, eighter defined as ROW:COLUMN or NUMBER. Starting from 1 eg. to use the whole sheet it would be 1:1 or 1. Useful if you have a partly used sheet from using `-n` .
2024-01-22 06:56:37 +00:00
2023-11-25 14:12:31 +00:00
## Supported Sheets
2024-01-22 06:56:37 +00:00
Some different sheet types are supported with the `-f` /`--format` argument, however, not all are tested.
2023-11-25 14:12:31 +00:00
2024-01-22 06:56:37 +00:00
The default is Avery L4731.
2023-11-25 14:12:31 +00:00
Currently tested and known working are:
- Avery L4731 (DIN A4 Labels)
2023-11-25 14:36:17 +00:00
## Tips & Tricks
In case your printer has alignment issues, you can generate a PDF with borders around the labels by using the
2024-01-22 06:56:37 +00:00
`-b` /`--border` option.
2023-11-25 14:36:17 +00:00
2023-11-18 16:59:00 +00:00
## License
`paperless-asn-qr-codes` is distributed under the terms of the
[GPL-3.0 ](https://spdx.org/licenses/GPL-3.0.html ) license.