1 Commits

Author SHA1 Message Date
Adam Fourney
abe9752438 Bumped version 2025-02-10 16:01:17 -08:00
2 changed files with 6 additions and 3 deletions

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2024-present Adam Fourney <adamfo@microsoft.com>
#
# SPDX-License-Identifier: MIT
__version__ = "0.0.1a3"
__version__ = "0.0.1a4"

View File

@@ -3,6 +3,7 @@
# SPDX-License-Identifier: MIT
import argparse
import sys
import shutil
from textwrap import dedent
from .__about__ import __version__
from ._markitdown import MarkItDown, DocumentConverterResult
@@ -74,6 +75,8 @@ def main():
parser.add_argument("filename", nargs="?")
args = parser.parse_args()
which_exiftool = shutil.which("exiftool")
if args.use_docintel:
if args.endpoint is None:
raise ValueError(
@@ -81,9 +84,9 @@ def main():
)
elif args.filename is None:
raise ValueError("Filename is required when using Document Intelligence.")
markitdown = MarkItDown(docintel_endpoint=args.endpoint)
markitdown = MarkItDown(exiftool_path=which_exiftool, docintel_endpoint=args.endpoint)
else:
markitdown = MarkItDown()
markitdown = MarkItDown(exiftool_path=which_exiftool)
if args.filename is None:
result = markitdown.convert_stream(sys.stdin.buffer)