mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
1081b16a6c
commit
8dbdcd8a8e
@ -411,6 +411,8 @@ if __name__ == '__main__':
|
|||||||
k = args.pop(0)
|
k = args.pop(0)
|
||||||
if '=' in k:
|
if '=' in k:
|
||||||
n, v = k.partition('=')[::2]
|
n, v = k.partition('=')[::2]
|
||||||
|
if v in ('True', 'False'):
|
||||||
|
v = True if v == 'True' else False
|
||||||
try:
|
try:
|
||||||
v = int(v)
|
v = int(v)
|
||||||
except Exception:
|
except Exception:
|
||||||
@ -426,4 +428,4 @@ if __name__ == '__main__':
|
|||||||
outf = bn.rpartition('.')[0] + '.' + '-output' + bn.rpartition('.')[-1]
|
outf = bn.rpartition('.')[0] + '.' + '-output' + bn.rpartition('.')[-1]
|
||||||
img = func(img, **kw)
|
img = func(img, **kw)
|
||||||
with lopen(outf, 'wb') as f:
|
with lopen(outf, 'wb') as f:
|
||||||
f.write(image_to_data(img))
|
f.write(image_to_data(img, fmt=outf.rpartition('.')[-1]))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user