From e9e64e95f59df2ab814ca48562af31487770bbf3 Mon Sep 17 00:00:00 2001 From: Aborelis Date: Wed, 15 May 2024 01:56:04 +0200 Subject: [PATCH] Docker support --- README.md | 34 +++++++++++++++++++++++----------- ag-docker.sh | 4 ++++ 2 files changed, 27 insertions(+), 11 deletions(-) create mode 100755 ag-docker.sh diff --git a/README.md b/README.md index bf5e635..329c21f 100644 --- a/README.md +++ b/README.md @@ -48,18 +48,14 @@ Besides generating ASN labels with a QR Code the tool can also # Getting started -You'll need Python 3 on your system. - -To install all dependencies use - -`` pip install -r requirements.txt `` - -# Usage +## Usage This tool is hightly flexible, almost all parameters can be controlled from the command line. Other Avery (or competitor's) label sizes can be added to `labelInfo` in `AveryLabels.py`. +You can install Python all dependencies yourself or use Docker. + ``` $ ./asn-gen.py -h @@ -101,7 +97,15 @@ _**Recommendation:** do test prints on normal paper before printing to the actua _**Note**: Make sure to set print size to 100%, not fit to page or similar._ -### Running the program from CLI + +## Running the program from CLI + +You'll need Python 3 on your system. + +To install all dependencies use + +`` pip install -r requirements.txt `` + Depending on your configuration either use `` ./asn-gen.py ... `` @@ -110,11 +114,19 @@ or `` python3 asn-gen.py ... `` -### Running the program from Docker +## Running the program from Docker + +If you don't want to install python and the dependencies on your machine you can use Docker. +There is a handy bash script : + +`` ./ag-docker.sh [normal parameters to asn-gen.py] `` + +e.g. `` ./ag-docker.sh $(pwd)/out -s 500001 `` + +_Note: when using docker you cannot specify the output filename. Instead the default scheme will be used._ - -### Output Filename +## Output Filename Scheme If the filename is omitted the output defaults to `` label----.pdf `` diff --git a/ag-docker.sh b/ag-docker.sh new file mode 100755 index 0000000..ae1d16c --- /dev/null +++ b/ag-docker.sh @@ -0,0 +1,4 @@ +#!/bin/bash + +path="$1"; shift +docker run --rm -v $path:/out ghcr.io/aborelis/asn-gen:latest ./asn-gen.py $@ /out/ \ No newline at end of file