update readme

This commit is contained in:
2025-12-02 21:31:36 +01:00
parent 3056d1ce64
commit a3f76c05d6
+28 -13
View File
@@ -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