mailr26997 - /trunk/devel_scripts/oxygen_icon_size_convert.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by tlinnet on December 07, 2014 - 17:59:
Author: tlinnet
Date: Sun Dec  7 17:59:13 2014
New Revision: 26997

URL: http://svn.gna.org/viewcvs/relax?rev=26997&view=rev
Log:
Extended the devel script image size converter.

Modified:
    trunk/devel_scripts/oxygen_icon_size_convert.py

Modified: trunk/devel_scripts/oxygen_icon_size_convert.py
URL: 
http://svn.gna.org/viewcvs/relax/trunk/devel_scripts/oxygen_icon_size_convert.py?rev=26997&r1=26996&r2=26997&view=diff
==============================================================================
--- trunk/devel_scripts/oxygen_icon_size_convert.py     (original)
+++ trunk/devel_scripts/oxygen_icon_size_convert.py     Sun Dec  7 17:59:13 
2014
@@ -36,6 +36,12 @@
 filein = odir + sep + 'scalable' + sep + cat + sep + icon + '.svgz'
 shutil.copy(filein, cdir)
 filein = cdir + sep + icon + '.svgz'
+
+# Copy to scalable folder
+sdir = cdir + sep + '..' + sep + 'scalable' + sep + cat
+if not path.exists(sdir):
+    makedirs(sdir)
+shutil.copy(filein, sdir)
 
 # Define Call function.
 def call_prog(list_args):
@@ -81,6 +87,14 @@
         print(file_ex, fileor)
 
         # It the file exists:
+        fileoutpos = cdir + sep + '..' + sep + '%sx%s'%(x, y) + sep + cat + 
sep + icon + '.png'
         if file_ex:
             fileout = cdir + sep + "%s_%sx%s_or.png" %(icon, x, y)
             shutil.copy(fileor, fileout)
+        else:
+            fileout = cdir + sep + "%s_%sx%s.png" %(icon, x, y)
+
+        # Copy into correct folders
+        if not path.exists(path.dirname(fileoutpos)):
+            makedirs(path.dirname(fileoutpos))
+        shutil.copy(fileout, fileoutpos)




Related Messages


Powered by MHonArc, Updated Sun Dec 07 18:20:02 2014