Images: image@src is a URL, and image sizes are limited.
[librarian.git] / src / librarian / command_line.py
index 3c17daf..2fc7cc1 100644 (file)
@@ -22,6 +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]
 
@@ -39,6 +52,12 @@ def main(*args, **kwargs):
             ))
 
     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())