#!/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_left = '' white_right = '' white_left = '' black_right = '' digits = { "left": [ # 1 '') f.write("\n") f.write(digits["right"][right] + ' fill="none" stroke-width="4" ' + ('stroke="red"' if colorLeft == "black" else 'stroke="orange"') + '/>') f.write("\n") f.write(final) f.close()