{"id":26353642,"url":"https://github.com/aceofspades5757/tw-hook-elapsed","last_synced_at":"2025-03-16T11:19:27.714Z","repository":{"id":230763275,"uuid":"633094683","full_name":"AceofSpades5757/tw-hook-elapsed","owner":"AceofSpades5757","description":"Taskwarrior hook to add an `elapsed` UDA field, and to persist `start` field.","archived":false,"fork":false,"pushed_at":"2024-06-26T21:48:20.000Z","size":80,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-15T23:53:16.463Z","etag":null,"topics":["elapsed","hook","hooks","rust","task-management","taskwarrior","time-management"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/AceofSpades5757.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2023-04-26T19:11:37.000Z","updated_at":"2024-06-26T21:48:24.000Z","dependencies_parsed_at":"2024-03-31T19:31:47.571Z","dependency_job_id":null,"html_url":"https://github.com/AceofSpades5757/tw-hook-elapsed","commit_stats":null,"previous_names":["aceofspades5757/tw-hook-elapsed"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceofSpades5757%2Ftw-hook-elapsed","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceofSpades5757%2Ftw-hook-elapsed/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceofSpades5757%2Ftw-hook-elapsed/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/AceofSpades5757%2Ftw-hook-elapsed/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/AceofSpades5757","download_url":"https://codeload.github.com/AceofSpades5757/tw-hook-elapsed/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243858314,"owners_count":20359342,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["elapsed","hook","hooks","rust","task-management","taskwarrior","time-management"],"created_at":"2025-03-16T11:19:27.122Z","updated_at":"2025-03-16T11:19:27.702Z","avatar_url":"https://github.com/AceofSpades5757.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Description\n\n_Adding existing time has been disabled._\n\nTaskwarrior hooks to add the UDA elapsed on new tasks and modified tasks, anything with a start and end value. This is useful for tracking time spent on tasks.\n\nIt also helps preserve the start and end time of a task, which is removed by Taskwarrior when an end time is added.\n\nThis hook is **not** good for tracking time spent on tasks that you toggle on and off and will break any other hooks that are designed to do this.\n\nThis hook **is** good for tracking time spent on tasks that you explicilty start and finish and you'd like to keep that information. I use this to track my shifts at work.\n\n~~Elapsed is calculated by `existing_time + (end_date - start_date)`.~~\n\nElapsed is calculated by `end_date - start_date`.\n\n# Installation\n\n_Note that there are a couple noop (no operation) hooks that are included as well. They'll be removed in due time._\n\nRequires that the Rust toolchain be installed. If you need a release, create an issue and I'll start making releases.\n\n## Using [`just`](https://github.com/casey/just)\n\n_Need to have [`just`](https://github.com/casey/just) installed._\n\n`just install`\n\nThis will put `on-add_elapsed` and `on-modify_elapsed` binaries in `~/.task/hooks`.\n\n## Manually\n\n1. Create installation binary in a local build directory: `cargo install --root ./build --path .`\n1. Copy the binaries to your hooks directory (by default in `~/.task/hooks`): `cp ./build/bin/* ~/.task/hooks/`\n\n# Scenarios\n\nAdding/Logging a Task:\n\n* If task has a start and end date: Add elapsed time\n* If task is missing a start or end date: Do nothing\n\nModifying a Task:\n\n* If task has a start and end date: Add elapsed time ~~to existing time~~\n* If task is missing a start or end date: Do nothing\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faceofspades5757%2Ftw-hook-elapsed","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faceofspades5757%2Ftw-hook-elapsed","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faceofspades5757%2Ftw-hook-elapsed/lists"}