From f800e267b75bf8dce7c3f0a61f66d944eab14d75 Mon Sep 17 00:00:00 2001 From: Zach van Rijn Date: Mon, 27 Nov 2023 17:48:01 -0600 Subject: Remove generated SVG files, ensure .gitignore captures them. --- assets/images/polyguin.sh | 22 ++--- assets/images/polyguin_black.svg | 171 --------------------------------------- assets/images/polyguin_color.svg | 171 --------------------------------------- assets/images/polyguin_white.svg | 171 --------------------------------------- 4 files changed, 11 insertions(+), 524 deletions(-) delete mode 100644 assets/images/polyguin_black.svg delete mode 100644 assets/images/polyguin_color.svg delete mode 100644 assets/images/polyguin_white.svg (limited to 'assets') diff --git a/assets/images/polyguin.sh b/assets/images/polyguin.sh index dcf670a..7497f8c 100755 --- a/assets/images/polyguin.sh +++ b/assets/images/polyguin.sh @@ -13,14 +13,14 @@ rm -f gen_*; # # Optionally apply color transformations here. # -cp polyguin.svg polyguin_color.svg +cp polyguin.svg gen_polyguin_color.svg ## # Target: black # # Convert color SVG to black SVG and maintain transparency. # -cp polyguin.svg polyguin_black.svg +cp polyguin.svg gen_polyguin_black.svg grep fill: polyguin.svg \ | grep -v fill:none \ | grep -E -o '\#[a-f0-9]*\w' \ @@ -28,7 +28,7 @@ grep fill: polyguin.svg \ | uniq \ | cut -d\# -f2 \ | while read k; do - sed -i polyguin_black.svg \ + sed -i gen_polyguin_black.svg \ -e 's@'"$k"'@__BLACK_'"$k"'__@g' \ ; done \ @@ -43,7 +43,7 @@ grep fill: polyguin.svg \ | awk '{ print "0x"$1,"0x"$2,"0x"$3, ($1 $2 $3) }' \ | awk --non-decimal-data '{ print $4, (1 - (($1 + $2 + $3) / (3 * 256))) }' \ | while read a b; do - sed -i polyguin_black.svg \ + sed -i gen_polyguin_black.svg \ -e '/'"$a"'/ s@-opacity:1@-opacity:'"$b"'@g' \ -e '/'"$a"'/ s@__BLACK_[a-f0-9]*__@000000@g' \ ; @@ -56,7 +56,7 @@ grep fill: polyguin.svg \ # # Convert color SVG to white SVG and maintain transparency. # -cp polyguin.svg polyguin_white.svg +cp polyguin.svg gen_polyguin_white.svg grep fill: polyguin.svg \ | grep -v fill:none \ | grep -E -o '\#[a-f0-9]*\w' \ @@ -64,7 +64,7 @@ grep fill: polyguin.svg \ | uniq \ | cut -d\# -f2 \ | while read k; do - sed -i polyguin_white.svg \ + sed -i gen_polyguin_white.svg \ -e 's@'"$k"'@__WHITE_'"$k"'__@g' \ ; done \ @@ -79,7 +79,7 @@ grep fill: polyguin.svg \ | awk '{ print "0x"$1,"0x"$2,"0x"$3, ($1 $2 $3) }' \ | awk --non-decimal-data '{ print $4, (($1 + $2 + $3) / (3 * 256)) }' \ | while read a b; do - sed -i polyguin_white.svg \ + sed -i gen_polyguin_white.svg \ -e '/'"$a"'/ s@-opacity:1@-opacity:'"$b"'@g' \ -e '/'"$a"'/ s@__WHITE_[a-f0-9]*__@ffffff@g' \ ; @@ -108,7 +108,7 @@ apk add graphicsmagick imagemagick; # for c in color black white; do for r in x28 x54 x200 x900; do - gm convert -trim -density 600 -resize ${r} -background none polyguin_${c}.svg gen_polyguin_${c}_${r}.png; + gm convert -trim -density 600 -resize ${r} -background none gen_polyguin_${c}.svg gen_polyguin_${c}_${r}.png; magick convert -auto-level -brightness-contrast -5x+25 gen_polyguin_${c}_${r}.png gen_polyguin_${c}_${r}.png; chown 1000:1000 gen_polyguin_${c}_${r}.png; done # r @@ -184,13 +184,13 @@ chown 1000:1000 icons/gen_polyguin_color_favicon.ico; ## # GitLab group/project avatar is 96x96 square. MUST be square. # -magick convert -background none -gravity center -resize 96x96 -extent 96x96 polyguin_color.svg gen_polyguin_color_gitlab.png; +magick convert -background none -gravity center -resize 96x96 -extent 96x96 gen_polyguin_color.svg gen_polyguin_color_gitlab.png; chown 1000:1000 gen_polyguin_color_gitlab.png; ## # Twitter avatar is 400x400 square. MUST be square. # -magick convert -background none -gravity center -resize 400x400 -extent 400x400 polyguin_color.svg gen_polyguin_color_twitter.png; +magick convert -background none -gravity center -resize 400x400 -extent 400x400 gen_polyguin_color.svg gen_polyguin_color_twitter.png; chown 1000:1000 gen_polyguin_color_twitter.png; ## @@ -202,7 +202,7 @@ chown 1000:1000 gen_polyguin_color_wordpress.png; ## # GitHub group/project avatar is 500x500 square. MUST be square. # -magick convert -background none -gravity center -resize 500x500 -extent 500x500 polyguin_color.svg gen_polyguin_color_github.png; +magick convert -background none -gravity center -resize 500x500 -extent 500x500 gen_polyguin_color.svg gen_polyguin_color_github.png; chown 1000:1000 gen_polyguin_color_github.png; #=============================================================== diff --git a/assets/images/polyguin_black.svg b/assets/images/polyguin_black.svg deleted file mode 100644 index ef73aa3..0000000 --- a/assets/images/polyguin_black.svg +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/polyguin_color.svg b/assets/images/polyguin_color.svg deleted file mode 100644 index aee9a93..0000000 --- a/assets/images/polyguin_color.svg +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/assets/images/polyguin_white.svg b/assets/images/polyguin_white.svg deleted file mode 100644 index 07e853c..0000000 --- a/assets/images/polyguin_white.svg +++ /dev/null @@ -1,171 +0,0 @@ - - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -- cgit v1.2.3-70-g09d2