31 lines
1.1 KiB
Markdown
31 lines
1.1 KiB
Markdown
# taskwarrior-bw-modify
|
|
|
|
This is a taskwarrior on-modify hook to be used to differentiate modifications
|
|
coming from the CLI and from other processes.
|
|
|
|
## Problem
|
|
|
|
I discovered that bugwarrior has a logseq plugin that will update TODO items
|
|
from logseq -> taskwarrior. This is great, but the problem is if you try to
|
|
close the task from the taskwarrior side, and do not update it on the logseq
|
|
side, the task will just come back on the next `bugwarrior pull`.
|
|
|
|
This hook addresses the problem by differentiating when you call the taskwarrior
|
|
script directly in your shell vs when something else calls it (in my case,
|
|
bugwarrior via systemd)
|
|
|
|
If you try to close the task on the taskwarrior side, it'll execute taskopen for
|
|
the task you are modifying so you may close it in logseq, which will then get
|
|
updated on the next pull.
|
|
|
|
## Requirements
|
|
|
|
* python
|
|
* taskwarrior
|
|
* taskopen
|
|
* logseq configured with the API access
|
|
|
|
## Installation
|
|
|
|
Link this script in your taskwarrior hooks directory with something like `ln
|
|
-nsf /path/to/bugwarrior-check.py ~/.config/task/hooks/on-modify.bugwarrior`
|