#!/usr/bin/env python import subprocess import os import glob sizes=[16,22,24,32,48,64,96,256,'scalable'] dirs=["apps","categories","mimetypes"] print "* Building lliurex icons..." for dir in dirs: DST_DIR="build/"+ dir + "/" for sz in sizes: tmp=DST_DIR+str(sz) if not os.path.exists(tmp): os.makedirs(tmp) for f in glob.glob("vibrancy-lliurex/"+dir+"/*.svg"): if sz != 'scalable': subprocess.Popen(["rsvg-convert","--width="+str(sz),"--height="+str(sz),"-o",tmp+"/"+os.path.basename(f).replace(".svg",".png"),f]) else: os.system('cp ' + f + ' '+tmp) os.system("ls -la")