Apply transformations to Parametric SVG files
Project description
Parametric SVG Utility
psvg-cli
is a commandline utility for applying various transformations to Parametric SVG files.
It is written in Python, using the click library for commandline interfaces, and follows the same pattern as the imagepipe example for multi-command chaining.
You can access help for the tool as a whole (psvg-cli --help
), or for a specific command (psvg-cli process --help
), or a subcommand (psvg-cli process open --help
).
Installation
You can install the latest release from pypi using pip install psvg-cli
Alternatively, you can install from the source code in this repository by running:
git clone https://github.com/jamesscottbrown/psvg-cli.git
cd psvg-cli
python setup.py install
Examples
psvg-cli parameters glyph_definitions/*
psvg-cli process opendir ./glyph_definitions \
remove_parametric_params save
psvg-cli process \
open -i glyph_definitions/Aptamer.svg -i glyph_definitions/CDS.svg \
remove_parametric_params save
psvg-cli process \
open -i glyph_definitions/Aptamer.svg -i glyph_definitions/CDS.svg remove_parametric_params \
save --format all
psvg-cli process \
open -i glyph_definitions/Aptamer.svg -i glyph_definitions/CDS.svg \
remove_parametric_params delete_by_class -c baseline save
psvg-cli process open -i glyph_definitions/Aptamer.svg apply_transformation save
psvg-cli process \
open -i glyph_definitions/Aptamer.svg \
style_class -c "baseline" -s "opacity:1;fill:none;fill-opacity:1;stroke:#b3b3b3;stroke-width:0.49999994; stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:1,0.5; stroke-dashoffset:0;stroke-opacity:1" \
save
psvg-cli process \
open -i glyph_definitions/Aptamer.svg \
substitute -o width -n w \
save
By default, the results of process
commands will be written to a ./processed
directory.
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
File details
Details for the file psvg-cli-0.2.tar.gz
.
File metadata
- Download URL: psvg-cli-0.2.tar.gz
- Upload date:
- Size: 6.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dc2a74ad0c0612d486c49b2f32021cc6309d69d00f6ce1c93035c5d949b36e64 |
|
MD5 | d7133be350b1b12f4c2697a6146bb3d8 |
|
BLAKE2b-256 | 6eae3480852dc17f07abafd687efc195583af65ae097932ae7090c92a59bd60e |