diff --git a/tei2imxml.py b/tei2imxml.py index 390ad88..6d17d76 100644 --- a/tei2imxml.py +++ b/tei2imxml.py @@ -187,7 +187,7 @@ def make_publication_cfg(info_dict): number_of_editors = len(info_dict['eoa_editors']) if number_of_authors > 0 and number_of_editors > 0: - print("Found both editor and authors. This is not permitted. Exiting", number_of_authors, number_of_editors) + print("Found both editor and authors. This is not permitted. Exiting") sys.exit() elif number_of_authors == 0 and number_of_editors == 0: print("Found neither editor nor authors. Please fill in. Exiting") @@ -200,8 +200,6 @@ def make_publication_cfg(info_dict): elif number_of_authors in range(1,6) and number_of_editors == 0: EDITED_VOLUME = False else: - print("num authors: ", number_of_authors) - print("num editors: ", number_of_editors) print("Something went wrong with the number of authors end editors. Please check. Exiting") sys.exit() @@ -286,8 +284,6 @@ def format_reference_list(used_citekeys, html_file): def format_citations(used_citekeys, bibdata, html_file): """Return a formatted entry of the used citations""" - # print(used_citekeys) - with open(TMP_DIR + os.path.sep + html_file, "r") as ding: cites = BeautifulSoup(ding, "html.parser") @@ -374,7 +370,6 @@ def transform_body(xml_tree, cited_data, publang): logging.info("Found chapter author shortcuts: {}.".format(list_author_id)) if len(list_author_id) > 0: author_string = format_authors(list_author_id, publang, xml_tree) - # print(author_string) eoa_author = etree.Element("EOAauthor") eoa_author.text = author_string chapter_title.insert(0, eoa_author) @@ -973,10 +968,6 @@ def main(): # create a dictionary entry containing the formatted references formatted_references_dict[tmp_dict_key] = refs_for_bib_chapter - # refs for bib_chapter contains formatted reference entries - # render_reference(all_references, cited_dict) - # print(cited_dict) - tei_body = xml_tree.xpath("//t:body", namespaces=NS_MAP)[0] body_transformed_tmp = transform_body(tei_body, cited_dict, publang=publication_language) libeoaconvert.debug_xml_here(body_transformed_tmp, "body_transformed")