X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/3726f9b225fb5c39cbf067f53d4cf6f7d8a9f326..69a96efdb07b874a503845692a4cdb9355458beb:/apps/catalogue/fields.py diff --git a/apps/catalogue/fields.py b/apps/catalogue/fields.py index e2978e877..9d7dcf232 100644 --- a/apps/catalogue/fields.py +++ b/apps/catalogue/fields.py @@ -209,6 +209,15 @@ class BuildHtml(BuildEbook): return True return False +@BuildEbook.register('cover_thumb') +@task(ignore_result=True) +class BuildCoverThumb(BuildEbook): + @classmethod + def transform(cls, wldoc, fieldfile): + from librarian.cover import WLCover + return WLCover(wldoc.book_info, height=193).output_file() + + class OverwritingFieldFile(FieldFile): """