MCPcopy Index your code
hub / github.com/codingis4noobs2/QuickDigest / process_documents

Function process_documents

app.py:198–211  ·  view source on GitHub ↗
(documents)

Source from the content-addressed store, hash-verified

196
197 # Process uploaded documents
198 def process_documents(documents):
199 processed_docs = []
200 for doc in documents:
201 if doc.endswith('.pdf'):
202 processed_docs.append(process_pdf(doc))
203 elif doc.endswith(('.doc', '.docx')):
204 text = read_word_file(doc)
205 txt_filepath = save_extracted_text_to_txt(text, os.path.basename(doc))
206 processed_docs.append(txt_filepath)
207 elif doc.endswith(('.mp3', '.mp4', '.mpeg')):
208 processed_docs.append(transcribe_and_save(doc))
209 else:
210 processed_docs.append(doc)
211 return processed_docs
212
213 # Process PDF files
214 def process_pdf(pdf_path):

Callers 1

chat_with_filesFunction · 0.85

Calls 4

process_pdfFunction · 0.85
read_word_fileFunction · 0.85
transcribe_and_saveFunction · 0.85

Tested by

no test coverage detected