Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cd svgs/depot
- dark=363b40
- echo Fill and stroke colors before:
- grep 'opacity:1;fill:#' *.svg|awk -F 'fill' '{print $2}'|sort|uniq -c|sort -nr
- grep 'opacity:1;stroke:#' *.svg|awk -F 'stroke' '{print $2}'|sort|uniq -c|sort -nr
- grep 'fill:none;stroke:#' *.svg|awk -F 'stroke' '{print $2}'|sort|uniq -c|sort -nr
- grep 'fill:#......;opacity:1' *.svg|awk -F 'fill' '{print $2}'|awk -F ';opacity' '{print $1}'|sort|uniq -c|sort -nr
- grep 'fill:#......;fill-opacity:1' *.svg|awk -F 'fill' '{print $2}'|sort|uniq -c|sort -nr
- for i in *svg
- do
- for col in 009688 00bcd4 03a9f4 2196f3 3f51b5 4caf50 607d8b 673ab7 795548 8bc34a 9c27b0 9e9e9e cddc39 e91e5a e91e63 f44336 ff5722 ff9800 ffc107 ffeb3b
- do
- if [ `grep -hc 'opacity:1;fill:#'$col $i` != 0 ]
- then
- sed -i -e 's/opacity:1;fill:#'$col'/opacity:1;fill:#'$dark'/g' $i
- fi
- if [ `grep -hc 'opacity:1;stroke:#'$col $i` != 0 ]
- then
- sed -i -e 's/opacity:1;stroke:#'$col'/opacity:1;stroke:#'$dark'/g' $i
- fi
- if [ `grep -hc 'fill:none;stroke:#'$col $i` != 0 ]
- then
- sed -i -e 's/fill:none;stroke:#'$col'/fill:none;stroke:#'$dark'/g' $i
- fi
- if [ `grep -hc 'fill:#'$col';opacity:1' $i` != 0 ]
- then
- sed -i -e 's/fill:#'$col';opacity:1/fill:#'$dark';opacity:1/g' $i
- fi
- if [ `grep -hc 'fill:#'$col';fill-opacity:1' $i` != 0 ]
- then
- sed -i -e 's/fill:#'$col';fill-opacity:1/fill:#'$dark';opacity:1/g' $i
- fi
- done
- done
- echo Fill and stroke colors after:
- grep 'opacity:1;fill:#' *.svg|awk -F 'fill' '{print $2}'|sort|uniq -c|sort -nr
- grep 'opacity:1;stroke:#' *.svg|awk -F 'stroke' '{print $2}'|sort|uniq -c|sort -nr
- grep 'fill:none;stroke:#' *.svg|awk -F 'stroke' '{print $2}'|sort|uniq -c|sort -nr
- grep 'fill:#......;opacity:1' *.svg|awk -F 'fill' '{print $2}'|awk -F ';opacity' '{print $1}'|sort|uniq -c|sort -nr
- grep 'fill:#......;fill-opacity:1' *.svg|awk -F 'fill' '{print $2}'|sort|uniq -c|sort -nr
- cd ../..
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement