Skip to main content

Transactions on existing SVG documents: inject/extract/modify

Project description

svg|pipe Transactions for existing SVG documents

inject data and SVG content into an existing document, keeping its structure intact.

extract data and SVG content from an existing document (planned).

transfer data, attributes, etc. between existing SVG elements (planned).

Motivation

Graphics applications are often picky (extremely picky) about the formatting of graphics documents. In order to have SVG files interpreted by your/everybodies favourite vector graphics application, the file structure not only needs to follow the SVG specs, but should follow a precise structure of layers, ids, and other unwritten conventions.

The project wants to facilitate transactions on existing documents for graphics-based workflows:

  • automated SVG generation (e.g. for data visualisation)
  • smooth integration with interactive vector graphics/CAD applications
  • automated data-import into complex pre-formatted graphics documents for visualisation

Philosophy

svg|pipe not only uses SVG documents for import/export of graphical content into/from some existing stock of data. SVG documents are XML documents and can serve as data structures themselves.

Requirements and Installation

Currently under development using:

  • Python 3.7
  • Pytest 5.2.2.

Tests

run tests

pytest

visual inspection of test results

To get a file output of the SVG content involved in the testing:

  • Set environment variable SVGPIPE_TEST_SVG_OUT to point to the desired output directory.
  • Make sure the directory/folder exists.

After the test run, for each svg injection test there will be three SVG files:

  • XXXX_test.svg (before the injection)
  • XXXX_result.svg (what was actually the case after the injection)
  • XXXX_expect.svg (what should be the case after the injection)

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

svgpipe-0.1.0.tar.gz (11.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

svgpipe-0.1.0-py3-none-any.whl (11.5 kB view details)

Uploaded Python 3

File details

Details for the file svgpipe-0.1.0.tar.gz.

File metadata

  • Download URL: svgpipe-0.1.0.tar.gz
  • Upload date:
  • Size: 11.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for svgpipe-0.1.0.tar.gz
Algorithm Hash digest
SHA256 12275a881f178520f1f83c0a08fcf4c4f44a0a3bebcd96da213da50f87358e9f
MD5 b3282d3e98314297678db14f1db0cbb0
BLAKE2b-256 66780c709f7fab9e3186c3165e711b06d915de0a311fff5033e17bf853555b53

See more details on using hashes here.

File details

Details for the file svgpipe-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: svgpipe-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 11.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.6.0 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.7.4

File hashes

Hashes for svgpipe-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4383b0f5220b9f1371a5022a0c392f217a9a1f48145cda24ea8ff65058ce84b6
MD5 1785e4b5b7cb1e37a1e75d406594882f
BLAKE2b-256 1b6d6fe73985d6ced1eb86a2e5c926473de28930e36f436b403cce35bc141f2f

See more details on using hashes here.

Supported by

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