X-Git-Url: https://git.mdrn.pl/librarian.git/blobdiff_plain/8ceda11d427bb3a4e0094ff2424fd284dd5feae1..0ad20be3eadf8dbba51d95c9ca3bfc97825d44c6:/src/librarian/command_line.py?ds=inline diff --git a/src/librarian/command_line.py b/src/librarian/command_line.py index e7021bb..7b7eb38 100644 --- a/src/librarian/command_line.py +++ b/src/librarian/command_line.py @@ -22,13 +22,19 @@ def main(*args, **kwargs): help='specifies the directory for output' ) + # Specific + parser.add_argument( + '-b', '--base-url', metavar="URL", + help="Base for relative URLs in documents (like image sources)" + ) + parser.add_argument( '--mp3', metavar="FILE", nargs="*", help='specifies an MP3 file, if needed' ) - + args = parser.parse_args() builder = builders[args.builder] @@ -52,6 +58,6 @@ def main(*args, **kwargs): "mp3": args.mp3, } - output = document.build(builder, **kwargs) + output = document.build(builder, base_url=args.base_url, **kwargs) with open(output_file_path, 'wb') as f: f.write(output.get_bytes())