Last active
November 25, 2021 23:40
-
-
Save MInner/d31604fb0b10c25a99dfe414ba3406eb to your computer and use it in GitHub Desktop.
Revisions
-
MInner revised this gist
Nov 25, 2021 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,4 +1,6 @@ find . -name '*.png' | while read line; do echo ${line}; convert -resize 70% ${line} ${line}.small.png; pngquant --speed 1 ${line}.small.png -o ${line}.quant.png; done find . -name '*.small.png' | while read line; do rm $line; done read -p "Press [Enter] if you are happy with *.quant.png images, otherwise press Ctrl-C." find . -name '*.quant.png' | while read line; do mv ${line} ${line:0:-10}; done for EXT in png pdf; do find -name "*.${EXT}" | while read line; do echo $line; done; done | while read line; do if ! grep -q -r --include \*.tex ${line#*/} .; then echo ${line}; rm ${line}; fi; done -
MInner created this gist
Oct 19, 2021 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,4 @@ find . -name '*.png' | while read line; do echo ${line}; convert -resize 70% ${line} ${line}.small.png; pngquant --speed 1 ${line}.small.png -o ${line}.quant.png; done find . -name '*.small.png' | while read line; do rm $line; done read -p "Press [Enter] if you are happy with *.quant.png images, otherwise press Ctrl-C." find . -name '*.quant.png' | while read line; do mv ${line} ${line:0:-10}; done