X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/e47b75737d714a11e22cf3f5bceadddbf340e3b3..b1e8dbd94c15c7f3260afb0d2b7ee567d658eb0c:/apps/catalogue/management/commands/pack.py diff --git a/apps/catalogue/management/commands/pack.py b/apps/catalogue/management/commands/pack.py index a300aff0f..6ecf32d59 100755 --- a/apps/catalogue/management/commands/pack.py +++ b/apps/catalogue/management/commands/pack.py @@ -23,9 +23,8 @@ class Command(BaseCommand): make_option('-e', '--exclude', dest='exclude', metavar='SLUG,...', help='Exclude specific books by slug') ) - help = 'Prepare data for Lesmianator.' - ftypes = ['xml', 'txt', 'html', 'epub', 'pdf'] - args = '[%s] output_path.zip' % '|'.join(ftypes) + help = 'Prepare ZIP package with files of given type.' + args = '[%s] output_path.zip' % '|'.join(Book.formats) def handle(self, ftype, path, **options): self.style = color_style() @@ -34,7 +33,7 @@ class Command(BaseCommand): include = options.get('include') exclude = options.get('exclude') - if ftype in self.ftypes: + if ftype in Book.formats: field = "%s_file" % ftype else: print self.style.ERROR('Unknown file type.')