Skip to main content

Ram your images into CSS sprites with Rambo

Project description

A command line sprite tool for smashing your images into sprites.

Includes pypacker, written by Joe Wezorek.

Features

  • Automatic support for multiple sprite resolutions (based on folder names)

  • pngcrush for a low-fat diet

  • Produces an HTML test page so can preview your sprites

  • Python, so it’s blazing fast

Set up your images

You’ll need to drop your sprite images in a sub-folder for each pixel aspect ratio.

Eg, sprites/
      foo/           (the 1x has no prefix. Your sprite will be called this.)
      foo-0.75x/     (smaller than 1x for poxy androids. Use the same base-name `foo`)
      foo-1.5x/      (android pseudo-retina)
      foo-2x/        (true retina)
      bar/
      bar-2x/

Usage

pip install rambo

Then run rambo from the command line:

rambo --input "images/sprites" --output "images" --csspath "css" --cssfile "_sprites.scss" --sasspath "sass/sprites" --testpage_dir "site" --testpage_name "test_page.html"

Arguments

-h, --help                show this help message and exit
--input INPUT             Input directory, images/sprites
--output OUTPUT           Output directory, images/
--cssfile CSSFILE         CSS filename, _sprites.scss
--csspath CSSPATH         CSS output path, css
--sasspath SASSPATH       SaSS output path,  sass/sprites
--testpage_dir TEST_DIR   Cheat sheet dir, site/
--testpage_name TESTPAGE  Cheat sheet, cheat_sheet.html

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

rambo-0.1.1.2.4.tar.gz (12.6 kB view details)

Uploaded Source

File details

Details for the file rambo-0.1.1.2.4.tar.gz.

File metadata

  • Download URL: rambo-0.1.1.2.4.tar.gz
  • Upload date:
  • Size: 12.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for rambo-0.1.1.2.4.tar.gz
Algorithm Hash digest
SHA256 45e0718947b2e419243d8b01c986d0707eed0a3848df72f9aa0e69047e25aefc
MD5 351967868b3d26d40d077c279d1e7d5f
BLAKE2b-256 99b283054b8a6f9c461f7af7e02ed8f7a5e2966372682263e56e9a9bd14918c7

See more details on using hashes here.

Supported by

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