Loading generateBaseline/postprocessing.py +10 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ from lxml import etree import tempfile import shutil from typing import Union import argparse #import win32com.client #pip install pywin32 Loading Loading @@ -236,6 +237,15 @@ def update_toc(docx_input, docx_output): # doc.Close() # word.Quit() def update_toc_cli(): parser = argparse.ArgumentParser(description="Update a DOCX table of contents.") parser.add_argument("docx_input", help="Path to input DOCX file") parser.add_argument("docx_output", help="Path to output DOCX file") args = parser.parse_args() update_toc(args.docx_input, args.docx_output) def table_widths_adjustment(config): table_path = config.get("tables_folder") docx_path = config.get("output_docx") Loading Loading
generateBaseline/postprocessing.py +10 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ from lxml import etree import tempfile import shutil from typing import Union import argparse #import win32com.client #pip install pywin32 Loading Loading @@ -236,6 +237,15 @@ def update_toc(docx_input, docx_output): # doc.Close() # word.Quit() def update_toc_cli(): parser = argparse.ArgumentParser(description="Update a DOCX table of contents.") parser.add_argument("docx_input", help="Path to input DOCX file") parser.add_argument("docx_output", help="Path to output DOCX file") args = parser.parse_args() update_toc(args.docx_input, args.docx_output) def table_widths_adjustment(config): table_path = config.get("tables_folder") docx_path = config.get("output_docx") Loading