fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Search in stagin phase - waiting for final guidelines on new wl
[wolnelektury.git]
/
apps
/
catalogue
/
management
/
commands
/
pack.py
diff --git
a/apps/catalogue/management/commands/pack.py
b/apps/catalogue/management/commands/pack.py
index
80f612a
..
c75f092
100755
(executable)
--- a/
apps/catalogue/management/commands/pack.py
+++ b/
apps/catalogue/management/commands/pack.py
@@
-24,7
+24,6
@@
class Command(BaseCommand):
help='Exclude specific books by slug')
)
help = 'Prepare data for Lesmianator.'
help='Exclude specific books by slug')
)
help = 'Prepare data for Lesmianator.'
- ftypes = ['xml', 'txt', 'html', 'epub', 'pdf']
args = '[%s] output_path.zip' % '|'.join(ftypes)
def handle(self, ftype, path, **options):
args = '[%s] output_path.zip' % '|'.join(ftypes)
def handle(self, ftype, path, **options):
@@
-34,7
+33,7
@@
class Command(BaseCommand):
include = options.get('include')
exclude = options.get('exclude')
include = options.get('include')
exclude = options.get('exclude')
- if ftype in
self.f
types:
+ if ftype in
Book.file_
types:
field = "%s_file" % ftype
else:
print self.style.ERROR('Unknown file type.')
field = "%s_file" % ftype
else:
print self.style.ERROR('Unknown file type.')
@@
-53,7
+52,7
@@
class Command(BaseCommand):
if exclude:
books = [book for book in books if book.slug not in exclude.split(',')]
if exclude:
books = [book for book in books if book.slug not in exclude.split(',')]
- archive = zipfile.ZipFile(path, 'w')
+ archive = zipfile.ZipFile(path, 'w'
, zipfile.ZIP_DEFLATED
)
processed = skipped = 0
for book in books:
processed = skipped = 0
for book in books: