17 | 17 |
help='A YAML file containing the template to render for each frame, '
|
18 | 18 |
'as well as configuration for rendering the template.'
|
19 | 19 |
)
|
20 | |
argparser.add_argument('output', metavar='FILENAME', type=str,
|
|
20 |
argparser.add_argument('-o', '--output', metavar='FILENAME', type=str, default=None,
|
21 | 21 |
help='The movie file to create. The extension of this filename '
|
22 | 22 |
'determines the output format and must be one of %r. '
|
23 | 23 |
'If not given, a default name will be chosen based on the '
|
|
27 | 27 |
options, unknown = argparser.parse_known_args(sys.argv[1:])
|
28 | 28 |
remainder = ' '.join(unknown)
|
29 | 29 |
|
|
30 |
if options.output is None:
|
|
31 |
(configbase, configext) = os.path.splitext(os.path.basename(options.configfile))
|
|
32 |
output_filename = configbase + '.mp4'
|
|
33 |
else:
|
|
34 |
output_filename = options.output
|
|
35 |
|
30 | 36 |
exe = Executor()
|
31 | 37 |
|
32 | 38 |
instants_dir = mkdtemp()
|
|
34 | 40 |
|
35 | 41 |
exe.do_it("kinoje-expand {} {}".format(options.configfile, instants_dir))
|
36 | 42 |
exe.do_it("kinoje-render {} {} {}".format(options.configfile, instants_dir, frames_dir))
|
37 | |
exe.do_it("kinoje-compile {} {} {} {}".format(options.configfile, frames_dir, options.output, remainder))
|
|
43 |
exe.do_it("kinoje-compile {} {} {} {}".format(options.configfile, frames_dir, output_filename, remainder))
|
38 | 44 |
|
39 | 45 |
exe.close()
|