mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-25 19:44:34 +00:00
docs: fix README getting started to reflect single document conversion
This commit is contained in:
parent
95e70962f1
commit
84e45d7191
@ -58,15 +58,15 @@ More [detailed installation instructions](https://docling-project.github.io/docl
|
|||||||
|
|
||||||
## Getting started
|
## Getting started
|
||||||
|
|
||||||
To convert individual documents with python, use `convert()`, for example:
|
To convert individual documents with python, use `convert_single()`, for example:
|
||||||
|
|
||||||
```python
|
```python
|
||||||
from docling.document_converter import DocumentConverter
|
from docling.document_converter import DocumentConverter
|
||||||
|
|
||||||
source = "https://arxiv.org/pdf/2408.09869" # document per local path or URL
|
source = "https://arxiv.org/pdf/2408.09869" # document per local path or URL
|
||||||
converter = DocumentConverter()
|
converter = DocumentConverter()
|
||||||
result = converter.convert(source)
|
result = converter.convert_single(source)
|
||||||
print(result.document.export_to_markdown()) # output: "## Docling Technical Report[...]"
|
print(result.render_as_markdown()) # output: "## Docling Technical Report[...]"
|
||||||
```
|
```
|
||||||
|
|
||||||
More [advanced usage options](https://docling-project.github.io/docling/usage/) are available in
|
More [advanced usage options](https://docling-project.github.io/docling/usage/) are available in
|
||||||
|
Loading…
Reference in New Issue
Block a user