Images: image@src is a URL, and image sizes are limited.
[librarian.git] / scripts / book2pdf
1 #!/usr/bin/env python
2 # -*- coding: utf-8 -*-
3 #
4 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
5 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
6 #
7 from __future__ import unicode_literals
8
9 from librarian.book2anything import Book2Anything, Option
10
11
12 class Book2Pdf(Book2Anything):
13     format_name = "PDF"
14     ext = "pdf"
15     uses_cover = True
16     uses_provider = True
17     transform_options = [
18         Option(
19             '-t', '--save-tex', dest='save_tex', metavar='FILE',
20             help='path to save the intermediary LaTeX file to'
21         ),
22         Option(
23             '-m', '--morefloats', dest='morefloats', metavar='old/new/none',
24             help='force morefloats in old (<1.0c), new (>=1.0c) or none'
25         ),
26         Option(
27             '-b', '--base-url', dest='base_url', metavar='URL',
28             help='specifies the base URL for relative image references'
29         ),
30     ]
31
32
33 if __name__ == '__main__':
34     Book2Pdf.run()