mirror of
https://github.com/aborelis/ASN-Label-Generator.git
synced 2026-03-14 16:43:27 +00:00
Docker support
This commit is contained in:
parent
de48bf919a
commit
e9e64e95f5
2 changed files with 27 additions and 11 deletions
34
README.md
34
README.md
|
|
@ -48,18 +48,14 @@ Besides generating ASN labels with a QR Code the tool can also
|
||||||
|
|
||||||
# Getting started
|
# Getting started
|
||||||
|
|
||||||
You'll need Python 3 on your system.
|
## Usage
|
||||||
|
|
||||||
To install all dependencies use
|
|
||||||
|
|
||||||
`` pip install -r requirements.txt ``
|
|
||||||
|
|
||||||
# Usage
|
|
||||||
|
|
||||||
This tool is hightly flexible, almost all parameters can be controlled from the command line.
|
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`.
|
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
|
$ ./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._
|
_**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
|
Depending on your configuration either use
|
||||||
|
|
||||||
`` ./asn-gen.py ... ``
|
`` ./asn-gen.py ... ``
|
||||||
|
|
@ -110,11 +114,19 @@ or
|
||||||
|
|
||||||
`` python3 asn-gen.py ... ``
|
`` 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 <output directory> [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 Scheme
|
||||||
### Output Filename
|
|
||||||
If the filename is omitted the output defaults to
|
If the filename is omitted the output defaults to
|
||||||
|
|
||||||
`` label-<labeltype>-<prefix>-<first-asn>-<first-asn+number>.pdf ``
|
`` label-<labeltype>-<prefix>-<first-asn>-<first-asn+number>.pdf ``
|
||||||
|
|
|
||||||
4
ag-docker.sh
Executable file
4
ag-docker.sh
Executable file
|
|
@ -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/
|
||||||
Loading…
Add table
Add a link
Reference in a new issue