02d542c53071a39b1ba9cf76d59b36e075c9aad8
[librarian.git] / scripts / book2html
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 Book2Html(Book2Anything):
13     format_name = "HTML"
14     ext = "html"
15     uses_cover = False
16     uses_provider = False
17     transform_flags = [
18         Option('-r', '--raw', dest='full-page',
19                 action='store_false', default=True,
20                 help='output raw text for use in templates')
21     ]
22     transform_options = [
23         Option('--css', dest='css')
24     ]
25     parser_options = [
26         Option('-i', '--ignore-dublin-core', dest='parse_dublincore', 
27                 action='store_false', default=True,
28                 help='don\'t try to parse dublin core metadata')
29     ]
30
31
32 if __name__ == '__main__':
33     Book2Html.run()