fnp
/
wolnelektury.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Dynamic menu
[wolnelektury.git]
/
scripts
/
conv_genre_families.py
diff --git
a/scripts/conv_genre_families.py
b/scripts/conv_genre_families.py
index
247fc2c
..
f798d69
100644
(file)
--- a/
scripts/conv_genre_families.py
+++ b/
scripts/conv_genre_families.py
@@
-17,13
+17,13
@@
doc = etree.parse('rodziny.xml')
for element in doc.findall('//span'):
themes = [s.strip() for s in element.text.split(',')]
for element in doc.findall('//span'):
themes = [s.strip() for s in element.text.split(',')]
-
+
element.text = u''
element.text = u''
-
+
for theme in themes:
try:
Tag.objects.get(slug=slughifi(theme))
for theme in themes:
try:
Tag.objects.get(slug=slughifi(theme))
-
+
link = etree.SubElement(element, 'a', href=u'/katalog/%s' % slughifi(theme))
link.text = theme
link.tail = ', '
link = etree.SubElement(element, 'a', href=u'/katalog/%s' % slughifi(theme))
link.text = theme
link.tail = ', '