taskwarrior_jrnl_hook
Taskwarrior allow annotation of tasks, but I find it less practical than using jrnl to do so. This hook bring together both of this great tools.
This script was inspirated by taskwarrior-time-tracking-hook
Principal
Starting a task will automatically pass its description to jrnl. If started task have tags they will be added into the title with corresponding symbol in jrnl (by default, jrnl tags are mark with "@").
$ task list
ID Tags Due Description
1 administration perso 2018-09-21 Pay electricity bill
$ task 1 start
That action will call the hook and run jrnl as a subprocess.
jrnl "Pay electricity bill @administration @perso"
Now, if you look in your jrnl you should see task description added as title with tags from taskwarrior.
jrnl -1
2018-09-21 9h35 Pay electricity bill @administration @perso
Install
pip install taskwarrior-jrnl-hook
Then add the hook to .task/hook folder
mkdir -p ~/.task/hooks
ln -s ~/.local/bin/taskwarrior_jrnl_hook ~/.task/hooks/on-modify.jrnl
Configuration
By default this hook will look config info in your ~/.taskrc config file. Default options are built in the hook, if you want to change hook behavior put options entry in your taskwarrior config file.
Options :
jrnl name
| Name | Default | Description |
|---|---|---|
jrnl_name |
default | jnrl name to call |
If specify, this hook will use the jrnl name defined in the config, otherwise it will use default as jrnl name.
Personally I write a journal for each month, so I added an option to get month name from started task and use it as jrnl name.
| Name | Default | Description |
|---|---|---|
jrnl_by_month |
False | Use month as jrnl name |
language |
en | month's language to output |
If set to True hook script will call jrnl for the given month. You can specify language in order to get the right spelling for the month. Month is written in all letters with no capital.
jrnl configuration
| Name | Default | Description |
|---|---|---|
jrnl_config |
~/.jrnl_config |
Path to your jrnl configuration |
In order to use correct tags symbol used in your jrnl, the script need to read your jrnl's configuration.
tags
| Name | Default | Description |
|---|---|---|
jrnl_tags |
True | Add tags to jrnl |
This option allow you to add taskwarrior tags to your jrnl's title.
project
| Name | Default | Description |
|---|---|---|
add_project |
True | Add project to jrnl |
This option add project name under your title in the body.
filter
| Name | Default | Description |
|---|---|---|
filter_tags |
None | Tasks to be excluded by tags |
This option allow you to exclude by tags tasks that you don't want to see in your jrnl.
Release files for taskwarrior-jrnl-hook 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| taskwarrior_jrnl_hook-0.1.5.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| taskwarrior_jrnl_hook-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 8.5 kB
Release files / taskwarrior_jrnl_hook-0.1.5.tar.gz
| Download URL | taskwarrior_jrnl_hook-0.1.5.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
4448ffed2147ca33c1279e4b9b4bbdf13cd3bd4d43ff286c4df24f5239f55611
|
|
BLAKE2b-256 checksum How to use checksums |
acfca27f40433c7e03fa0b3ae0accb2f9ef280bfaf5c0bf10118be6238e92657
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0
|
Release files / taskwarrior_jrnl_hook-0.1.5-py3-none-any.whl
| Download URL | taskwarrior_jrnl_hook-0.1.5-py3-none-any.whl |
|---|---|
| Size | 4.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4e7ccd0cfdf80fecaee16b8a9459d96ccb6387a99eb87550a8e76707800a6b10
|
|
BLAKE2b-256 checksum How to use checksums |
beef94217e7aab899305869c6c521d1715151dafe43a69442fc977cfb7faf7b0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/2.0.0 pkginfo/1.5.0.1 requests/2.20.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.7.0
|