diff options
author | codecalm <codecalm@gmail.com> | 2022-03-12 23:42:15 +0100 |
---|---|---|
committer | codecalm <codecalm@gmail.com> | 2022-03-12 23:42:15 +0100 |
commit | 9c4af5ceb839a7a91e3959fdf0f8e8711beefd56 (patch) | |
tree | 0dcf1da005fe14582de9a2f2acd462a9f760130f /_import.sh | |
parent | Release 1.54.0 (diff) | |
download | tabler-icons-9c4af5ceb839a7a91e3959fdf0f8e8711beefd56.tar.xz |
New import script
Diffstat (limited to '_import.sh')
-rwxr-xr-x | _import.sh | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/_import.sh b/_import.sh new file mode 100755 index 00000000..2b7b35ed --- /dev/null +++ b/_import.sh @@ -0,0 +1,33 @@ +#!/bin/bash + +rm ./new/Artboard.svg + +for file in ./new/*.svg +do + echo "${file}" + sed -i "" 's/---//g' ${file} + sed -i "" 's/fill="none"//g' ${file} + sed -i "" 's/fill-rule="evenodd"//g' ${file} + sed -i "" 's/stroke-linecap="round"//g' ${file} + sed -i "" 's/stroke-linejoin="round"//g' ${file} + sed -i "" 's/viewBox="0 0 24 24"//g' ${file} + sed -i "" 's/stroke="#000000"//g' ${file} + sed -i "" 's/stroke="#000"//g' ${file} + sed -i "" 's/stroke-width="2"//g' ${file} + sed -i "" 's/width="24"//g' ${file} + sed -i "" 's/width="24px"//g' ${file} + sed -i "" 's/height="24"//g' ${file} + sed -i "" 's/height="24px"//g' ${file} + sed -i "" 's/xmlns="http:\/\/www.w3.org\/2000\/svg"//g' ${file} + sed -i "" 's/<path d="M0 0h24v24H0z"\/>"//g' ${file} +done + +svgo -f ./new/ --pretty --disable mergePaths + +for file in ./new/*.svg +do + echo "${file}" + sed -i "" -e $'s/<svg>/---\\\n---\\\n<svg>/g' ${file} +done + +cp ./new/* ./src/_icons/ |