From: Radek Czajka Date: Fri, 3 Apr 2020 10:56:02 +0000 (+0200) Subject: Add Ebookpoint cover task. X-Git-Url: https://git.mdrn.pl/wolnelektury.git/commitdiff_plain/53a026f73c20061e531b6a8d5fbf70c297b1a14a?hp=033aad30ca189472af0e04309cab1bc5964c9119 Add Ebookpoint cover task. --- diff --git a/src/catalogue/fields.py b/src/catalogue/fields.py index be4ce8a41..7d190df80 100644 --- a/src/catalogue/fields.py +++ b/src/catalogue/fields.py @@ -293,6 +293,15 @@ class BuildSimpleCover(BuildCover): return WLNoBoxCover(wldoc.book_info, height=1000).output_file() +@BuildEbook.register('cover_ebookpoint') +@task(ignore_result=True) +class BuildCoverEbookpoint(BuildCover): + @classmethod + def fransform(cls, wldoc, fieldfile): + from librarian.cover import EbookpointCover + return EbookpointCover(wldoc.book_info).output_file() + + # not used, but needed for migrations class OverwritingFieldFile(FieldFile): """