From cd6fd70fe12be59eef76b4c5813ef60675c1b016 Mon Sep 17 00:00:00 2001 From: nobody Date: Mon, 19 May 2025 08:31:53 -0400 Subject: [PATCH] Auto-add --help if CLI run w/o args (Commit message edited by @jsvine.) --- pdfplumber/cli.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pdfplumber/cli.py b/pdfplumber/cli.py index 91af3b2..f6fbd07 100644 --- a/pdfplumber/cli.py +++ b/pdfplumber/cli.py @@ -9,6 +9,10 @@ from typing import Any, DefaultDict, Dict, List from .pdf import PDF +if len(sys.argv) == 1: + sys.argv.append('--help') + + def parse_page_spec(p_str: str) -> List[int]: if "-" in p_str: start, end = map(int, p_str.split("-"))