Skip to main content

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).

Examples

psvg-cli parameters glyph_definitions/*

psvg-cli process opendir ./glyph_definitions -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
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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

psvg-cli-0.1.tar.gz (6.0 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page