Skip to main content

Very simple web-app to generate courier-sized labels with QR code for InPost returns (10-digit codes, usually from Allegro).

Project description

InPostReturnLabel

Very simple web-app to generate courier-sized labels with QR code for InPost returns (10-digit codes, usually from Allegro).

Obviously, this is not affiliated with neither InPost nor Allegro and only exists because I'm too lazy to write codes down by hand and to get my phone to open parcel locker from the app.

The concept is to input 10-digit code and program sends QR and code itself to label printer loaded with courier-sized labels (approx 100x150mm).

Current limitations

  • For printing, CLI assumes there's lpr on UNIX system. This should be handled better.
  • Label template relies on Monaco font, which is not bunlded. Instead default option is to point to macOS /System/Library/Fonts/Monaco.ttf and user can override that. If font can't be bundled, there should be discovery process or some local config file.

What's there - work in progress

CLI

Simple CLI to send to local printer using lpr or open file if no printer is provided.

Help:

❯ InPostReturnLabel --help
Usage: InPostReturnLabel [OPTIONS] CODE

  InPostReturnLabel

  CODE is InPost return label code, 10 digits, e.g. 1234567890

Options:
  --version           Show the version and exit.
  -p, --printer TEXT  Local CUPS printer name; if ommited, then file will be
                      opened
  -f, --font TEXT     Path to font file, default:
                      /System/Library/Fonts/Monaco.ttf
  --help              Show this message and exit.

Example:

❯ InPostReturnLabel -f /System/Library/Fonts/Monaco.ttf -p intermec 1234567890
Label generated and stored at /var/folders/y0/xhrlswfd40gbzh5m50cbp1fxr3p32g/T/tmpi9nb7pts.png
Sending label to intermec

Simple web-app - TBD

The goal is to load it on home Docker/k8s and start printing over network.

Technical background

InPost parcel lockers accept returns by entering 10-digit code - either from keypad on device or by scanning QR code. The only tricky bit here is that parcel lockers can only read numeric mode and most common QR generators insist on generating them in alphanumeric mode, even when only digits 0-9 are provided.

Example label

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

inpostreturnlabel-0.0.1.tar.gz (21.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

inpostreturnlabel-0.0.1-py3-none-any.whl (5.9 kB view details)

Uploaded Python 3

File details

Details for the file inpostreturnlabel-0.0.1.tar.gz.

File metadata

  • Download URL: inpostreturnlabel-0.0.1.tar.gz
  • Upload date:
  • Size: 21.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for inpostreturnlabel-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d1fb3526f2f5b5dbf815373f9204465a54c2e1a33deaacf2e248018a084727b7
MD5 76cb21d82bbbba928efe09992c45b11f
BLAKE2b-256 16a912a97601acf7cb7a209af0ab860a8403d832d63e0590f57bb19fd3b74b26

See more details on using hashes here.

File details

Details for the file inpostreturnlabel-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for inpostreturnlabel-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3f0fdcce5bedea8fe2fe50bfdf5feba03d56e0418bd529d1309858d454992479
MD5 49ba198c6eb7a4b8c41cc958a9a03310
BLAKE2b-256 833995aed5c2d016c67ad6c3bb111218ff11c4f3c86d3dd80b38825bbd67ee89

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page