Ticktask is a simple cli for ticktick to create tasks.
- Uses official open api (which is still under development, but creating tasks is already work)
- Support date (*today and *tomorrow)
- Support tags (starts with #)
- Support task body (see config section)
Just save the
./ticktask
file somewhere on your computer (for example, in /usr/local/bin/
). Don't
forget to set execute permission on file: chmod +x /path/to/ticktask
You need to obtain api key for ticktick, so go to
https://developer.ticktick.com/manage
and create your "app". P.S. you will be asked for ridirect_url setting. Set
it to anything you want, for example http://127.0.0.1
.
Next, you need to write your cliend_id
and client_secret
in config. Create
~/.config/ticktask/config.sh
file with the following content:
CLIENT_ID="your_client_id"
CLIENT_SECRET="your_client_secret"
Then run ticktask
and follow its instructions.
Congratulations! Your token saved in ~/.local/share/ticktask/token
. Now you
can jump to usage section.
Just run ticktask
with your task title as argument. Example:
ticktask my new task created with ticktask
You can use date rules *today
and *tomorrow
which will be applied to task
and removed from title text. The same for tags which starts with #
.
Note: if for some reasons ticktask can't send request to ticktick, your task
text will be saved in ~/.local/share/ticktask/error_tasks/
folder, so you
will never lose anything. P.S. in such situation ticktask exit with code 2, so
you can use it in your scripts (for example send notify with notify-send
)
Personally, I use ticktask with dmenu. Command I use in hotkey:
echo -n | dmenu -p "ticktask:" | xargs -0 ticktask \
&& notify-send ticktask -t 1000 sent \
|| notify-send ticktask -u critical -t 2000 "not sent"
It opens dmenu prompt, then forwards result to tictask, and then sends notify with status "sent" or "not sent".
Config file located at ~/.config/ticktask/config.sh
. This is simply bash
script, so it's very hackable and extensible.
For examples see ./config.example.sh
To be able to enter a task description, you can define function
cmd_get_description()
which should output the description as a result. For
example, you can run any gui program with prompt, which will then print it to
stdout.
- ticked - allows you to edit your ticktick.com tasks in your favorite editor (like vim/neovim).