|
Some checks are pending
dependency freshness / dependencies on newest stable (push) Waiting to run
file length / file-length (push) Waiting to run
focus-project pre-commit / pre-commit (push) Waiting to run
focus-project tests / test (push) Waiting to run
md-naming / markdown naming convention (push) Waiting to run
palette drift / palette (push) Waiting to run
repo-contract / repo contract (push) Waiting to run
shared gate tests / gate unit tests (push) Waiting to run
python3 -m focus_project.open opens the tutor focus screen (start=1 when a project is active) and the project's work URL. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WzxdWXdzckyBH7fEbPywpr |
||
|---|---|---|
| .. | ||
| focus_project | ||
| systemd | ||
| .pre-commit-config.yaml | ||
| install_harvest.sh | ||
| install.sh | ||
| pyproject.toml | ||
| README.md | ||
| requirements.txt | ||
focus_project
Time-boxed focus projects ("until Thursday I prepare for X"). The active project switches chosen gates off and defines a daily-minutes gate.
import focus_project as fp
fp.stands_down("leetcode", today) # gate in leetcode|book|reading|tutor; never raises
fp.active(today) # Project | None
fp.status(today) # dict for i3bar / GUIs
fp.record_activity("timer", "start")
Data: $FOCUS_PROJECT_DATA or ~/.local/share/focus_project/ (projects.json,
activity.jsonl). minutes.py is owned by the minutes/harvester agent.
Time rules: minutes_for clips every interval at "now" (an event stamped ahead of
the clock earns only once the clock reaches it); record_activity rejects a ts
more than 120 s ahead (ValueError). end_project(id, day) rejects a past day
(ValueError); today or later is fine. The harvester pays every project day of the
last 31 days, so late-synced events for older days are credited (idempotent).
Open the work: python3 -m focus_project.open [--no-site] (tutor focus screen, work_url).
Install: ./install.sh (stdlib only, editable user install for /usr/bin/python3).