mirror of
https://github.com/stronk-dev/RandomChad.git
synced 2025-07-05 02:35:08 +02:00
Python convert script to PNG
This commit is contained in:
parent
5bd7f55e84
commit
7373c80b61
3
.gitignore
vendored
3
.gitignore
vendored
@ -2,4 +2,5 @@ node_modules
|
||||
build/
|
||||
*.log
|
||||
notes.txt
|
||||
output
|
||||
output
|
||||
converted
|
7
convert.py
Normal file
7
convert.py
Normal file
@ -0,0 +1,7 @@
|
||||
import os
|
||||
import cairosvg
|
||||
|
||||
for file in os.listdir('./output'):
|
||||
name = file.split('.svg')[0]
|
||||
print('Converting ' + './output/' + name + '.svg' + ' -> ./converted/' + name + '.png')
|
||||
cairosvg.svg2png(url='./output/' + name + '.svg', write_to='./converted/' + name + '.png')
|
Loading…
x
Reference in New Issue
Block a user