X-Git-Url: https://git.auder.net/?a=blobdiff_plain;f=client%2Fpublic%2Fimages%2Fpieces%2FEmergo%2FgenerateSVG_simple.py;fp=client%2Fpublic%2Fimages%2Fpieces%2FEmergo%2FgenerateSVG_simple.py;h=1437626c90722beb2e8cab8227b7b374f38e88bb;hb=e07981727a6d486886f01f8e0ddc548fd733764b;hp=0000000000000000000000000000000000000000;hpb=7c05a5f2297bea540c700ebceb0cc8b03a7f6775;p=vchess.git diff --git a/client/public/images/pieces/Emergo/generateSVG_simple.py b/client/public/images/pieces/Emergo/generateSVG_simple.py new file mode 100755 index 00000000..1437626c --- /dev/null +++ b/client/public/images/pieces/Emergo/generateSVG_simple.py @@ -0,0 +1,55 @@ +#!/usr/bin/env python + +# Compose each piece SVG with numbers +# https://travishorn.com/removing-parts-of-shapes-in-svg-b539a89e5649 +# https://developer.mozilla.org/fr/docs/Web/SVG/Tutoriel/Paths + +preamble = """ + +""" + +black = '' +white = '' + +digits = [ + # 1 + '', + # 2 + '', + # 3 + '', + # 4 + '', + # 5 + '', + # 6 + '', + # 7 + '', + # 8 + '', + # 9 + '', + # 10 + '', + # 11 + '', + # 12 + '' +] + +final = "" + +for color in ["white", "black"]: + chrShift = 0 if color == "white" else 32 + for number in range(12): + filename = chr(65 + number + chrShift) + "_.svg" + f = open(filename, "w") + f.write(preamble) + f.write("\n"); + f.write(white if color == "white" else black) + f.write("\n"); + f.write(digits[number]) + f.write("\n"); + f.write(final) + f.close()