diff --git a/.coverage b/.coverage index addd3c5..b76cff1 100644 Binary files a/.coverage and b/.coverage differ diff --git a/AGENTS.md b/AGENTS.md index 03e77ae..f803a08 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -53,22 +53,22 @@ Do **not** use `pip` or `python` directly. ```sh # Print CSV to stdout (date defaults to today) -uv run timesheets input.md +uv run timesheets --input input.md # Write CSV to a file -uv run timesheets input.md -o output.csv +uv run timesheets --input input.md -o output.csv # Override the date (DD/MM/YY) -uv run timesheets input.md --date 22/05/26 +uv run timesheets --input input.md --date 22/05/26 # Use a specific project map file -uv run timesheets input.md --map /path/to/project_map.json +uv run timesheets --input input.md --map /path/to/project_map.json # Print a human-readable summary instead of CSV -uv run timesheets input.md --summary +uv run timesheets --input input.md --summary # Read from stdin -cat input.md | uv run timesheets - +cat input.md | uv run timesheets --input - # Fetch today's entries from Joplin (token via env var) JOPLIN_TOKEN=your_token uv run timesheets --joplin diff --git a/src/timesheets/cli.py b/src/timesheets/cli.py index e48103b..9d7f8b7 100644 --- a/src/timesheets/cli.py +++ b/src/timesheets/cli.py @@ -16,9 +16,10 @@ def build_parser() -> argparse.ArgumentParser: source = parser.add_mutually_exclusive_group(required=True) source.add_argument( - "input", - nargs="?", + "--input", + "-i", help="Path to the markdown file containing the timesheet table, or '-' to read from stdin.", + default=None, ) source.add_argument( "--joplin",