From c0521cec60b9408c8f7ffd7d8c2888a9d8a86651 Mon Sep 17 00:00:00 2001 From: kthoden Date: Mon, 17 Jun 2019 17:27:50 +0200 Subject: [PATCH] Remainder --- tei2imxml.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/tei2imxml.py b/tei2imxml.py index cbb13fd..337dc9a 100755 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -290,15 +290,13 @@ def format_reference_list(used_citekeys, html_file): logging.info("Opening %s", html_file) # second part of function - with open(html_file, "r") as ding: - reference_list = soupparser.fromstring(ding, features="html.parser") - + reference_list = etree.parse(str(html_file)) references = reference_list.xpath("//div[@class='references']")[0] return references # def format_reference_list ends here -def format_citations(used_citekeys, bibdata, html_file): +def format_citations_json(used_citekeys, bibdata, html_file): """Return a dictionary of the used citations as formatted entries. citation_dict[citekey] = (authoryear_citation, year_citation, title) @@ -1170,7 +1168,7 @@ def main(): args.CONFIG_FILE, args.log_level, (Path(args.log_dir) / SCRIPT_NAME) . with_suffix( ".log" ), - # args.log_file, + args.log_file, ) if not os.path.exists(OUTPUT_DIR):