adopted new ASCIItable API
This commit is contained in:
parent
31ea4dadf1
commit
ac7f443595
|
@ -109,16 +109,16 @@ theColors = np.uint8(np.array(theMap.export(format = 'list',steps = 256))*255)
|
||||||
|
|
||||||
# --- loop over input files -------------------------------------------------------------------------
|
# --- loop over input files -------------------------------------------------------------------------
|
||||||
|
|
||||||
if filenames == []: filenames = ['STDIN']
|
if filenames == []: filenames = [None]
|
||||||
|
|
||||||
for name in filenames:
|
for name in filenames:
|
||||||
if not (name == 'STDIN' or os.path.exists(name)): continue
|
try:
|
||||||
table = damask.ASCIItable(name = name,
|
table = damask.ASCIItable(name = name,
|
||||||
outname = None,
|
|
||||||
buffered = False,
|
buffered = False,
|
||||||
labeled = options.label != None,
|
labeled = options.label != None,
|
||||||
readonly = True)
|
readonly = True)
|
||||||
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name != 'STDIN' else ''))
|
except: continue
|
||||||
|
table.croak('\033[1m'+scriptName+'\033[0m'+(': '+name if name else ''))
|
||||||
|
|
||||||
# ------------------------------------------ read header ------------------------------------------
|
# ------------------------------------------ read header ------------------------------------------
|
||||||
|
|
||||||
|
@ -174,7 +174,7 @@ for name in filenames:
|
||||||
|
|
||||||
# ------------------------------------------ output result -----------------------------------------
|
# ------------------------------------------ output result -----------------------------------------
|
||||||
|
|
||||||
im.save(sys.stdout if name == 'STDIN' else
|
im.save(sys.stdout if name else
|
||||||
os.path.splitext(name)[0]+ \
|
os.path.splitext(name)[0]+ \
|
||||||
('' if options.label == None else '_'+options.label)+ \
|
('' if options.label == None else '_'+options.label)+ \
|
||||||
'.png',
|
'.png',
|
||||||
|
|
Loading…
Reference in New Issue