fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Move source names to a model.
[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
c75f092
..
ba06341
100755
(executable)
--- a/
apps/catalogue/management/commands/pack.py
+++ b/
apps/catalogue/management/commands/pack.py
@@
-2,9
+2,6
@@
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
# This file is part of Wolnelektury, licensed under GNU Affero GPLv3 or later.
# Copyright © Fundacja Nowoczesna Polska. See NOTICE for more information.
#
-import re
-import sys
-from cPickle import load, dump
from optparse import make_option
from django.core.management.base import BaseCommand
from optparse import make_option
from django.core.management.base import BaseCommand
@@
-23,8
+20,8
@@
class Command(BaseCommand):
make_option('-e', '--exclude', dest='exclude', metavar='SLUG,...',
help='Exclude specific books by slug')
)
make_option('-e', '--exclude', dest='exclude', metavar='SLUG,...',
help='Exclude specific books by slug')
)
- help = 'Prepare
data for Lesmianator
.'
- args = '[%s] output_path.zip' % '|'.join(
ftype
s)
+ help = 'Prepare
ZIP package with files of given type
.'
+ args = '[%s] output_path.zip' % '|'.join(
Book.format
s)
def handle(self, ftype, path, **options):
self.style = color_style()
def handle(self, ftype, path, **options):
self.style = color_style()
@@
-33,7
+30,7
@@
class Command(BaseCommand):
include = options.get('include')
exclude = options.get('exclude')
include = options.get('include')
exclude = options.get('exclude')
- if ftype in Book.f
ile_type
s:
+ if ftype in Book.f
ormat
s:
field = "%s_file" % ftype
else:
print self.style.ERROR('Unknown file type.')
field = "%s_file" % ftype
else:
print self.style.ERROR('Unknown file type.')