fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Removed old books.
[wolnelektury.git]
/
catalogue
/
management
/
commands
/
importbooks.py
diff --git
a/catalogue/management/commands/importbooks.py
b/catalogue/management/commands/importbooks.py
index
24908fe
..
3b8a564
100644
(file)
--- a/
catalogue/management/commands/importbooks.py
+++ b/
catalogue/management/commands/importbooks.py
@@
-1,11
+1,11
@@
-from django.core.management.base import BaseCommand, CommandError
+import os
+
+from django.core.management.base import BaseCommand
from django.core.management.color import color_style
from optparse import make_option
from django.core.management.color import color_style
from optparse import make_option
-import sys
-import
os
+from slughifi import slughifi
+import
dcparser
-from catalogue.lib.dcparser import parse
-from catalogue.lib.slughifi import slughifi
from catalogue.models import Book, Tag
from catalogue.models import Book, Tag
@@
-43,7
+43,7
@@
class Command(BaseCommand):
if verbosity > 1:
print "Parsing '%s'" % file_path
if verbosity > 1:
print "Parsing '%s'" % file_path
- book_info = parse(file_path)
+ book_info =
dcparser.
parse(file_path)
book = Book(title=book_info.title, slug=slughifi(book_info.title))
book.save()
book = Book(title=book_info.title, slug=slughifi(book_info.title))
book.save()