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]
"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())