68 | 68 |
'configuration filename with a .mp4 extension added.' % (SUPPORTED_OUTPUT_FORMATS,)
|
69 | 69 |
)
|
70 | 70 |
|
71 | |
#argparser.add_argument("--still", default=None, type=float, metavar='INSTANT',
|
72 | |
# help="If given, generate only a single frame (at the specified instant "
|
73 | |
# "betwen 0.0 and 1.0) and display it using eog, instead of building "
|
74 | |
# "the whole movie."
|
75 | |
#)
|
76 | |
#argparser.add_argument("--view", default=False, action='store_true')
|
77 | |
#argparser.add_argument("--shorten-final-frame", default=False, action='store_true',
|
78 | |
# help="Make the last frame in a GIF animation delay only half as long. "
|
79 | |
# "Might make looping smoother when uploaded to Twitter. YMMV."
|
80 | |
#)
|
81 | |
|
82 | |
#if options.still is not None:
|
83 | |
# exe.do_it("eog %s" % fn)
|
84 | |
# sys.exit(0)
|
|
71 |
argparser.add_argument("--shorten-final-frame", default=False, action='store_true',
|
|
72 |
help="Make the last frame in a GIF animation delay only half as long. "
|
|
73 |
"Might make looping smoother when uploaded to Twitter. YMMV."
|
|
74 |
)
|
|
75 |
argparser.add_argument("--view", default=False, action='store_true',
|
|
76 |
help="Display the resultant movie."
|
|
77 |
)
|
85 | 78 |
|
86 | 79 |
options = argparser.parse_args(sys.argv[1:])
|
87 | 80 |
|
|
90 | 83 |
raise ValueError("%s not a supported output format (%r)" % (outext, SUPPORTED_OUTPUT_FORMATS))
|
91 | 84 |
|
92 | 85 |
config = load_config_file(options.configfile)
|
|
86 |
config['shorten_final_frame'] = options.shorten_final_frame
|
93 | 87 |
|
94 | 88 |
exe = LoggingExecutor('compiler.log')
|
95 | 89 |
|
|
101 | 95 |
|
102 | 96 |
compiler.compile(config['num_frames'])
|
103 | 97 |
|
104 | |
#if options.view:
|
105 | |
# compiler.view()
|
|
98 |
if options.view:
|
|
99 |
compiler.view()
|
106 | 100 |
|
107 | 101 |
exe.close()
|