Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Update XHTML creator
  • Loading branch information
kthoden committed Jun 24, 2021
1 parent 8ff230d commit 840ae6d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build_frontmatter.py
Expand Up @@ -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)
Expand Down Expand Up @@ -1227,7 +1227,7 @@ def create_xhtml(eoa_publication, edited, eoaclassic, eoa_cursor, server_data):

xhtml_string += "</ol>\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))
Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit 840ae6d

Please sign in to comment.