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()