X-Git-Url: https://git.mdrn.pl/wolnelektury.git/blobdiff_plain/1f74e9a6dc7dd2303f3271ccf4c7a3eb59e3e27e..8b96e2697a791ce6af5f6b6f38477c0a81dac124:/scripts/conv_genre_families.py?ds=sidebyside 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 = ', '