bstraehle commited on
Commit
be7c8ff
·
verified ·
1 Parent(s): 226f9ae

Update util.py

Browse files
Files changed (1) hide show
  1. util.py +3 -3
util.py CHANGED
@@ -17,7 +17,7 @@ def get_questions(file_path, level):
17
  def is_ext(file_path, ext):
18
  return os.path.splitext(file_path)[1].lower() == ext.lower()
19
 
20
- def read_file(file_path):
21
  ext = os.path.splitext(file_path)[1].lower()
22
 
23
  df = None
@@ -31,7 +31,7 @@ def read_file(file_path):
31
 
32
  return "" if df is None else df.to_json()
33
 
34
- def read_docx(file_path):
35
  doc = Document(file_path)
36
 
37
  text = []
@@ -55,7 +55,7 @@ def read_docx(file_path):
55
 
56
  return "\n".join(text)
57
 
58
- def read_pptx(file_path):
59
  prs = Presentation(file_path)
60
 
61
  text = []
 
17
  def is_ext(file_path, ext):
18
  return os.path.splitext(file_path)[1].lower() == ext.lower()
19
 
20
+ def read_file_json(file_path):
21
  ext = os.path.splitext(file_path)[1].lower()
22
 
23
  df = None
 
31
 
32
  return "" if df is None else df.to_json()
33
 
34
+ def read_docx_text(file_path):
35
  doc = Document(file_path)
36
 
37
  text = []
 
55
 
56
  return "\n".join(text)
57
 
58
+ def read_pptx_text(file_path):
59
  prs = Presentation(file_path)
60
 
61
  text = []