X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/64cf4d889127d7dc3ea893e8a27711468276dc47..1072faa66d0066f2de790fb90c26c9dccf02c0b0:/apps/catalogue/fields.py?ds=sidebyside 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): """