fnp
/
librarian.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
e18e540
)
fix
author
Radek Czajka
<rczajka@rczajka.pl>
Wed, 9 Dec 2020 09:27:31 +0000
(10:27 +0100)
committer
Radek Czajka
<rczajka@rczajka.pl>
Wed, 9 Dec 2020 09:27:31 +0000
(10:27 +0100)
src/librarian/command_line.py
patch
|
blob
|
history
diff --git
a/src/librarian/command_line.py
b/src/librarian/command_line.py
index
3c17daf
..
e7021bb
100644
(file)
--- a/
src/librarian/command_line.py
+++ b/
src/librarian/command_line.py
@@
-22,6
+22,13
@@
def main(*args, **kwargs):
help='specifies the directory for output'
)
help='specifies the directory for output'
)
+ parser.add_argument(
+ '--mp3',
+ metavar="FILE",
+ nargs="*",
+ help='specifies an MP3 file, if needed'
+ )
+
args = parser.parse_args()
builder = builders[args.builder]
args = parser.parse_args()
builder = builders[args.builder]
@@
-39,6
+46,12
@@
def main(*args, **kwargs):
))
document = WLDocument(filename=args.input_file)
))
document = WLDocument(filename=args.input_file)
- output = document.build(args.builder)
+
+ builder = builders[args.builder]
+ kwargs = {
+ "mp3": args.mp3,
+ }
+
+ output = document.build(builder, **kwargs)
with open(output_file_path, 'wb') as f:
f.write(output.get_bytes())
with open(output_file_path, 'wb') as f:
f.write(output.get_bytes())