epub changes
[librarian.git] / scripts / book2epub
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 librarian.book2anything import Book2Anything, Option
8
9
10 class Book2Epub(Book2Anything):
11     format_name = "EPUB"
12     ext = "epub"
13     uses_cover = True
14     uses_provider = True
15     transform_flags = [
16         Option('-w', '--working-copy', dest='working-copy',
17                 action='store_true', default=False,
18                 help='mark the output as a working copy'),
19         ]
20     transform_options = [
21         Option('-R', '--resources', dest='resources', metavar='DIR',
22                 help='a directory with additional resources'),
23         Option('-I', '--intro', dest='intro_file', metavar='FILE',
24                 help='HTML file containing intro'),
25         Option('-e', '--cover-file', dest='cover_file', metavar='FILE',
26                help='Cover image file'),
27         ]
28
29
30 if __name__ == '__main__':
31     Book2Epub.run()