Metadata-Version: 2.4
Name: Examtracker
Version: 1.1.0
Summary: A Python exam tracker for the Lernphase .It allows you to keep track of all exams you have completed and the scores you achieved.
Author-email: Samuel Huwiler <samuel.huwiler@gmx.ch>
License: MIT License
        
        Copyright (c) 2026 Samuel Huwiler
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
        
Requires-Python: >=3.13
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: textual
Requires-Dist: sqlalchemy
Requires-Dist: flask-sqlalchemy
Requires-Dist: pydantic
Requires-Dist: pydantic-settings
Requires-Dist: pathlib
Requires-Dist: pyyaml
Dynamic: license-file

[![MIT License](https://img.shields.io/badge/License-MIT-green.svg)](https://choosealicense.com/licenses/mit/)
<a href="https://github.com/psf/black"><img alt="Code style: black" src="https://img.shields.io/badge/code%20style-black-000000.svg"></a>
![Python Version from PEP 621 TOML](https://img.shields.io/python/required-version-toml?tomlFilePath=https%3A%2F%2Fraw.githubusercontent.com%2FSamhuw8a%2FExamtracker%2Fmaster%2Fpyproject.toml&color=d8634c)

# Examtracker

A Python exam tracker for the **"Lernphase"**.  
It allows you to keep track of all exams you have completed and the scores you achieved.

The application uses:

- SQLAlchemy + SQLite for data storage  
- Textual as the TUI backend  

---

# Installation

### Clone the repository

```bash
git clone https://github.com/Samhuw8a/Examtracker.git
```

### Install the project

```bash
cd Examtracker
python -m pip install -e .
```

> You might need to add the `--break-system-packages` flag to the install command

---

# Usage

Once installed, you can start the program with:

```bash
examtracker
```

---

# Configuration

You can change the location of the database file using a configuration file.

By default, the program searches for:

```
~/.config/examtracker/config.yml
```

---

## Default `config.yml`

<details>
<summary>default configuration</summary>

```yaml
database_path: "<path to repo>/data/test.db"
css_path: "<path to repo>/data/style.css"
```

</details>

---

## Environment Variables

All configuration options can also be set using environment variables.

You can even change the location where the program searches for the configuration file.

<details>
<summary>Environment variables</summary>

```env
EXAMTRACKER_DATABASE_PATH=/tmp/test.db
EXAMTRACKER_CSS_PATH=/tmp/style.css
EXAMTRACKER_CONFIG=/tmp/config.yml
```

</details>

Environment variables override values defined in `config.yml`.

---

# Database Schema

### `exams`
- `id`
- `name`
- `max_points`
- `scored_points`
- `class_id`

### `classes`
- `id`
- `name`
- `semester_id`

### `semester`
- `id`
- `name` (unique)

---

# TODO

- [x] Handle SQL errors  
- [x] Initialize database  
- [x] Configuration file support  
- [x] Abort edit and add screens  
- [x] Cross-platform config discovery  
- [ ] Improve CSS  
