Update 'src/find-missing-from-docx.py'
This commit is contained in:
parent
e0781ade05
commit
2cba93e8bb
@ -1,11 +1,15 @@
|
|||||||
### EXAMPLE CODE ONLY:::
|
### This uses the 'python-docx-2023' module
|
||||||
|
|
||||||
from docx import Document
|
from docx import Document
|
||||||
|
|
||||||
def extract_table(file_path):
|
def extract_table(file_path):
|
||||||
document = Document(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 = []
|
data = []
|
||||||
keys = None
|
keys = None
|
||||||
@ -21,3 +25,10 @@ def extract_table(file_path):
|
|||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
extract_table("./file.docx")
|
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.
|
Reference in New Issue
Block a user