mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 20:58:11 +00:00
docs: support running examples from root or subfolder (#1816)
support running examples from root or subfolder Signed-off-by: Michele Dolfi <dol@zurich.ibm.com>
This commit is contained in:
11
docs/examples/batch_convert.py
vendored
11
docs/examples/batch_convert.py
vendored
@@ -121,14 +121,15 @@ def export_documents(
|
||||
def main():
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
|
||||
data_folder = Path(__file__).parent / "../../tests/data"
|
||||
input_doc_paths = [
|
||||
Path("./tests/data/pdf/2206.01062.pdf"),
|
||||
Path("./tests/data/pdf/2203.01017v2.pdf"),
|
||||
Path("./tests/data/pdf/2305.03393v1.pdf"),
|
||||
Path("./tests/data/pdf/redp5110_sampled.pdf"),
|
||||
data_folder / "pdf/2206.01062.pdf",
|
||||
data_folder / "pdf/2203.01017v2.pdf",
|
||||
data_folder / "pdf/2305.03393v1.pdf",
|
||||
data_folder / "pdf/redp5110_sampled.pdf",
|
||||
]
|
||||
|
||||
# buf = BytesIO(Path("./test/data/2206.01062.pdf").open("rb").read())
|
||||
# buf = BytesIO((data_folder / "pdf/2206.01062.pdf").open("rb").read())
|
||||
# docs = [DocumentStream(name="my_doc.pdf", stream=buf)]
|
||||
# input = DocumentConversionInput.from_streams(docs)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user