Some experiments with the language: html, epub, covers.
[librarian.git] / scripts / book2cover
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 from librarian.formats.cover.wolnelektury import WLCover
9
10
11 class Book2Cover(Book2Anything):
12     format_cls = WLCover
13
14     format_options = [
15         Option('-W', '--width', action='store', type='int', dest='width', default=None,
16                 help='Set width.'),
17         Option('-H', '--height', action='store', type='int', dest='height', default=None,
18                 help='Set height.'),
19         Option('-l', '--with-logo', dest='with_logo',
20                 action='store_true', default=False,
21                 help='Add WL logo in white box.'),
22     ]
23
24
25 if __name__ == '__main__':
26     Book2Cover.run()