X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/070975c3e28093c54fa890962a756e89b5f4d155..327e9cecd8cd2a8795a874dcb4e88a50d7c972fe:/src/catalogue/management/commands/gencover.py diff --git a/src/catalogue/management/commands/gencover.py b/src/catalogue/management/commands/gencover.py index adb84ea00..d4c838351 100644 --- a/src/catalogue/management/commands/gencover.py +++ b/src/catalogue/management/commands/gencover.py @@ -12,10 +12,12 @@ class Command(BaseCommand): def add_arguments(self, parser): parser.add_argument('slug') parser.add_argument('size', type=int) + parser.add_argument('--bleed', action='store_true') def handle(self, *args, **options): slug = options['slug'] size = options['size'] + bleed = 20 if options['bleed'] else 0 wldoc = Book.objects.get(slug=slug).wldocument() - cover = DefaultEbookCover(wldoc.book_info, width=size) + cover = DefaultEbookCover(wldoc.book_info, width=size, bleed=bleed) cover.save('%s.jpg' % slug)