#!/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()