2 # This file is part of Librarian, licensed under GNU Affero GPLv3 or later.
3 # Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
5 from librarian.book2anything import Book2Anything, Option
8 class Book2Cover(Book2Anything):
12 cover_optional = False
15 Option('-W', '--width', action='store', type='int', dest='width', default=None,
17 Option('-H', '--height', action='store', type='int', dest='height', default=None,
22 def transform(wldoc, cover, *args, **kwargs):
23 return wldoc.as_cover(cover_class=cover, *args, **kwargs)
26 if __name__ == '__main__':