/[alph]/alph/alph/util/psimages.py
ViewVC logotype

Diff of /alph/alph/util/psimages.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by tjl, Tue Apr 22 19:49:05 2003 UTC revision 1.4 by benja, Tue Apr 22 19:57:07 2003 UTC
# Line 15  def convertFile(file, prefix, resolution Line 15  def convertFile(file, prefix, resolution
15              "ab1", "ab2" and "ab3". Note: 1-based.              "ab1", "ab2" and "ab3". Note: 1-based.
16      """      """
17      print "Processing ",file      print "Processing ",file
18      l = os.popen("file -i -b %(file)s" % locals()).readlines()[0]      # Don't check right now-- no os.popen in Jython
19      l = l.rstrip().lstrip()      #l = os.popen("file -i -b %(file)s" % locals()).readlines()[0]
20      print "'%(l)s'" % locals()      #l = l.rstrip().lstrip()
21        #print "'%(l)s'" % locals()
22    
23      if l != "application/pdf" and l != "application/postscript":        #if l != "application/pdf" and l != "application/postscript":  
24          print "Unknown - ignoring"      #   print "Unknown - ignoring"
25          return 0      #   return 0
26    
27      cmdline = "gs -dBATCH -dNOPAUSE -sDEVICE=png256 -r%(res)s -sOutputFile=%(prefix)%%d %(file)s" % locals()      cmdline = "gs -dBATCH -dNOPAUSE -sDEVICE=png256 -r%(resolution)s -sOutputFile=%(prefix)%%d %(file)s" % locals()
28      print "RUNNING ",cmdline      print "RUNNING ",cmdline
29      res = os.system(cmdline)      res = os.system(cmdline)
30      if res:      if res:

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26