X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/09f311cf21633def6e6eda0549633cd07b363cf2..a6876bf7a05515cc4f16a70324990f11193933c1:/src/catalogue/fields.py diff --git a/src/catalogue/fields.py b/src/catalogue/fields.py index 372cf2735..911f857c3 100644 --- a/src/catalogue/fields.py +++ b/src/catalogue/fields.py @@ -244,6 +244,24 @@ class BuildCoverThumb(BuildEbook): return WLCover(wldoc.book_info, height=193).output_file() +@BuildEbook.register('cover_api_thumb') +@task(ignore_result=True) +class BuildCoverApiThumb(BuildEbook): + @classmethod + def transform(cls, wldoc, fieldfile): + from librarian.cover import WLNoBoxCover + return WLNoBoxCover(wldoc.book_info, height=500).output_file() + + +@BuildEbook.register('simple_cover') +@task(ignore_result=True) +class BuildSimpleCover(BuildEbook): + @classmethod + def transform(cls, wldoc, fieldfile): + from librarian.cover import WLNoBoxCover + return WLNoBoxCover(wldoc.book_info, height=1000).output_file() + + # not used, but needed for migrations class OverwritingFieldFile(FieldFile): """