MCPcopy Create free account
hub / github.com/codingis4noobs2/QuickDigest / save_extracted_text_to_txt

Function save_extracted_text_to_txt

app.py:178–183  ·  view source on GitHub ↗
(text, filename)

Source from the content-addressed store, hash-verified

176
177 # Save extracted text to a txt file
178 def save_extracted_text_to_txt(text, filename):
179 txt_filename = os.path.splitext(filename)[0] + ".txt"
180 txt_filepath = os.path.join('uploads', txt_filename)
181 with open(txt_filepath, 'w', encoding='utf-8') as txt_file:
182 txt_file.write(text)
183 return txt_filepath
184
185 # Get OpenAI API key from session state
186 def get_key():

Callers 2

process_documentsFunction · 0.85
process_pdfFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected