X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1f74e9a6dc7dd2303f3271ccf4c7a3eb59e3e27e..6ce172931557c6c3b5a3f3eefd9d3e10c9c03d05:/scripts/conv_genre_families.py diff --git a/scripts/conv_genre_families.py b/scripts/conv_genre_families.py index 247fc2c60..f798d69eb 100644 --- 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(',')] - + element.text = u'' - + 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 = ', '