papirus-icon-theme/tools/README.md

22 lines
836 B
Markdown
Raw Normal View History

2016-12-05 16:33:56 -05:00
# Tools
2016-12-07 16:59:10 -05:00
* `run_on_dirs.sh DIRECTORY...` — optimizes and fixes SVG files in the directory
* `run_on_files.sh FILE...` — optimizes and fixes the SVG files
* `_fix_color_scheme.sh FILE...` — looks in the SVG files for certain colors and replaces them with the corresponding stylesheet class. Fixes the color scheme after Inkscape
2016-12-05 16:33:56 -05:00
* `svgo.yml` — [SVGO](https://github.com/svg/svgo) configuraion
## Useful snippets
2016-12-07 16:59:10 -05:00
Optimize and fix SVG files that are added or modified but not committed (recommended)
2016-12-05 16:33:56 -05:00
```
2016-12-07 16:59:10 -05:00
git status --porcelain | awk '/A|M/{print $2}' | xargs ./tools/run_on_files.sh
2016-12-05 16:33:56 -05:00
```
2016-12-07 16:59:10 -05:00
Optimize and fix SVG files that are committed in [043906b](https://github.com/PapirusDevelopmentTeam/papirus-icon-theme/commit/043906b0edbcc86b732640bc391898d0aaaa410c)
2016-12-05 16:33:56 -05:00
```
git show --name-only 043906b | xargs ./tools/run_on_files.sh
```