A utt plugin to show projects sorted by time spent
Project description
utt-project-summary
A utt plugin that shows projects sorted by time spent.
Why utt-project-summary?
This plugin provides a quick overview of how your time is distributed across different projects. It groups all activities by project and displays them sorted by total duration, giving you instant visibility into where your time is going.
Key features:
- 📊 Project Breakdown — See all projects sorted by time spent (highest to lowest)
- 📈 Percentage View — Optionally show percentage of total time for each project
- ⏱️ Current Activity — Shows your current activity and includes it in totals
- 📅 Flexible Date Ranges — Report by day, week, month, or custom date ranges
Features
- 📊 Project-Based View - Activities grouped by project, sorted by duration
- 🔢 Optional Percentages - Add
--show-percto see time distribution percentages - 📅 Date Range Support - Use
--from,--to,--week, or--monthflags - 🔌 Native
uttIntegration - Usesutt's plugin API for seamless integration
Installation
Step 1: Install utt
First, install utt (Ultimate Time Tracker):
pip install utt
Verify the installation:
utt --version
Step 2: Install utt-project-summary
Install the plugin:
pip install utt-project-summary
That's it! The plugin is automatically discovered by utt. No additional configuration needed.
Verify Installation
Confirm the project-summary command is available:
utt project-summary --help
Requirements:
- Python 3.10+
utt>= 1.0
Usage
After installation, a new project-summary command is available in utt:
utt project-summary
Example Output
Project Summary
---------------
backend : 4h30
frontend: 2h15
meetings: 1h45
docs : 0h30
Total : 9h00
With Percentages
utt project-summary --show-perc
Project Summary
---------------
backend : 4h30 ( 50.0%)
frontend: 2h15 ( 25.0%)
meetings: 1h45 ( 19.4%)
docs : 0h30 ( 5.6%)
Total : 9h00 (100.0%)
Options
| Option | Default | Description |
|---|---|---|
--show-perc |
false | Show percentage of total time for each project |
--from |
none | Inclusive start date for the report |
--to |
none | Inclusive end date for the report |
--week |
none | Report for a specific week (this, prev, or week number) |
--month |
none | Report for a specific month (this, prev, 2024-10, Oct) |
--project |
none | Filter to show only a specific project |
--current-activity |
-- Current Activity -- |
Set the current activity name |
--no-current-activity |
false | Do not display the current activity |
Examples
Default usage (today's activities):
utt project-summary
Show with percentages:
utt project-summary --show-perc
This week's summary:
utt project-summary --week this
Last month's summary:
utt project-summary --month prev
Custom date range:
utt project-summary --from 2024-01-01 --to 2024-01-31
How It Works
This plugin uses utt's native plugin API to:
- Access your time entries directly (no subprocess calls)
- Filter activities based on date range arguments
- Group activities by project name
- Sort projects by total duration (descending)
- Optionally calculate percentages of total time
License
This project is licensed under the GPL-3.0 License - see the LICENSE file for details.
Development
Running Tests
To run the test suite, first install the development dependencies:
pip install -e ".[dev]"
Then run the tests with pytest:
pytest
For coverage reporting:
pytest --cov=utt_project_summary --cov-report=term-missing
Linting & Formatting
Run ruff (linter, formatter, and import sorting):
# Check for linting errors
ruff check .
# Auto-fix linting errors (including import sorting)
ruff check --fix .
# Format code
ruff format .
Type Checking
Run ty (type checker):
ty check src/
Run All Checks
ruff check --fix . && ruff format . && ty check src/ && pytest
Pre-commit Hooks
Install pre-commit hooks to automatically run checks before each commit:
pre-commit install
Run hooks manually on all files:
pre-commit run --all-files
Contributing
Contributions are welcome! Here's how to get started:
Setting Up for Development
-
Clone the repository:
git clone https://github.com/loganthomas/utt-project-summary.git cd utt-project-summary
-
Create a virtual environment:
python -m venv .venv source .venv/bin/activate # On Windows: .venv\Scripts\activate
-
Install in editable mode with dev dependencies:
pip install -e ".[dev]"
-
Install pre-commit hooks:
pre-commit install
Submitting Changes
- Create a new branch for your feature or fix
- Make your changes following the code style guidelines
- Ensure all tests pass:
pytest - Ensure code passes linting:
ruff check . && ruff format --check . - Submit a pull request with a clear description of your changes
Code Style Guidelines
- Follow PEP 8 conventions
- Use type hints for all function signatures
- Write docstrings in NumPy style
- Keep functions focused and single-purpose
- Prefer explicit over implicit
Related
utt(Ultimate Time Tracker) - The time tracking tool this plugin extendsuttPlugin Documentation - How to createuttpluginsutt-balance- Anotheruttplugin for checking work-life balance
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file utt_project_summary-0.1.0rc1.tar.gz.
File metadata
- Download URL: utt_project_summary-0.1.0rc1.tar.gz
- Upload date:
- Size: 21.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0c6c95cfe8cdd5ab11f09d84f9093e1c2c995c634a95c2a64c77c3c3a6c9ad13
|
|
| MD5 |
89a067edaaef99ed03c1d64af72b77bc
|
|
| BLAKE2b-256 |
cce242805d35aa3b5efd517a050522942ac83058b6eef3ea795486d91d7bb06a
|
File details
Details for the file utt_project_summary-0.1.0rc1-py3-none-any.whl.
File metadata
- Download URL: utt_project_summary-0.1.0rc1-py3-none-any.whl
- Upload date:
- Size: 18.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b3ad7da84f5be1eab4704ea1b5b30516847f6d3d3f2ee1b9f21f8349e08cf32b
|
|
| MD5 |
e286a7ea4c85e70da4b36f755a793b55
|
|
| BLAKE2b-256 |
3f4e32a4e4436e8daa9f1d0a22ee7a38eedc5a99c4b7cc40c98dcf5623d061f4
|