Skip to content

Commit

Permalink
fix: argparse CLI option ordering, fixes #268
Browse files Browse the repository at this point in the history
  • Loading branch information
slhck committed Jan 17, 2025
1 parent f58a864 commit 01fea45
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/markitdown/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 01fea45

Please sign in to comment.