Find hard-work patterns over rolling 5-day windows in calendar export files.
Project description
hwp5
hwp5 is a small Python library that scans calendar export files (.ics)
to find hard-work patterns over rolling 5-day windows.
It is useful when you want to answer:
- "Did I do at least 20 focused work hours over any 5-day period?"
- "Which calendar periods were my most intense hard-work blocks?"
Features
- Reads standard ICS calendar exports.
- Filters events by keyword in
SUMMARY(default:hard work,deep work,focus). - Computes rolling
N-day windows (default: 5 days). - Returns only windows that pass a minimum total-hour threshold.
- Includes a CLI command (
hwp5) and importable Python API.
Installation
pip install hwp5
CLI usage
hwp5 calendar.ics
hwp5 calendar.ics --window-days 5 --min-hours 25
hwp5 calendar.ics --keyword "hard work" --keyword "coding" --json
Example output:
Hard-work windows found:
- 2026-05-01 to 2026-05-05: 21.5h across 7 events
- 2026-05-02 to 2026-05-06: 24.0h across 8 events
Python usage
from hwp5 import load_ics_events, find_hard_work_windows
events = load_ics_events("calendar.ics")
windows = find_hard_work_windows(events, window_days=5, min_hours=20)
for w in windows:
print(w.start_date, w.end_date, w.total_hours)
Publish to PyPI
- Update
versioninpyproject.toml. - Build:
python -m pip install --upgrade build twine python -m build
- Check package:
python -m twine check dist/*
- Upload:
python -m twine upload dist/*
Development
python -m pip install -e ".[dev]"
pytest
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
hwp5-0.1.0.tar.gz
(5.8 kB
view details)
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
hwp5-0.1.0-py3-none-any.whl
(6.2 kB
view details)
File details
Details for the file hwp5-0.1.0.tar.gz.
File metadata
- Download URL: hwp5-0.1.0.tar.gz
- Upload date:
- Size: 5.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
4182d3ac6f651dcb861d9ec32fe5eb1de0d214c16648e73aaad0d1f9edcff14c
|
|
| MD5 |
cd5d3ed0d8e8c94c71775688fb37dd5d
|
|
| BLAKE2b-256 |
e4ee1f37a3725a58c16e70960e0c15ebafacb48b2fc3659e2e045255b8adf47b
|
File details
Details for the file hwp5-0.1.0-py3-none-any.whl.
File metadata
- Download URL: hwp5-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.2 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 |
aa15ea1c0a2da9afdc6e87d1b81e220da559523677422bdc69ef2871576b5a8b
|
|
| MD5 |
423758515c6c2bca0daf0f605a72d0b6
|
|
| BLAKE2b-256 |
744762889d3f4a99b7566844fa1ca988143050096c535d3430d663d13336e57d
|