[util] a python was found in the pond 🐍

it seems to be friendly towards frogs
This commit is contained in:
Riesi 2019-08-19 22:00:28 +02:00
parent 43f33cb8c6
commit 707393c810
1 changed files with 12 additions and 0 deletions

12
gen_png.py Normal file
View File

@ -0,0 +1,12 @@
import glob
import ntpath
import subprocess
files = [f for f in glob.glob("./**/*.svg", recursive=True)]
sizes = [16, 32, 64, 128, 256, 512, 1024, 4096]
for f in files:
name = ntpath.basename(f).replace(".svg", "")
for s in sizes:
subprocess.run(["inkscape", "-z", "-C", "-w", str(s), "-e", "./png/"+str(s)+"/"+name+".png", "-f", f])