Metadata-Version: 2.4
Name: easydone
Version: 0.2.1
Summary: A CLI app made with python for easy tasks management.
Author-email: Pedro Alberto Rosquete Ares <rosquetearespedro06@gmail.com>
License: MIT License
        
        Copyright (c) 2026 Pedro Alberto Rosquete Ares
        
        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.
        
Project-URL: Documentation, https://github.com/prares-dev/easydone.git
Project-URL: Homepage, https://github.com/prares-dev/easydone.git
Project-URL: Repository, https://github.com/prares-dev/easydone.git
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: rich>=13.0
Provides-Extra: dev
Requires-Dist: pytest>=8.0; extra == "dev"
Dynamic: license-file

# easydone - Task Tracker App

> A focused command-line task manager for turning a messy to-do list into a clear next action.

easydone is a lightweight Python CLI for creating, updating, completing, deleting, and filtering tasks directly from your terminal. Tasks are saved as readable JSON, and the storage layer now includes **automatic backups, corruption quarantine, and atomic writes** to keep your data safe.

## Why easydone?

- Fast terminal-first workflow  
- Statuses for work in motion: `not-done`, `in-progress`, and `done`  
- Four priority levels: `low`, `normal`, `high`, and `urgent`  
- Filter tasks by status, priority, or both  
- Human-readable JSON storage with no database setup  
- **Bulletproof data handling**: atomic writes, automatic `.bak` backups, and quarantine of corrupted files  
- Pretty terminal output with [Rich](https://github.com/Textualize/rich) (falls back to plain text if unavailable)

## Project Structure

```text
easydone/
├── easydone/
│   ├── __init__.py   # Package metadata (version, etc.)
│   ├── __main__.py   # Application entry point
│   ├── cli.py        # Argument parser and command dispatch
│   ├── logic.py      # Task-management operations
│   ├── storage.py    # JSON loading/saving with backup & quarantine
│   └── format.py     # Output formatting (Rich / plain)
├── tests/
│   ├── test_cli.py
│   ├── test_logic.py
│   ├── test_storage.py
│   └── test_format.py
├── LICENSE
├── pyproject.toml    # Packaging and pytest configuration
└── README.md
```

## Quick Start

### Requirements

- Python 3.9 or newer  
- Windows PowerShell, macOS, or Linux terminal

From the project root, create a virtual environment and install `easydone` in editable mode:

```powershell
py -m venv .venv
.\.venv\Scripts\Activate.ps1
py -m pip install -e .
```

On macOS or Linux:

```bash
python3 -m venv .venv
source .venv/bin/activate
python -m pip install -e .
```

Or install directly from PyPI:

```powershell
py -m pip install easydone
```

You can now run the application:

```shell
easydone
```

To see all available commands:

```shell
easydone --help
```

## Everyday Workflow

Create a task:

```shell
easydone new "Read a book"
```

Create a task with a status and priority:

```shell
easydone new "Finish project report" --status in-progress --priority high
```

List everything:

```shell
easydone list
```

Focus on urgent unfinished work:

```shell
easydone list --status not-done --priority urgent
```

Mark a task as complete:

```shell
easydone mark 123 done
```

## Command Reference

### `new`

Create a task. The description is required.

```shell
easydone new DESCRIPTION [--status STATUS] [--priority PRIORITY]
```

Options:

- `-s`, `--status`: `not-done`, `done`, or `in-progress`; defaults to `not-done`
- `-p`, `--priority`: `low`, `normal`, `high`, or `urgent`; defaults to `low`

### `update`

Change the description and/or priority of an existing task.  
The `--priority` option now validates against the four allowed values.

```shell
easydone update TASK_ID [--description NEW_DESCRIPTION] [--priority NEW_PRIORITY]
```

Examples:

```shell
easydone update 123 --description "Read a novel"
easydone update 123 --priority high
```

### `mark`

Change the status of an existing task.

```shell
easydone mark TASK_ID new-status
```

### `delete`

Delete one or more existing tasks. easydone tasks for confirmation for each ID unless `-f` or `--forced` is used.

```shell
easydone delete TASK_ID [TASK_ID ...]
easydone delete TASK_ID [TASK_ID ...] --forced
```

If you supply multiple IDs, all of them are validated before any deletion occurs. If any ID is invalid, the entire operation is aborted and no tasks are removed.

### `list`

List all tasks or filter them by status and priority. You can omit dates with the `--no-dates` option.

```shell
easydone list [--status STATUS] [--priority PRIORITY] [--no-dates]
```

When both filters are supplied, a task must match both of them.

## Data Storage

`easydone` stores task data in a user‑scoped application directory so it does not depend on where the command is launched from.

- **Windows**: `%APPDATA%\easydone\tasks.json`
- **macOS**: `~/Library/Application Support/easydone/tasks.json`
- **Linux**: `~/.local/share/easydone/tasks.json`

The app writes a small metadata wrapper with the file schema version and the version of easydone that saved it. This makes future upgrades safer and compatibility warnings explicit.

```json
{
    "schema_version": 1,
    "app_version": "0.2.0",
    "saved_at": "2026-08-28",
    "tasks": {
        "123": {
            "description": "Finish project report",
            "status": "in-progress",
            "priority": "high",
            "created-at": "2026-08-28",
            "updated-at": null
        }
    }
}
```

### Safety & Recovery

`easydone` now protects your data in three ways:

1. **Atomic writes**: Every save writes to a temporary file first, then swaps it atomically. A crash mid‑write never leaves a half‑written file.
2. **Automatic backups**: Before every save, the current `tasks.json` is copied to `tasks.json.bak`. If something goes wrong, you can restore from this backup.
3. **Corruption quarantine**: If easydone encounters an unreadable or malformed file on load, it copies that file to `tasks.corrupted-<timestamp>.json` instead of discarding it. You can inspect the quarantined file and recover data manually.

If an older file is found (different schema or app version), `easydone` still loads it but prints a detailed warning so you can review the data before saving again.

## Development

Install the development dependency group:

```shell
py -m pip install -e ".[dev]"
```

Run the complete test suite:

```shell
py -m pytest
```

Run a specific test module:

```shell
py -m pytest tests/logic_test.py
py -m pytest tests/storage_test.py
py -m pytest tests/format_test.py
```

## License

This project is available under the license in [LICENSE](LICENSE).
