mirror of
https://github.com/entropia/paperless-asn-qr-codes.git
synced 2024-05-08 19:06:43 +00:00
Compare commits
2 commits
d2cc755e44
...
9d3aa8416b
Author | SHA1 | Date | |
---|---|---|---|
9d3aa8416b | |||
1ee19e2e46 |
|
@ -18,6 +18,11 @@ Default is Avery L4731.
|
|||
Currently tested and known working are:
|
||||
- Avery L4731 (DIN A4 Labels)
|
||||
|
||||
## Tips & Tricks
|
||||
|
||||
In case your printer has alignment issues, you can generate a PDF with borders around the labels by using the
|
||||
`--border` option.
|
||||
|
||||
## License
|
||||
|
||||
`paperless-asn-qr-codes` is distributed under the terms of the
|
||||
|
|
|
@ -92,7 +92,7 @@ BUSINESS_CARDS = 5371
|
|||
|
||||
|
||||
class AveryLabel:
|
||||
def __init__(self, label, **kwargs):
|
||||
def __init__(self, label, debug, **kwargs):
|
||||
data = labelInfo[label]
|
||||
self.across = data.labels_horizontal
|
||||
self.down = data.labels_vertical
|
||||
|
@ -103,7 +103,7 @@ class AveryLabel:
|
|||
)
|
||||
self.margins = data.margin
|
||||
self.topDown = True
|
||||
self.debug = False
|
||||
self.debug = debug
|
||||
self.pagesize = data.pagesize
|
||||
self.position = 0
|
||||
self.__dict__.update(kwargs)
|
||||
|
|
|
@ -26,10 +26,13 @@ def main():
|
|||
parser.add_argument(
|
||||
"--format", choices=avery_labels.labelInfo.keys(), default="averyL4731"
|
||||
)
|
||||
parser.add_argument(
|
||||
"--border", action='store_true', help="Display borders around labels, useful for debugging the printer alignment"
|
||||
)
|
||||
args = parser.parse_args()
|
||||
global startASN
|
||||
startASN = int(args.start_asn)
|
||||
label = avery_labels.AveryLabel(args.format)
|
||||
label = avery_labels.AveryLabel(args.format, args.border)
|
||||
label.open(args.output_file)
|
||||
# by default, we render all labels possible on a single sheet
|
||||
count = (
|
||||
|
|
|
@ -29,9 +29,9 @@ dependencies = [
|
|||
dynamic = ["version"]
|
||||
|
||||
[project.urls]
|
||||
Documentation = "https://git.jcg.re/jcgruenhage/paperless-asn-qr-codes#readme"
|
||||
Issues = "https://git.jcg.re/jcgruenhage/paperless-asn-qr-codes/issues"
|
||||
Source = "https://git.jcg.re/jcgruenhage/paperless-asn-qr-codes"
|
||||
Documentation = "https://github.com/entropia/paperless-asn-qr-codes#readme"
|
||||
Issues = "https://github.com/entropia/paperless-asn-qr-codes/issues"
|
||||
Source = "https://github.com/entropia/paperless-asn-qr-codes"
|
||||
|
||||
[project.scripts]
|
||||
paperless-asn-qr-codes = "paperless_asn_qr_codes.main:main"
|
||||
|
|
Loading…
Reference in a new issue