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 remove 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.2.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.2-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: ssm_svg-0.0.2.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.2.tar.gz
Algorithm Hash digest
SHA256 2fbe0fa53a0439e5b17ef0cd667ddfedaae473951751108d6c960ff852922b2e
MD5 3324fa545784e432d3b5347dd5e93904
BLAKE2b-256 915756a968f0c415f63d6747b4edbe00d838f97387a3dcbf71db09da7ae3bdb8

See more details on using hashes here.

File details

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

File metadata

  • Download URL: ssm_svg-0.0.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ae7f7d64705367447f0de7cb06958bc9446e0bd7c53b74f27064dd42a65a07d8
MD5 13be319e4fa1bd73df78f032c0f596d4
BLAKE2b-256 a3b48b648da08d82682ca8ef630924686828b8c4f64afc255d145600e5deb6e4

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