Scour - An SVG Optimizer / Cleaner
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 年前 | ||
| 5 年前 | ||
| 12 年前 | ||
| 5 年前 | ||
| 4 年前 | ||
| 4 年前 | ||
| 12 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 12 年前 | ||
| 4 年前 | ||
| 6 年前 | ||
| 5 年前 | ||
| 5 年前 |
以下内容由 AI 翻译,如有问题请 点此提交 issue 反馈
Scour
Scour 是一个用 Python 编写的 SVG 优化/清理工具,通过优化结构和移除不必要的数据来减小可缩放矢量图形的大小。
它可用于创建适合网络部署、发布/共享或进一步处理的精简矢量图形。
Scour 的目标是输出一个文件,在移除大量由大多数 SVG 编辑器创建的冗余信息后,文件大小仅为原文件的一小部分,但渲染效果保持不变。优化选项通常是无损的,但也可以调整以进行更为彻底的清理。
Scour 是开源软件,遵循 Apache 许可证 2.0。
Scour 最初由 Jeff "codedread" Schiller 和 Louis Simard 在 2010 年开发。 该项目在 2013 年迁移至 GitLab,现在由 Tobias "oberstet" Oberstein 和 Patrick "Ede_123" Storz 维护。
安装
Scour 需要 Python 2.7 或 3.4 及以上版本。安装时,请使用 pip。
要从 PyPI 安装 最新版本 的 Scour:
pip install scour
要安装来自 GitHub 的最新主干版本(可能会出现问题!):
从 [latest trunk](https://github.com/codedread/scour) 进行安装:
pip install https://github.com/codedread/scour/archive/master.zip
使用方法
标准:
scour -i input.svg -o output.svg
更好的(适用于旧版本的Internet Explorer):
scour -i input.svg -o output.svg --enable-viewboxing
最大清洗程度:
scour -i input.svg -o output.svg --enable-viewboxing --enable-id-stripping \
--enable-comment-stripping --shorten-ids --indent=none
最大擦除和压缩的 SVGZ 文件:
scour -i input.svg -o output.svgz --enable-viewboxing --enable-id-stripping \
--enable-comment-stripping --shorten-ids --indent=none
当然可以,不过请您提供需要翻译的英文文本,这样我才能进行翻译。