X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/c7c0b88f1f628f0498c8c53c76a061ec128a228a..ab86dfc26dcdfc69688d4498b1b683de85a923de:/apps/catalogue/fields.py?ds=inline 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): """