7a7a41db80019dc9526e74d19b9d62071f9126b0
[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('-t', '--html-toc',
22                 action='store_true', dest='html_toc', default=False,
23                 help='with inline html toc')
24         ]
25
26
27 if __name__ == '__main__':
28     Book2Epub.run()