Add serve command to start CORS enabled Flask server
Add a serve command to start a CORS-enabled Flask server for file conversion.
-
New Flask Server: Add
src/markitdown/server.pyto define a Flask server with CORS enabled and a route to convert files to markdown. -
Dependencies: Update
pyproject.tomlto includeflaskandflask-corsas dependencies and add theservecommand to the[project.scripts]section. -
Documentation: Update
README.mdwith instructions on how to use theservecommand. -
Tests: Add tests in
tests/test_markitdown.pyto verify the functionality of theservecommand, including handling both URL and file POST data.
In case we decide not to have serve command we have markdown-converter.
@microsoft-github-policy-service agree
@microsoft-github-policy-service agree