mirror of
https://github.com/jsvine/pdfplumber.git
synced 2026-08-29 08:34:23 +08:00
Auto-add --help if CLI run w/o args
(Commit message edited by @jsvine.)
This commit is contained in:
committed by
Jeremy Singer-Vine
parent
02ff4313f8
commit
cd6fd70fe1
@@ -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("-"))
|
||||
|
||||
Reference in New Issue
Block a user