Skip to content

UnkwUsr/ticktask

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 

Repository files navigation

Ticktask

Ticktask is a simple cli for TickTick to create tasks.

Status

I'm not using this script anymore, as I'm moved away from TickTick to local plain text markdown files. The script still works (if not - please open new issue) and considered as "complete".

If one interested in my new setup:

  • task tracker + notes storage
  • calendar (for tracking tasks that are planned for specific days or just scheduled)
  • adding inbox notes from phone
  • syncing

Features

  • 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)

Installation

Manual

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

Setup

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.

Usage

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)

Use with hotkey

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

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

Task body (not necessary)

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.

Related projects

  • ticked - allows you to edit your ticktick.com tasks in your favorite editor (like vim/neovim).

About

Simple cli for creating tasks on ticktick.com

Topics

Resources

License

Stars

Watchers

Forks

Contributors

Languages