MCPcopy Create free account
hub / github.com/TextGeneratorio/text-generator.io / convert_to_markdown

Function convert_to_markdown

questions/document_processor.py:11–17  ·  view source on GitHub ↗

Convert a local file or URL to Markdown using MarkItDown.

(source: str)

Source from the content-addressed store, hash-verified

9
10
11def convert_to_markdown(source: str) -> str:
12 """Convert a local file or URL to Markdown using MarkItDown."""
13 if source.startswith(("http://", "https://")):
14 result = _converter.convert_url(source)
15 else:
16 result = _converter.convert_local(source)
17 return result.markdown
18
19
20async def convert_documents_async(sources: Iterable[str]) -> Dict[str, str]:

Callers 4

mainFunction · 0.90
test_docx_localFunction · 0.90
test_pptx_localFunction · 0.90
test_pdf_localFunction · 0.90

Calls

no outgoing calls

Tested by 3

test_docx_localFunction · 0.72
test_pptx_localFunction · 0.72
test_pdf_localFunction · 0.72