create SVG files with python scripts
Project description
SVGpy
This is a basic library written in python for creating simple svgs with python scripts.
Table of Contents:
[[TOC]]
Files:
| File | Description |
|---|---|
savager/__init__.py |
imports library |
savager/file.py |
file class used to write svg files |
savager/element.py |
used by file class to generate elements in svg |
flower.py |
example of use, generates flower.svg |
flower.svg |
example svg generated by flower.py |
setup.py |
this enables import as a python library |
LICENSE |
You have full permission to use and modify this library, just please pass on that privilege. |
README.md |
this file |
Importing this library:
pip:
$ pip install git+https://gitlab.com/pyrogue6/savager.git
pip for development while in repo:
$ pip install -e .
coming soon to PyPI:
$ pip install savager
Notes
- Resource heavily used: https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial
- This library uses xlink:href instead of the href standard in blocks to maintain compatability with eog (EyeOfGnome)
- path parameters use underscores instead of dashes, and are converted back to dashes when writing to svg files
this could be solved by unpacking a dictionary every time you want to add parameters that use dashes, but that's pretty ugly - we believe in tabs here, sorry.
TODO
Key
[+] feature to be added
[x] change in code
[-] bug to be removed
[?] uncertain how to proceed
Tasks
[+] manipulate paths within SVG class
[+] easily add function-defined paths
[+] circles and elipses
[+] error handling especially in writing to files!
[+] css stylesheets for reducing file sizes?
└── https://developer.mozilla.org/en-US/docs/Web/SVG/Tutorial/Fills_and_Strokes
[+] need way to add controls easily
├── optional arg for a control gen?
└── incorporated into coord gen? tuple for all paired controls?
[x] Split path and SVG classes into seperate files?
[x] make demo or doctest directory for extraneous files
[+] test_suite for setup to enhance unittests
├── https://setuptools.readthedocs.io/en/latest/setuptools.html
└── also write unittests, woops
[x] use scm metadata to setup
└── https://pypi.org/project/setuptools-scm/
[+] upload to PyPI
└── update badges!
[?] change project name to match library name?
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 savager-0.1.tar.gz.
File metadata
- Download URL: savager-0.1.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.1 CPython/3.7.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
032c5f52850724f8ed3a20a3c409f40907904c342f5cee55d07ee0e7b6f410aa
|
|
| MD5 |
abbf868f9acad8c727dcb575b1a612ce
|
|
| BLAKE2b-256 |
152758e1c768154457d3bc054a003d529022550787d85b267bfcdf8bb0c7e4b9
|