Separate the general from the WL-specific: PDF
[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
8
9
10 class Book2Cover(Book2Anything):
11     format_name = "JPEG"
12     ext = "jpg"
13     uses_cover = True
14     cover_optional = False
15
16     @staticmethod
17     def transform(wldoc, cover):
18         return wldoc.as_cover(cover_class=cover)
19
20
21 if __name__ == '__main__':
22     Book2Cover.run()