Skip to main content

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

  1. Update version in pyproject.toml.
  2. Build:
    python -m pip install --upgrade build twine
    python -m build
    
  3. Check package:
    python -m twine check dist/*
    
  4. Upload:
    python -m twine upload dist/*
    

Development

python -m pip install -e ".[dev]"
pytest

Project details


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

hwp5-0.1.0-py3-none-any.whl (6.2 kB view details)

Uploaded Python 3

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

Hashes for hwp5-0.1.0.tar.gz
Algorithm Hash digest
SHA256 4182d3ac6f651dcb861d9ec32fe5eb1de0d214c16648e73aaad0d1f9edcff14c
MD5 cd5d3ed0d8e8c94c71775688fb37dd5d
BLAKE2b-256 e4ee1f37a3725a58c16e70960e0c15ebafacb48b2fc3659e2e045255b8adf47b

See more details on using hashes here.

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

Hashes for hwp5-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 aa15ea1c0a2da9afdc6e87d1b81e220da559523677422bdc69ef2871576b5a8b
MD5 423758515c6c2bca0daf0f605a72d0b6
BLAKE2b-256 744762889d3f4a99b7566844fa1ca988143050096c535d3430d663d13336e57d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page