Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Convertir.py
diff options
context:
space:
mode:
Diffstat (limited to 'Convertir.py')
-rw-r--r--Convertir.py31
1 files changed, 31 insertions, 0 deletions
diff --git a/Convertir.py b/Convertir.py
new file mode 100644
index 0000000..b5f6529
--- /dev/null
+++ b/Convertir.py
@@ -0,0 +1,31 @@
+#!/usr/bin/env python
+# -*- coding: utf-8 -*-
+import time, os, sys
+
+print "Quinteti!"
+print "RECUERDE QUE LAS IMÁGENES DEBEN ESTAR EN SVG"
+print "PARA CORRECTO FUNCIONAMIENTO LOS DIRECTORIOS AL FINAL DEBEN TENER LA PALABRA 'Vector'"
+sys.stdout.write('\x1B[31m')
+print "EJEMPLO: RojoVector"
+sys.stdout.write('\x1B[0m')
+time.sleep(2)
+lista = os.listdir('.')
+lista.remove('convertir.py')
+for x in lista:
+ if "png" in x.lower():
+ lista.remove(x)
+ else:
+ print '['+x+']'
+color = raw_input("Seleccione un color:")
+if os.path.exists(color):
+ try:
+ os.mkdir(color+'PNG')
+ except:
+ pass
+try:
+ for x in os.listdir(color):
+ print "Convirtiendo: " + x
+ os.system('rsvg ' + color + '/' + x + " " + color + "PNG/" + x[:-4]+'.png')
+except OSError:
+ print "EL DIRECTORIO ESPECIFICADO NO EXISTE"
+ exit("INTENTE EJECUTAR DE NUEVO EL SCRIPT Y SELECCIONANDO OTRO")