community-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From humbed...@apache.org
Subject svn commit: r1839312 - /comdev/project-logos/tools/compile.py
Date Mon, 27 Aug 2018 12:58:53 GMT
Author: humbedooh
Date: Mon Aug 27 12:58:53 2018
New Revision: 1839312

URL: http://svn.apache.org/viewvc?rev=1839312&view=rev
Log:
export original path, for source links

Modified:
    comdev/project-logos/tools/compile.py

Modified: comdev/project-logos/tools/compile.py
URL: http://svn.apache.org/viewvc/comdev/project-logos/tools/compile.py?rev=1839312&r1=1839311&r2=1839312&view=diff
==============================================================================
--- comdev/project-logos/tools/compile.py (original)
+++ comdev/project-logos/tools/compile.py Mon Aug 27 12:58:53 2018
@@ -109,6 +109,7 @@ for file in files:
         break
   ext = m.group(2)
   oext = ext
+  opath = file
   fpath = '%s/%s' % (img_dir, file)
   st = os.stat(fpath)
   skipit = False
@@ -149,7 +150,7 @@ for file in files:
           im = Image.open('%s/%s/%s.png' % (out_dir, project, xfile))
           w = im.width
           h = im.height
-          projects[project]['images'].append({'original': xfile, 'name': '%s' % xfile, 'filename':
'%s/%s.png' % (project, xfile), 'format': 'png', 'width': w, 'height': h})
+          projects[project]['images'].append({'opath': opath, 'original': xfile, 'name':
'%s' % xfile, 'filename': '%s/%s.png' % (project, xfile), 'format': 'png', 'width': w, 'height':
h})
       except:
           pass
       # PNG, high res
@@ -159,13 +160,13 @@ for file in files:
           im = Image.open('%s/%s/%s_highres.png' % (out_dir, project, xfile))
           w = im.width
           h = im.height
-          projects[project]['images'].append({'original': xfile, 'name': '%s (high res)'
% xfile, 'filename': '%s/%s_highres.png' % (project, xfile), 'format': 'png', 'width': w,
'height': h})
+          projects[project]['images'].append({'opath': opath, 'original': xfile, 'name':
'%s (high res)' % xfile, 'filename': '%s/%s_highres.png' % (project, xfile), 'format': 'png',
'width': w, 'height': h})
       except:
           pass
       try:
           if not skipit:
             subprocess.check_output(('inkscape', '-z', '%s/%s' % (img_dir, file), '-A', '%s/%s/%s.pdf'
% (out_dir, project, xfile), '-w', '1200'))
-          projects[project]['images'].append({'original': xfile, 'name': xfile, 'filename':
'%s/%s.pdf' % (project, xfile), 'format': 'pdf'})
+          projects[project]['images'].append({'opath': opath, 'original': xfile, 'name':
xfile, 'filename': '%s/%s.pdf' % (project, xfile), 'format': 'pdf'})
       except:
           pass
 



Mime
View raw message