ATLAS Offline Software
Functions | Variables
MooRTT_alleps2gif Namespace Reference

Functions

def alleps2gif (setupok, keepeps=True, tareps=True, tardir="MooRTT_epsimages")
 

Variables

bool setupok = True
 

Function Documentation

◆ alleps2gif()

def MooRTT_alleps2gif.alleps2gif (   setupok,
  keepeps = True,
  tareps = True,
  tardir = "MooRTT_epsimages" 
)

Definition at line 10 of file MooRTT_alleps2gif.py.

10 def alleps2gif(setupok,keepeps=True,tareps=True,tardir="MooRTT_epsimages"):
11 
12  if not setupok:
13  print "Usage: " + sys.argv[0] + " [directory]"
14  return
15 
16  old = ".eps"
17  new = ".gif"
18 
19  nofiles = True
20 
21  for epsname in os.listdir("."):
22  if epsname.count(old):
23  nofiles = False
24  gifname = epsname.replace(old,new)
25  commands = [ "pstopnm -ppm -xborder 0 -yborder 0 -portrait -xsize=1000 " + epsname ,
26  "ppmtogif " + epsname + "001.ppm > " + gifname ,
27  "rm " + epsname + "001.ppm" ]
28  if not keepeps:
29  commands.append("rm " + epsname)
30  for command in commands:
31  print "Running: " + command
32  os.system(command)
33 
34  if keepeps and tareps:
35  commands = [ "mkdir " + tardir ,
36  "mv *" + old + " " + tardir ,
37  "tar -czf " + tardir + ".tar.gz " + tardir ,
38  "rm -rf " + tardir ]
39  for command in commands:
40  print "Running: " + command
41  os.system(command)
42 
43  if nofiles:
44  print "No " + old + " files in directory."
45 
46 # -------- Start of running is here ------- #
47 

Variable Documentation

◆ setupok

bool MooRTT_alleps2gif.setupok = True

Definition at line 48 of file MooRTT_alleps2gif.py.

MooRTT_alleps2gif.alleps2gif
def alleps2gif(setupok, keepeps=True, tareps=True, tardir="MooRTT_epsimages")
Definition: MooRTT_alleps2gif.py:10