mirror of
https://github.com/DS4SD/docling.git
synced 2025-07-25 03:24:59 +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
|
||||
|
||||
To convert individual documents with python, use `convert()`, for example:
|
||||
To convert individual documents with python, use `convert_single()`, for example:
|
||||
|
||||
```python
|
||||
from docling.document_converter import DocumentConverter
|
||||
|
||||
source = "https://arxiv.org/pdf/2408.09869" # document per local path or URL
|
||||
converter = DocumentConverter()
|
||||
result = converter.convert(source)
|
||||
print(result.document.export_to_markdown()) # output: "## Docling Technical Report[...]"
|
||||
result = converter.convert_single(source)
|
||||
print(result.render_as_markdown()) # output: "## Docling Technical Report[...]"
|
||||
```
|
||||
|
||||
More [advanced usage options](https://docling-project.github.io/docling/usage/) are available in
|
||||
|
Loading…
Reference in New Issue
Block a user