X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/46705d393ae76a1d8e0eb2dc8bf121269f6adb67..f37981065265afbb98a729e9ed8d6eec2e2763a0:/apps/catalogue/management/commands/importbooks.py diff --git a/apps/catalogue/management/commands/importbooks.py b/apps/catalogue/management/commands/importbooks.py index ea3768ba7..62ead5373 100644 --- a/apps/catalogue/management/commands/importbooks.py +++ b/apps/catalogue/management/commands/importbooks.py @@ -24,7 +24,7 @@ class Command(BaseCommand): help='Don\'t build EPUB file'), make_option('-T', '--no-build-txt', action='store_false', dest='build_txt', default=True, help='Don\'t build TXT file'), - make_option('-T', '--no-build-pdf', action='store_false', dest='build_pdf', default=True, + make_option('-P', '--no-build-pdf', action='store_false', dest='build_pdf', default=True, help='Don\'t build PDF file'), make_option('-w', '--wait-until', dest='wait_until', metavar='TIME', help='Wait until specified time (Y-M-D h:m:s)'), @@ -101,6 +101,9 @@ class Command(BaseCommand): print "Importing %s.txt" % file_base book.save() + + # clean the generated zip packages. Is this the right place for this? + book.clean_zip_files() except Book.AlreadyExists, msg: print self.style.ERROR('%s: Book already imported. Skipping. To overwrite use --force.' %