File tree 2 files changed +6
-3
lines changed
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change 1
1
# SPDX-FileCopyrightText: 2024-present Adam Fourney <[email protected] >
2
2
#
3
3
# SPDX-License-Identifier: MIT
4
- __version__ = "0.0.1a3 "
4
+ __version__ = "0.0.1a4 "
Original file line number Diff line number Diff line change 3
3
# SPDX-License-Identifier: MIT
4
4
import argparse
5
5
import sys
6
+ import shutil
6
7
from textwrap import dedent
7
8
from .__about__ import __version__
8
9
from ._markitdown import MarkItDown , DocumentConverterResult
@@ -74,16 +75,18 @@ def main():
74
75
parser .add_argument ("filename" , nargs = "?" )
75
76
args = parser .parse_args ()
76
77
78
+ which_exiftool = shutil .which ("exiftool" )
79
+
77
80
if args .use_docintel :
78
81
if args .endpoint is None :
79
82
raise ValueError (
80
83
"Document Intelligence Endpoint is required when using Document Intelligence."
81
84
)
82
85
elif args .filename is None :
83
86
raise ValueError ("Filename is required when using Document Intelligence." )
84
- markitdown = MarkItDown (docintel_endpoint = args .endpoint )
87
+ markitdown = MarkItDown (exiftool_path = which_exiftool , docintel_endpoint = args .endpoint )
85
88
else :
86
- markitdown = MarkItDown ()
89
+ markitdown = MarkItDown (exiftool_path = which_exiftool )
87
90
88
91
if args .filename is None :
89
92
result = markitdown .convert_stream (sys .stdin .buffer )
You can’t perform that action at this time.
0 commit comments