bstraehle commited on
Commit
d4ca6c7
·
verified ·
1 Parent(s): 868c1b2

Update util.py

Browse files
Files changed (1) hide show
  1. util.py +10 -1
util.py CHANGED
@@ -38,7 +38,16 @@ def read_docx(file_path):
38
 
39
  for para in doc.paragraphs:
40
  text.append(para.text)
41
-
 
 
 
 
 
 
 
 
 
42
  return "\n".join(text)
43
 
44
  def read_pptx(file_path):
 
38
 
39
  for para in doc.paragraphs:
40
  text.append(para.text)
41
+
42
+ for table in doc.tables:
43
+ for row in table.rows:
44
+ row_text = []
45
+
46
+ for cell in row.cells:
47
+ row_text.append(cell.text)
48
+
49
+ text.append(" | ".join(row_text))
50
+
51
  return "\n".join(text)
52
 
53
  def read_pptx(file_path):