You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
tdesvn/src/pics/to_png.py

51 lines
1.4 KiB

#!/usr/bin/python
import os
def convert(file, px):
new_file=file.replace('.svgz','.png').replace('.svg','.png').replace('hisc-','')
os.system('/usr/bin/inkscape -e hicolor/hi%s-%s -w %s -h %s %s' % (px, new_file, px, px, file))
all_files=[
'hisc-action-tdesvnaddrecursive.svgz',
'hisc-action-tdesvnadd.svgz',
'hisc-action-tdesvnblame.svgz',
'hisc-action-tdesvncat.svgz',
'hisc-action-tdesvncheckout.svgz',
'hisc-action-tdesvncheckupdates.svgz',
'hisc-action-tdesvncleanup.svgz',
'hisc-action-tdesvncommit.svgz',
'hisc-action-tdesvncopy.svgz',
'hisc-action-tdesvndelete.svgz',
'hisc-action-tdesvndiff.svgz',
'hisc-action-tdesvnexport.svgz',
'hisc-action-tdesvninfo.svgz',
'hisc-action-tdesvnlock.svgz',
'hisc-action-tdesvnlog.svgz',
'hisc-action-tdesvnmerge.svgz',
'hisc-action-tdesvnrelocate.svgz',
'hisc-action-tdesvnswitch.svgz',
'hisc-action-tdesvnunlock.svgz',
'hisc-action-tdesvnupdate.svgz',
'hisc-filesys-tdesvnadded.svgz',
'hisc-filesys-tdesvnconflicted.svgz',
'hisc-filesys-tdesvndeleted.svgz',
'hisc-filesys-tdesvnlocked.svgz',
'hisc-filesys-tdesvnmodified.svgz',
'hisc-filesys-tdesvnupdates.svgz',
'hisc-filesys-tdesvnneedlock.svgz',
]
i_sizes=[
32,128,16,96,22,48,64]
i_sizes.sort()
for px in i_sizes:
os.system('mkdir -p hicolor/%sx%s/actions' % (px,px))
os.system('mkdir -p hicolor/%sx%s/filesystems' % (px,px))
for file in all_files:
for px in i_sizes:
convert(file, px)