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.
Metadata
Release files for psvg-cli 0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| psvg-cli-0.2.tar.gz | 6.1 kB | Details |
Release files / psvg-cli-0.2.tar.gz
| Download URL | psvg-cli-0.2.tar.gz |
|---|---|
| Size | 6.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
dc2a74ad0c0612d486c49b2f32021cc6309d69d00f6ce1c93035c5d949b36e64
|
|
BLAKE2b-256 checksum How to use checksums |
6eae3480852dc17f07abafd687efc195583af65ae097932ae7090c92a59bd60e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is 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
|