Name | markitdown JSON |
Version |
0.0.1a3
JSON |
| download |
home_page | None |
Summary | None |
upload_time | 2024-12-17 21:55:54 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.10 |
license | MIT |
keywords |
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# MarkItDown
[](https://pypi.org/project/markitdown/)
The MarkItDown library is a utility tool for converting various files to Markdown (e.g., for indexing, text analysis, etc.)
It presently supports:
- PDF (.pdf)
- PowerPoint (.pptx)
- Word (.docx)
- Excel (.xlsx)
- Images (EXIF metadata, and OCR)
- Audio (EXIF metadata, and speech transcription)
- HTML (special handling of Wikipedia, etc.)
- Various other text-based formats (csv, json, xml, etc.)
- ZIP (Iterates over contents and converts each file)
# Installation
You can install `markitdown` using pip:
```python
pip install markitdown
```
or from the source
```sh
pip install -e .
```
# Usage
The API is simple:
```python
from markitdown import MarkItDown
markitdown = MarkItDown()
result = markitdown.convert("test.xlsx")
print(result.text_content)
```
To use this as a command-line utility, install it and then run it like this:
```bash
markitdown path-to-file.pdf
```
This will output Markdown to standard output. You can save it like this:
```bash
markitdown path-to-file.pdf > document.md
```
You can pipe content to standard input by omitting the argument:
```bash
cat path-to-file.pdf | markitdown
```
You can also configure markitdown to use Large Language Models to describe images. To do so you must provide `llm_client` and `llm_model` parameters to MarkItDown object, according to your specific client.
```python
from markitdown import MarkItDown
from openai import OpenAI
client = OpenAI()
md = MarkItDown(llm_client=client, llm_model="gpt-4o")
result = md.convert("example.jpg")
print(result.text_content)
```
You can also use the project as Docker Image:
```sh
docker build -t markitdown:latest .
docker run --rm -i markitdown:latest < ~/your-file.pdf > output.md
```
## Contributing
This project welcomes contributions and suggestions. Most contributions require you to agree to a
Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us
the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.
When you submit a pull request, a CLA bot will automatically determine whether you need to provide
a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions
provided by the bot. You will only need to do this once across all repos using our CLA.
This project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).
For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or
contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.
### Running Tests
To run tests, install `hatch` using `pip` or other methods as described [here](https://hatch.pypa.io/dev/install).
```sh
pip install hatch
hatch shell
hatch test
```
### Running Pre-commit Checks
Please run the pre-commit checks before submitting a PR.
```sh
pre-commit run --all-files
```
## Trademarks
This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft
trademarks or logos is subject to and must follow
[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).
Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.
Any use of third-party trademarks or logos are subject to those third-party's policies.
Raw data
{
"_id": null,
"home_page": null,
"name": "markitdown",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": null,
"keywords": null,
"author": null,
"author_email": "Adam Fourney <adamfo@microsoft.com>",
"download_url": "https://files.pythonhosted.org/packages/cf/ee/fb24f08015cb7f9875016897e11f8e566eb856275d9efe18cff865469a51/markitdown-0.0.1a3.tar.gz",
"platform": null,
"description": "# MarkItDown\n\n[](https://pypi.org/project/markitdown/)\n\nThe MarkItDown library is a utility tool for converting various files to Markdown (e.g., for indexing, text analysis, etc.)\n\nIt presently supports:\n\n- PDF (.pdf)\n- PowerPoint (.pptx)\n- Word (.docx)\n- Excel (.xlsx)\n- Images (EXIF metadata, and OCR)\n- Audio (EXIF metadata, and speech transcription)\n- HTML (special handling of Wikipedia, etc.)\n- Various other text-based formats (csv, json, xml, etc.)\n- ZIP (Iterates over contents and converts each file)\n\n# Installation\n\nYou can install `markitdown` using pip:\n\n```python\npip install markitdown\n```\n\nor from the source\n\n```sh\npip install -e .\n```\n\n# Usage\nThe API is simple:\n\n```python\nfrom markitdown import MarkItDown\n\nmarkitdown = MarkItDown()\nresult = markitdown.convert(\"test.xlsx\")\nprint(result.text_content)\n```\n\nTo use this as a command-line utility, install it and then run it like this:\n\n```bash\nmarkitdown path-to-file.pdf\n```\n\nThis will output Markdown to standard output. You can save it like this:\n\n```bash\nmarkitdown path-to-file.pdf > document.md\n```\n\nYou can pipe content to standard input by omitting the argument:\n\n```bash\ncat path-to-file.pdf | markitdown\n```\n\nYou can also configure markitdown to use Large Language Models to describe images. To do so you must provide `llm_client` and `llm_model` parameters to MarkItDown object, according to your specific client.\n\n\n```python\nfrom markitdown import MarkItDown\nfrom openai import OpenAI\n\nclient = OpenAI()\nmd = MarkItDown(llm_client=client, llm_model=\"gpt-4o\")\nresult = md.convert(\"example.jpg\")\nprint(result.text_content)\n```\n\nYou can also use the project as Docker Image:\n\n```sh\ndocker build -t markitdown:latest .\ndocker run --rm -i markitdown:latest < ~/your-file.pdf > output.md\n```\n\n## Contributing\n\nThis project welcomes contributions and suggestions. Most contributions require you to agree to a\nContributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us\nthe rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.\n\nWhen you submit a pull request, a CLA bot will automatically determine whether you need to provide\na CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions\nprovided by the bot. You will only need to do this once across all repos using our CLA.\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/).\nFor more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or\ncontact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n### Running Tests\n\nTo run tests, install `hatch` using `pip` or other methods as described [here](https://hatch.pypa.io/dev/install).\n\n```sh\npip install hatch\nhatch shell\nhatch test\n```\n\n### Running Pre-commit Checks\n\nPlease run the pre-commit checks before submitting a PR.\n\n```sh\npre-commit run --all-files\n```\n\n## Trademarks\n\nThis project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft \ntrademarks or logos is subject to and must follow \n[Microsoft's Trademark & Brand Guidelines](https://www.microsoft.com/en-us/legal/intellectualproperty/trademarks/usage/general).\nUse of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship.\nAny use of third-party trademarks or logos are subject to those third-party's policies.\n",
"bugtrack_url": null,
"license": "MIT",
"summary": null,
"version": "0.0.1a3",
"project_urls": {
"Documentation": "https://github.com/microsoft/markitdown#readme",
"Issues": "https://github.com/microsoft/markitdown/issues",
"Source": "https://github.com/microsoft/markitdown"
},
"split_keywords": [],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "8ff1b67a849dfbe3bc95fea6b7ba60ed47dbf5b5442131345e4c4f5d48c6216e",
"md5": "089e49be9cd049e9be449b8c0004653e",
"sha256": "6efcab2f05714675486dc2ddf912415734b1caa0343f73f75d852046f04e5f37"
},
"downloads": -1,
"filename": "markitdown-0.0.1a3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "089e49be9cd049e9be449b8c0004653e",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 16199,
"upload_time": "2024-12-17T21:55:52",
"upload_time_iso_8601": "2024-12-17T21:55:52.708302Z",
"url": "https://files.pythonhosted.org/packages/8f/f1/b67a849dfbe3bc95fea6b7ba60ed47dbf5b5442131345e4c4f5d48c6216e/markitdown-0.0.1a3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "cfeefb24f08015cb7f9875016897e11f8e566eb856275d9efe18cff865469a51",
"md5": "1f4a546ba15e6e64ab5c1154e63ae237",
"sha256": "f6c8f5f7f5541e91c6c535218318968fefd71e2a6faa0eb782b3492e04cd023d"
},
"downloads": -1,
"filename": "markitdown-0.0.1a3.tar.gz",
"has_sig": false,
"md5_digest": "1f4a546ba15e6e64ab5c1154e63ae237",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 16073,
"upload_time": "2024-12-17T21:55:54",
"upload_time_iso_8601": "2024-12-17T21:55:54.986391Z",
"url": "https://files.pythonhosted.org/packages/cf/ee/fb24f08015cb7f9875016897e11f8e566eb856275d9efe18cff865469a51/markitdown-0.0.1a3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-12-17 21:55:54",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "microsoft",
"github_project": "markitdown#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "markitdown"
}