git @ Cat's Eye Technologies kinoje / 7d2b164
Restore --shorten-final-frame and --view options. Chris Pressey 4 years ago
2 changed file(s) with 13 addition(s) and 18 deletion(s). Raw diff Collapse all Expand all
6868 'configuration filename with a .mp4 extension added.' % (SUPPORTED_OUTPUT_FORMATS,)
6969 )
7070
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 )
8578
8679 options = argparser.parse_args(sys.argv[1:])
8780
9083 raise ValueError("%s not a supported output format (%r)" % (outext, SUPPORTED_OUTPUT_FORMATS))
9184
9285 config = load_config_file(options.configfile)
86 config['shorten_final_frame'] = options.shorten_final_frame
9387
9488 exe = LoggingExecutor('compiler.log')
9589
10195
10296 compiler.compile(config['num_frames'])
10397
104 #if options.view:
105 # compiler.view()
98 if options.view:
99 compiler.view()
106100
107101 exe.close()
2424 'configuration filename with a .mp4 extension added.' % (SUPPORTED_OUTPUT_FORMATS,)
2525 )
2626
27 options = argparser.parse_args(sys.argv[1:])
27 options, unknown = argparser.parse_known_args(sys.argv[1:])
28 remainder = ' '.join(unknown)
2829
2930 exe = Executor()
3031
3334
3435 exe.do_it("kinoje-expand {} {}".format(options.configfile, instants_dir))
3536 exe.do_it("kinoje-render {} {} {}".format(options.configfile, instants_dir, frames_dir))
36 exe.do_it("kinoje-compile {} {} {}".format(options.configfile, frames_dir, options.output))
37 exe.do_it("kinoje-compile {} {} {} {}".format(options.configfile, frames_dir, options.output, remainder))
3738
3839 exe.close()