QLI File Parser and SVG Conversion Tool
Project description
QLI SVG Converter
QLI provides a simple conversion of QLI format files to SVG files. QLI also supports conversion to raster file formats supported by the ImageMagic "convert" tool.
QLI files are the predominant format for the Statler Stitcher by Gammill®. The QLI format defines a collection of stitching paths. The file format is a subset of the Galil DMC language, although, no official information from Gammill has been made available.
This is provided in an open source format in the hope that someone else may find this useful.
Feel welcome to raise issues at: https://github.com/owebeeone/qli/issues
I make no promise to look at them but I will, time permitting. However raising issues will likely get a response while emailing me directly will likely not.
Installation
Install the package using pip:
pip install qli
You will need Python 3 and the svg.path Python package installed on
your computer. svg.path will be installed automatically when you install qli via pip.
Usage
To see the available options, run:
python -m qli.qli_to_svg --help
Examples
Convert a single file from QLI format to SVG:
python -m qli.qli_to_svg a-file.qli
This will create a-file.svg.
Convert an entire directory hierarchy of QLI files:
python -m qli.qli_to_svg --recursive --continue_on_error a-directory
All files named .qli will have a new file with the suffix replaced with .svg.
Remove the border on the generated files:
python -m qli.qli_to_svg --borders '' a-file.qli
Place the border on the shape extents:
python -m qli.qli_to_svg --borders 'green:0' a-file.qli
Add two borders:
python -m qli.qli_to_svg --borders 'blue:1,red:0' a-file.qli
The second border will be drawn directly on the shape extents.
Additionally convert to a PNG image:
python -m qli.qli_to_svg --raster_out png a-file.qli
The --raster_out parameter is a comma-separated list. You can specify raster types like png, jpeg, etc., supported by ImageMagick's convert tool. For advanced usage involving convert parameters, refer to the --help output.
Produce SVG with no margin or border and double wide lines:
python -m qli.qli_to_svg --margin 0x0 --borders '' --line_width 2 a-file.qli
The resulting file will have no border.
Command Line Options
usage: qli_to_svg.py [-h] [--oncolor ONCOLOR] [--offcolor OFFCOLOR] [--line_width LINE_WIDTH] [--margin MARGIN] [--width WIDTH] [--borders BORDERS]
[--recursive | --no-recursive] [--continue_on_error | --no-continue_on_error] [--out_dir OUT_DIR] [--out_name OUT_NAME]
[--suffix SUFFIX] [--print_progress | --no-print_progress] [--raster_image RASTER_IMAGE] [--raster_out RASTER_OUT]
[<file> ...]
Convert QLI pattern files to SVG.
positional arguments:
<file> input files
options:
-h, --help show this help message and exit
--oncolor ONCOLOR The color of the "on" path default: black
--offcolor OFFCOLOR The color of the "off" path default: red
--line_width LINE_WIDTH
Bigger numbers means thicker lines default: 1.0
--margin MARGIN Margin around image default: 50x50
--width WIDTH The image width (inside margin). Aspect ratio is maintained. default: 700.0
--borders BORDERS Comma separated list of borders default: blue:1
--recursive Perform recursive scan on directories. default: False
--no-recursive See --recursive
--continue_on_error Ignore parsing errors and omit the offending file. default: False
--no-continue_on_error
See --continue_on_error
--out_dir OUT_DIR Output directory format. default: {path_name}
--out_name OUT_NAME Output file name format. default: {base_name}.svg
--suffix SUFFIX Suffix filter for recursive search. default: qli
--print_progress Show progress of parsing. default: False
--no-print_progress See --print_progress
--raster_image RASTER_IMAGE
Add conversion to . default: <class 'str'>
--raster_out RASTER_OUT
Comma separated list of raster types to generate default:
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file qli-0.1.3.tar.gz.
File metadata
- Download URL: qli-0.1.3.tar.gz
- Upload date:
- Size: 29.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
1e0b88ef4eded77ecc0da419ebe111f842f718f086030c12f9ffeda39c6136f4
|
|
| MD5 |
2ed641358903c123211de7602248c430
|
|
| BLAKE2b-256 |
2fe269553112981d7e810104ed87642ca588e61f75ba3e039f2b8fd1b2247572
|
Provenance
The following attestation bundles were made for qli-0.1.3.tar.gz:
Publisher:
publish.yml on owebeeone/qli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qli-0.1.3.tar.gz -
Subject digest:
1e0b88ef4eded77ecc0da419ebe111f842f718f086030c12f9ffeda39c6136f4 - Sigstore transparency entry: 196100773
- Sigstore integration time:
-
Permalink:
owebeeone/qli@837692aed3c5aa5caea07b7d123ddfd1a8bf5442 -
Branch / Tag:
refs/tags/V0.1.3 - Owner: https://github.com/owebeeone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@837692aed3c5aa5caea07b7d123ddfd1a8bf5442 -
Trigger Event:
release
-
Statement type:
File details
Details for the file qli-0.1.3-py3-none-any.whl.
File metadata
- Download URL: qli-0.1.3-py3-none-any.whl
- Upload date:
- Size: 30.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f96a521e4f678ac550219ebac7fc10fbb2e52dfc0eb58814d77293e4f019e982
|
|
| MD5 |
6a721c5c8ff60da95d20f2542663c879
|
|
| BLAKE2b-256 |
08e38631d67431d037479e8cb72fff492c08727b7576f7028d41fda3a9fb493a
|
Provenance
The following attestation bundles were made for qli-0.1.3-py3-none-any.whl:
Publisher:
publish.yml on owebeeone/qli
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
qli-0.1.3-py3-none-any.whl -
Subject digest:
f96a521e4f678ac550219ebac7fc10fbb2e52dfc0eb58814d77293e4f019e982 - Sigstore transparency entry: 196100775
- Sigstore integration time:
-
Permalink:
owebeeone/qli@837692aed3c5aa5caea07b7d123ddfd1a8bf5442 -
Branch / Tag:
refs/tags/V0.1.3 - Owner: https://github.com/owebeeone
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@837692aed3c5aa5caea07b7d123ddfd1a8bf5442 -
Trigger Event:
release
-
Statement type: