Skip to main content

SVG spritesheet maker

Project description

ssm

SVG spritesheet maker

CI Deployment to PyPI

ssm is a simple approach to creating and managing SVG spritesheets. It has 5 main functions:

  • create: For creating spritesheets from a list of SVG sprites (i.e. SVG icons etc.)
  • list: For listing the SVG sprites stored in a spritesheet
  • add: For adding SVG sprites to an existing spritesheet
  • remove: For removing SVG sprites from an existing spritesheet
  • export: For exporting SVG sprites from an existing spritesheet. Can be used for converting a <symbol> back into a standalone <svg> or to display a format suitable for HTML (using <use>).

For more details, run python -m ssm -h after installation.

Installation

To install the most stable version of this package, run:

$ pip install ssm-svg

Usage example

Create spritesheet icons.svg with search.svg and menu.svg as sprites:

$ python -m ssm create -f icons.svg search.svg menu.svg

Create spritesheet and overwrite existing file:

$ python -m ssm create -f icons.svg search.svg menu.svg -F

Create spritesheet with custom ID hamburger-icon instead of defaulting to its file name:

$ python -m ssm create -f icons.svg search.svg hamburger-icon=menu.svg

List IDs of SVG sprites in spritesheet:

$ python -m ssm list -f icons.svg

Add SVG sprites to spritesheet:

$ python -m ssm add -f icons.svg facebook.svg instagram.svg

Remove SVG sprites with IDs facebook and instagram from spritesheet:

$ python -m ssm remove -f icons.svg facebook instagram

NOTE: Inserting the same ID more than once would cause an error.

Add SVG sprites to spritesheet with custom ID fb-icon instead of defaulting to its file name:

$ python -m ssm add -f icons.svg fb-icon=facebook.svg

Export sprite with ID search from spritesheet:

$ python -m ssm export -f icons.svg search

Export sprite with ID search from spritesheet for use in HTML:

$ python -m ssm export -f icons.svg search --use

License

MIT

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

ssm_svg-0.0.4.tar.gz (7.8 kB view details)

Uploaded Source

Built Distribution

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

ssm_svg-0.0.4-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

Details for the file ssm_svg-0.0.4.tar.gz.

File metadata

  • Download URL: ssm_svg-0.0.4.tar.gz
  • Upload date:
  • Size: 7.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for ssm_svg-0.0.4.tar.gz
Algorithm Hash digest
SHA256 57dc77eee1dec2ef98ea92ae2dcf421b767cf2e154a89f254d60b3f45d6bc5a1
MD5 7f13f5813a770e5964a9d080fc75d52d
BLAKE2b-256 eb19cfac1601ab86a98485005e8fe2b6abcff052a4636a9707ea5407d0cff0aa

See more details on using hashes here.

File details

Details for the file ssm_svg-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: ssm_svg-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 6.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for ssm_svg-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 cdda9bf140b5dcb99e5a5a56b540be1a4165540d2db4167092b43b49e13657ee
MD5 5049da9909a2a737874393a60e55c77d
BLAKE2b-256 e1162668265f41cdf2152c05076ab2fb84f14e119c0cdc2f20ab8201f4f939ae

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