From 01fea457ed2c68946990bdb2ab22a25ffda8226f Mon Sep 17 00:00:00 2001 From: Werner Robitza Date: Fri, 17 Jan 2025 11:26:07 +0100 Subject: [PATCH] fix: argparse CLI option ordering, fixes #268 --- src/markitdown/__main__.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/markitdown/__main__.py b/src/markitdown/__main__.py index b6cf963b..8bfa718a 100644 --- a/src/markitdown/__main__.py +++ b/src/markitdown/__main__.py @@ -51,12 +51,13 @@ def main(): help="show the version number and exit", ) - parser.add_argument("filename", nargs="?") parser.add_argument( "-o", "--output", help="Output file name. If not provided, output is written to stdout.", ) + + parser.add_argument("filename", nargs="?") args = parser.parse_args() if args.filename is None: