fnp
/
wolnelektury.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8d9f0f1
)
Added importing links from wikipedia to import_links.py script.
author
Marek Stępniowski
<marek@stepniowski.com>
Thu, 23 Apr 2009 20:24:45 +0000
(22:24 +0200)
committer
Marek Stępniowski
<marek@stepniowski.com>
Thu, 23 Apr 2009 20:24:45 +0000
(22:24 +0200)
scripts/import_links.py
patch
|
blob
|
history
diff --git
a/scripts/import_links.py
b/scripts/import_links.py
index
ea4380f
..
671212d
100644
(file)
--- a/
scripts/import_links.py
+++ b/
scripts/import_links.py
@@
-13,7
+13,7
@@
setup_environ(settings)
from catalogue.models import Book, Tag
from catalogue.models import Book, Tag
-def import_
tag
s(file_name, attribute):
+def import_
link
s(file_name, attribute):
for line in file(file_name):
slug, link = line.split()
link = link.strip('\n')
for line in file(file_name):
slug, link = line.split()
link = link.strip('\n')
@@
-32,5
+32,5
@@
def import_tags(file_name, attribute):
print 'Invalid slug %s!' % slug
print 'Invalid slug %s!' % slug
-import_
tag
s('gazeta-links', 'gazeta_link')
-
+import_
link
s('gazeta-links', 'gazeta_link')
+import_links('wiki-links', 'wiki_link')