Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/unkwusr/ticktask
Simple cli for creating tasks on ticktick.com
https://github.com/unkwusr/ticktask
api cli console open-api terminal ticktick
Last synced: 7 days ago
JSON representation
Simple cli for creating tasks on ticktick.com
- Host: GitHub
- URL: https://github.com/unkwusr/ticktask
- Owner: UnkwUsr
- License: mit
- Created: 2021-11-02T19:51:35.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2024-03-01T15:31:55.000Z (9 months ago)
- Last Synced: 2024-10-31T07:51:34.643Z (14 days ago)
- Topics: api, cli, console, open-api, terminal, ticktick
- Language: Shell
- Homepage:
- Size: 18.6 KB
- Stars: 36
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Ticktask
Ticktask is a simple cli for [ticktick](https://ticktick.com) to create tasks.
## Features
* Uses [official](https://developer.ticktick.com/docs#/openapi) 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](#Config) section)## Installation
### Manual
Just save the
[./ticktask](https://raw.githubusercontent.com/UnkwUsr/ticktask/master/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](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:```sh
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:
```sh
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](https://github.com/UnkwUsr/dotfiles/blob/d296e8629f9945efe67e699c0475d3202c53a8d5/config/i3/config#L241-L243),
I use ticktask with [dmenu](https://tools.suckless.org/dmenu/). Command I use
in hotkey:```bash
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](./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](https://github.com/UnkwUsr/ticked) - allows you to edit your
[ticktick.com](https://ticktick.com) tasks in your favorite editor (like
vim/neovim).