https://github.com/meyt/svgout
Manipulate SVG elements and export variations
https://github.com/meyt/svgout
svg
Last synced: 3 months ago
JSON representation
Manipulate SVG elements and export variations
- Host: GitHub
- URL: https://github.com/meyt/svgout
- Owner: meyt
- Created: 2020-12-07T09:19:32.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-12-07T09:28:27.000Z (over 4 years ago)
- Last Synced: 2025-02-21T02:16:51.433Z (4 months ago)
- Topics: svg
- Language: Python
- Homepage:
- Size: 12.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# svgout
Manipulate SVG elements and export variations
## Install
On debian based distro:
```sh
sudo apt install libxml2-dev libxslt1-dev lib32z1-dev python3-dev
``````sh
pip install svgout
```## Usage
```txt
usage: svgout [-h] [-o OUTPUT_DIR] [-i INPUT_FILE] [-c CONFIG_FILE]optional arguments:
-h, --help show this help message and exit
-o OUTPUT_DIR, --output-dir OUTPUT_DIR
SVG files created into this directory, default: creates `dist` directory beside the `input_file`
-i INPUT_FILE, --input-file INPUT_FILE
Input SVG file path, default: trying to find first SVG file in current path
-c CONFIG_FILE, --config-file CONFIG_FILE
svgout YAML config path, default: `{input_file}.svgout.yml`
```## Configuration
Configuration structure in YAML format:
```yaml
OUTPUT_FILE_NAME:
COMMAND:
- ELEMENT_ID_REGEX
```Example:
```yaml
first:
hide:
- element-1
- element-2
show:
- element-3second:
hide:
- element-*
show:
- element-3
```That config will generate two file with names `first.svg` and `second.svg`.
Available commands:
- hide
- show