Add Ebookpoint cover task.
authorRadek Czajka <rczajka@rczajka.pl>
Fri, 3 Apr 2020 10:56:02 +0000 (12:56 +0200)
committerRadek Czajka <rczajka@rczajka.pl>
Thu, 10 Sep 2020 12:15:10 +0000 (14:15 +0200)
src/catalogue/fields.py

index be4ce8a..7d190df 100644 (file)
@@ -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):
     """