mirror of
https://github.com/DS4SD/docling.git
synced 2025-12-08 12:48:28 +00:00
11
docs/examples/extraction.py
vendored
11
docs/examples/extraction.py
vendored
@@ -132,16 +132,15 @@ def parse_args(argv: Optional[Sequence[str]] = None) -> argparse.Namespace:
|
|||||||
|
|
||||||
def main(argv: Optional[Sequence[str]] = None) -> None:
|
def main(argv: Optional[Sequence[str]] = None) -> None:
|
||||||
args = parse_args(argv)
|
args = parse_args(argv)
|
||||||
match args.example:
|
if args.example == "string":
|
||||||
case "string":
|
|
||||||
example_with_string_template(args.source)
|
example_with_string_template(args.source)
|
||||||
case "dict":
|
elif args.example == "dict":
|
||||||
example_with_dict_template(args.source)
|
example_with_dict_template(args.source)
|
||||||
case "pydantic":
|
elif args.example == "pydantic":
|
||||||
example_with_pydantic_template(args.source)
|
example_with_pydantic_template(args.source)
|
||||||
case "advanced":
|
elif args.example == "advanced":
|
||||||
example_with_advanced_pydantic_template(args.source)
|
example_with_advanced_pydantic_template(args.source)
|
||||||
case _:
|
else:
|
||||||
run_all_examples(args.source)
|
run_all_examples(args.source)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user