Updated READMEs
This commit is contained in:
parent
d8fd3cb169
commit
cd4f646a2f
3 changed files with 41 additions and 5 deletions
12
README.md
12
README.md
|
|
@ -16,12 +16,14 @@ It supports:
|
||||||
- HTML
|
- HTML
|
||||||
- Text-based formats (CSV, JSON, XML)
|
- Text-based formats (CSV, JSON, XML)
|
||||||
- ZIP files (iterates over contents)
|
- ZIP files (iterates over contents)
|
||||||
... and more!
|
- ... and more!
|
||||||
|
|
||||||
To install MarkItDown, use pip: `pip install markitdown`. Alternatively, you can install it from the source:
|
To install MarkItDown, use pip: `pip install markitdown`. Alternatively, you can install it from the source:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
pip install -e ./packages/markitdown`
|
git clone git@github.com:microsoft/markitdown.git
|
||||||
|
cd markitdown
|
||||||
|
pip install -e packages/markitdown
|
||||||
```
|
```
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
@ -142,6 +144,12 @@ You can help by looking at issues or helping review PRs. Any issue or PR is welc
|
||||||
|
|
||||||
### Running Tests and Checks
|
### Running Tests and Checks
|
||||||
|
|
||||||
|
- Navigate to the MarkItDown package:
|
||||||
|
|
||||||
|
```sh
|
||||||
|
cd packages/markitdown
|
||||||
|
```
|
||||||
|
|
||||||
- Install `hatch` in your environment and run tests:
|
- Install `hatch` in your environment and run tests:
|
||||||
```sh
|
```sh
|
||||||
pip install hatch # Other ways of installing hatch: https://hatch.pypa.io/dev/install/
|
pip install hatch # Other ways of installing hatch: https://hatch.pypa.io/dev/install/
|
||||||
|
|
|
||||||
|
|
@ -56,8 +56,36 @@ sample_plugin = "markitdown_sample_plugin"
|
||||||
|
|
||||||
Here, the value of `sample_plugin` can be any key, but should ideally be the name of the plugin. The value is the fully qualified name of the package implementing the plugin.
|
Here, the value of `sample_plugin` can be any key, but should ideally be the name of the plugin. The value is the fully qualified name of the package implementing the plugin.
|
||||||
|
|
||||||
Once the plugin package is installed (e.g., `pip install -e .`), MarkItDown will automatically discover register it for use.
|
|
||||||
|
|
||||||
|
## Installation
|
||||||
|
|
||||||
|
To use the plugin with MarkItDown, it must be installed. To install the plugin from the current directory use:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
pip install -e .
|
||||||
|
```
|
||||||
|
|
||||||
|
Once the plugin package is installed, verify that it is available to MarkItDown by running:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
markitdown --list-plugins
|
||||||
|
```
|
||||||
|
|
||||||
|
To use the plugin for a conversion use the `--use-plugins` flag. For example, to convert a PDF:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
markitdown --use-plugins path-to-file.pdf
|
||||||
|
```
|
||||||
|
|
||||||
|
In Python, plugins can be enabled as follows:
|
||||||
|
|
||||||
|
```python
|
||||||
|
from markitdown import MarkItDown
|
||||||
|
|
||||||
|
md = MarkItDown(enable_plugins=True)
|
||||||
|
result = md.convert("path-to-file.pdf")
|
||||||
|
print(result.text_content)
|
||||||
|
```
|
||||||
|
|
||||||
## Trademarks
|
## Trademarks
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
> [!IMPORTANT]
|
> [!IMPORTANT]
|
||||||
> MarkItDown is a Python package and command-line utility for converting various files to Markdown (e.g., for indexing, text analysis, etc).
|
> MarkItDown is a Python package and command-line utility for converting various files to Markdown (e.g., for indexing, text analysis, etc).
|
||||||
>
|
>
|
||||||
> For more information, and full documentation, see the project [README.md](https://github.com/microsoft/autogen) on GitHub.
|
> For more information, and full documentation, see the project [README.md](https://github.com/microsoft/markitdown) on GitHub.
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
|
|
@ -41,7 +41,7 @@ print(result.text_content)
|
||||||
|
|
||||||
### More Information
|
### More Information
|
||||||
|
|
||||||
For more information, and full documentation, see the project [README.md](https://github.com/microsoft/autogen) on GitHub.
|
For more information, and full documentation, see the project [README.md](https://github.com/microsoft/markitdown) on GitHub.
|
||||||
|
|
||||||
## Trademarks
|
## Trademarks
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue