From 2cba93e8bb69025d53f6d7e59709ce323cffdd73 Mon Sep 17 00:00:00 2001 From: Fred Boniface Date: Fri, 16 Feb 2024 14:18:12 +0000 Subject: [PATCH] Update 'src/find-missing-from-docx.py' --- src/find-missing-from-docx.py | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/src/find-missing-from-docx.py b/src/find-missing-from-docx.py index 20ed307..2b5a324 100644 --- a/src/find-missing-from-docx.py +++ b/src/find-missing-from-docx.py @@ -1,11 +1,15 @@ -### EXAMPLE CODE ONLY::: - +### This uses the 'python-docx-2023' module from docx import Document def extract_table(file_path): document = Document(file_path) - print(document.tables) - table = document.tables[0] + + table = document.tables[4] + print(document.tables[1]) + print(document.tables[2]) + print(document.tables[3]) + print(document.tables[4]) + print(document.tables[5]) data = [] keys = None @@ -20,4 +24,11 @@ def extract_table(file_path): print(data) if __name__ == "__main__": - extract_table("./file.docx") \ No newline at end of file + extract_table("./file.docx") + +### This can parse each table. What needs to happen next +### is to parse all tables, then check for a PIS code. +### If PIS code exists, then find the associated headcode, +### Then an API request can be made to OwlBoard to try +### and find a service with valid stopping pattern, +### then the PIS codes can be generated for review. \ No newline at end of file