aboutsummaryrefslogtreecommitdiffstats
path: root/generate_html_cs.py
diff options
context:
space:
mode:
Diffstat (limited to 'generate_html_cs.py')
-rwxr-xr-xgenerate_html_cs.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/generate_html_cs.py b/generate_html_cs.py
index 9301ca2..55c4c43 100755
--- a/generate_html_cs.py
+++ b/generate_html_cs.py
@@ -115,7 +115,7 @@ def parse_body(elem):
raise
# text of the verse
- wword['text'] = parse_verses(list(elem.getiterator("L")))
+ wword['text'] = parse_verses(list(elem.iter("L")))
# references
ref = elem.find("SL")
@@ -215,18 +215,18 @@ def parse_file(filename):
env = jinja2.Environment(loader=jinja2.FileSystemLoader('templates'))
template = env.get_template('czech.html')
- for los in tree.getiterator("LOSUNG"):
+ for los in tree.iter("LOSUNG"):
key, text = parse_losung(los)
article_dict[key] = text
- for los in tree.getiterator("DAY"):
+ for los in tree.iter("DAY"):
parse_day(los, article_dict)
article_list = []
article_keys = sorted(article_dict.keys())
for key in article_keys:
article_list.append(article_dict[key])
- return template.render(articles=article_list).encode('utf8')
+ return template.render(articles=article_list)
if __name__ == "__main__":