From a3f76c05d6971d74fcc219db74d80c6f117f5528 Mon Sep 17 00:00:00 2001 From: julle Date: Tue, 2 Dec 2025 21:31:36 +0100 Subject: [PATCH] update readme --- README.md | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index 64cdae0..32701d1 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,12 @@ A time reporting application for the Kleer API with both FastAPI web interface a ## Features -- ๐ŸŽจ **Modern Web UI**: Beautiful, responsive web interface with drag-and-drop file upload -- ๐Ÿ“Š **CSV Processing**: Parse and extract work time from CSV files -- ๐ŸŒ **REST API**: FastAPI endpoints for time reporting -- ๐Ÿ’ป **CLI Interface**: Interactive command-line time reporting -- โœ… **Input Validation**: Pydantic models for data validation -- ๐Ÿงช **Tested**: Unit tests with pytest -- ๐Ÿ“ **Well-Documented**: Comprehensive docstrings and type hints +- ๐ŸŽจ **Modern Web UI**: Responsive glassy interface with drag/drop upload and live status +- ๐Ÿ“‘ **CSV + XLSX**: Parse CSV or XLSX (reads `AGRESSO` sheet) for time extraction +- โœ… **Approvals**: View and approve events over a date range from the UI or API +- ๐ŸŒ **REST API**: FastAPI endpoints for projects, reporting, events, and approvals +- ๐Ÿ’ป **CLI**: Interactive command-line mode for CSV/XLSX files +- ๐Ÿงช **Tested**: Unit tests with pytest and mocked API calls ## Quick Start @@ -104,10 +103,11 @@ python main.py cli ### Using the Web UI 1. **Open your browser** to `http://localhost:8000` -2. **Upload your CSV file** by dragging and dropping or clicking to browse +2. **Upload your CSV or XLSX** (XLSX uses the `AGRESSO` sheet) via drag/drop or browse 3. **Select a project** from the dropdown 4. **Click "Report Time"** to submit -5. View the **results summary** with total hours and days reported +5. Optionally **load and approve events** by selecting a date range in the Approve Events panel +6. View the **results summary** with total hours and days reported The web interface features: - ๐ŸŽฏ Drag-and-drop file upload @@ -150,11 +150,11 @@ Lists all active projects for the configured user. ``` ### POST /report-time -Upload a CSV file and report time to a specific project. +Upload a CSV or XLSX file and report time to a specific project. **Parameters:** - `project_name` (query): Name of the project -- `file` (form): CSV file with time entries +- `file` (form): CSV or XLSX file with time entries (XLSX sheet: `AGRESSO`) **Response:** ```json @@ -170,9 +170,23 @@ Upload a CSV file and report time to a specific project. ### GET /docs Interactive API documentation (Swagger UI). -## CSV Format +### GET /events +List events for the configured user within a date range. -The application **automatically detects** the CSV delimiter (comma or semicolon) and column structure. +**Query parameters:** +- `start_date` (YYYY-MM-DD) +- `end_date` (YYYY-MM-DD) + +### POST /approve-events +Approve events for the configured user within a date range. + +**Query parameters:** +- `start_date` (YYYY-MM-DD) +- `end_date` (YYYY-MM-DD) + +## CSV/XLSX Format + +The application **automatically detects** the CSV delimiter (comma or semicolon) and column structure. XLSX parsing reads rows from the `AGRESSO` worksheet. ### Supported Formats @@ -196,6 +210,7 @@ reg_period,xreg_period,T,Time code,Time code (T),Vouch.date,Project Activity,Pro - **Date formats**: Supports both `MM/DD/YYYY` and `YYYY-MM-DD` - **Hours format**: Supports decimal hours with comma (`,`) or dot (`.`) as separator - **Whitespace**: Automatically trimmed from values +- **XLSX**: Only the `AGRESSO` worksheet is read; empty rows are skipped and date cells are normalized ## Development