使用Rambo将你的图像压缩到CSS精灵
项目描述
一个命令行精灵工具,可以将你的图像压缩到精灵中。
包括由Joe Wezorek编写的pypacker。
功能
自动支持多种精灵分辨率(基于文件夹名称)
pngcrush以实现低脂肪饮食
生成一个HTML测试页面,以便可以预览你的精灵
Python,因此它非常快
设置你的图像
你需要将你的精灵图像放入子文件夹中,每个像素纵横比一个文件夹。
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/
用法
pip install rambo
然后从命令行运行rambo
rambo --input "images/sprites" --output "images" --csspath "css" --cssfile "_sprites.scss" --sasspath "sass/sprites" --testpage_dir "site" --testpage_name "test_page.html"
参数
-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
项目详情
关闭
rambo-0.1.1.2.4.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 45e0718947b2e419243d8b01c986d0707eed0a3848df72f9aa0e69047e25aefc |
|
MD5 | 351967868b3d26d40d077c279d1e7d5f |
|
BLAKE2b-256 | 99b283054b8a6f9c461f7af7e02ed8f7a5e2966372682263e56e9a9bd14918c7 |