From 840ae6de2dfaa4d69a55f964337b6e4a79e1b37e Mon Sep 17 00:00:00 2001 From: kthoden Date: Thu, 24 Jun 2021 20:16:35 +0200 Subject: [PATCH] Update XHTML creator --- build_frontmatter.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build_frontmatter.py b/build_frontmatter.py index c119573..23dec63 100644 --- a/build_frontmatter.py +++ b/build_frontmatter.py @@ -1191,7 +1191,7 @@ def create_bibtex(eoa_publication, eoaclassic, eoa_cursor, server_data): # def create_bibtex ends here -def create_xhtml(eoa_publication, edited, eoaclassic, eoa_cursor, server_data): +def create_xhtml(eoa_publication, edited, eoaclassic, eoa_cursor, server_data, out_dir): """Use the database infos for creating an XHTML file for pro business""" eoa_pub_id = get_publication_id(eoa_publication, eoa_cursor, eoaclassic) @@ -1227,7 +1227,7 @@ def create_xhtml(eoa_publication, edited, eoaclassic, eoa_cursor, server_data): xhtml_string += "\n" - html_filename = "./generated_files/" + eoa_publication + ".html" + html_filename = str(out_dir) + f"/{eoa_publication}.html" outfile = open(html_filename, "w") outfile.write(xhtml_string) logging.debug("Wrote {}".format(html_filename)) @@ -1296,7 +1296,7 @@ def main(): elif args.bibtex: create_bibtex(args.publication, args.classic, db_cursor, server_data) elif args.xhtml: - create_xhtml(args.publication, args.edited, args.classic, db_cursor, server_data) + create_xhtml(args.publication, args.edited, args.classic, db_cursor, server_data, out_dir) else: logging.error("Specify whether you want the output as a PDF, OMP or XHTML input. Exiting.") sys.exit()