43 | 43 |
argparser.add_argument("--width", default=320, type=int)
|
44 | 44 |
argparser.add_argument("--height", default=200, type=int)
|
45 | 45 |
|
46 | |
argparser.add_argument("--tiny", default=False, action='store_true')
|
47 | |
argparser.add_argument("--small", default=False, action='store_true')
|
48 | |
argparser.add_argument("--big", default=False, action='store_true')
|
49 | |
argparser.add_argument("--huge", default=False, action='store_true')
|
50 | |
argparser.add_argument("--giant", default=False, action='store_true')
|
|
46 |
argparser.add_argument("--size", default=None, type=str,
|
|
47 |
help=''
|
|
48 |
)
|
|
49 |
|
51 | 50 |
argparser.add_argument("--square", default=False, action='store_true')
|
52 | 51 |
|
53 | 52 |
argparser.add_argument("--start", default=0.0, type=float, metavar='INSTANT',
|
|
72 | 71 |
"the whole movie."
|
73 | 72 |
)
|
74 | 73 |
argparser.add_argument("--view", default=False, action='store_true')
|
75 | |
argparser.add_argument("--twitter", default=False, action='store_true',
|
76 | |
help="Make the last frame in a GIF animation delay only half as long."
|
|
74 |
argparser.add_argument("--shorten-final-frame", default=False, action='store_true',
|
|
75 |
help="Make the last frame in a GIF animation delay only half as long. "
|
|
76 |
"Might make looping smoother when uploaded to Twitter. YMMV."
|
77 | 77 |
)
|
78 | 78 |
|
79 | 79 |
argparser.add_argument("--config", default=None, type=str)
|
80 | 80 |
|
81 | 81 |
options = argparser.parse_args(sys.argv[1:])
|
82 | 82 |
|
83 | |
if options.tiny:
|
84 | |
options.width = 160
|
85 | |
options.height = 100
|
86 | |
if options.small:
|
87 | |
options.width = 320
|
88 | |
options.height = 200
|
89 | |
if options.big:
|
90 | |
options.width = 640
|
91 | |
options.height = 400
|
92 | |
if options.huge:
|
93 | |
options.width = 800
|
94 | |
options.height = 600
|
95 | |
if options.giant:
|
96 | |
options.width = 1280
|
97 | |
options.height = 800
|
|
83 |
options.width, options.height = {
|
|
84 |
'tiny': (160, 100),
|
|
85 |
'small': (320, 200),
|
|
86 |
'big': (640, 400),
|
|
87 |
'huge': (800, 600),
|
|
88 |
'giant': (1280, 800),
|
|
89 |
}[options.size] if options.size is not None else (options.width, options.height)
|
98 | 90 |
|
99 | 91 |
if options.square:
|
100 | 92 |
options.height = options.width
|