diff --git a/pyproject.toml b/pyproject.toml index 3e14cec..323039e 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -35,6 +35,7 @@ dependencies = [ "pdfminer.six", "puremagic", "pydub", + "shtab", "youtube-transcript-api", "SpeechRecognition", "pathvalidate", diff --git a/src/markitdown/__main__.py b/src/markitdown/__main__.py index d986f15..5386728 100644 --- a/src/markitdown/__main__.py +++ b/src/markitdown/__main__.py @@ -4,6 +4,7 @@ import sys import argparse from textwrap import dedent +import shtab from ._markitdown import MarkItDown @@ -22,7 +23,8 @@ def main(): parser.add_argument( "filename", nargs="?", help="if unspecified, defaults to stdin" - ) + ).complete = shtab.FILE + shtab.add_argument_to(parser) args = parser.parse_args() markitdown = MarkItDown() result = markitdown.convert(args.filename or sys.stdin.buffer)