20 lines
444 B
Python
20 lines
444 B
Python
from __future__ import annotations
|
|
|
|
import argparse
|
|
from pathlib import Path
|
|
|
|
from docx_ops_lib import index_document, write_json
|
|
|
|
|
|
def main() -> None:
|
|
parser = argparse.ArgumentParser()
|
|
parser.add_argument("--docx", required=True)
|
|
parser.add_argument("--out", required=True)
|
|
args = parser.parse_args()
|
|
|
|
write_json(Path(args.out).resolve(), index_document(Path(args.docx).resolve()))
|
|
|
|
|
|
if __name__ == "__main__":
|
|
main()
|