Options
All
  • Public
  • Public/Protected
  • All
Menu

alfred-workflow-todoist

Build Status Coverage Status CodeFactor GitHub Releases (by Asset)

ALFRED TODOIST WORKFLOW

Add and search Todoist tasks straight from Alfred. It uses Todoist v8 REST API.

Getting started Installation Configuration Usage Contributing

Getting started

For this workflow to work you need:

  • Alfred version 3.x and a powerpack licence.
  • Node.js version 10.0.0 or up

Note that the workflow expects node to be installed in the default location(s), i.e. /usr/local/bin or /usr/bin. See installation notes below on how to make the workflow work with non-standard node installations.

Installation

Download and import workflow.

Non-standard node installation

If you have installed node.js in a non-standard way (e.g. through nvm or homebrew), you may need to do either of the following to make the workflow work:

Create symlink to current node version:

  1. In the terminal, navigate to /usr/local/bin cd /usr/local/bin
  2. Create symlink to current node version ln -s $(which node) node (note, if you're using a different shell - fish, zsh, etc. - you may need to make slight changes to make the command work).

This method should work with different versions of nvm (including changing to other versions), as long as you don't remove the symlinked node version (or the symlink itself of course).

Manually add node path to the workflow:

  1. In the terminal, reveal the path to your node installation which node
  2. copy the output, but omit the executeable (e.g. /Users/{user}/.nvm/versions/node/v11.6.0/bin, not /Users/{user}/.nvm/versions/node/v11.6.0/bin/node)
  3. navigate to the workflow in Alfred Preferences Alfred Preferences -> Workflows-tab
  4. open all objects in the workflow, one at a time, find wherever the path is exported and add your node path to the beginning – i.e. find all instances of export PATH="$PATH:/usr/local/bin:/usr/bin" and add your node path, resulting in export PATH="$PATH:/Users/{user}/.nvm/versions/node/v11.6.0/bin:/usr/local/bin:/usr/bin" (observe the colons separating the statements)

Observe, this method will have to be repeated whenever the workflow is updated.

Debug

If the workflow doesn't work as expected, perform the following to get a clue about the issue:

  1. Navigate to the workflow in Alfred Preferences -> Workflows-tab
  2. Enable Debug mode (button in the top-right corner of the screen)
  3. Watch for messages in the bottom log-pane when using the workflow.

If the error messages outputs node errors, either make sure you have the appropriate node version or follow the steps above to enable the workflow with a non-standard node installation.

Configuration

Name Notation Explanation
token ^[0-9a-fA-F]{40}$ (default empty) The todoist API token.
language en, da, pl, zh, ko, de, pt, ja, it, fr, sv, ru, es, nl (default en) The language for natural language date processing (by todoist) and to calculate time to complete a task.
cachetimeout_ A positive number (default 3600, an hour) The time (in seconds) until the cache is refreshed (until that time todoist information is stored locally to make things a little faster)
anonymousstatistics_ true or false (default true) Doesn't do much at the moment but I intent to use it to track installs

todo:setting token {api token}

Example: todo:setting token 2d2e2a334c5f36e7a7c43b46e

todo:setting language {language}

Example: todo:setting language nl

todo:setting cache_timeout {time in seconds}

Example: todo:setting cachetimeout 13_

todo:setting anonymous_statistics {true or false}

Example: todo:setting anonymousstatistics false_

Usage

Name Notation Explanation
task Any text except , The task title.
date A date string See the Todoist documentation for supported date formats.
project Either #personal or #[next actions] Use either the hashtag notation or bracket notation if the project name has spaces in it. The project name is case sensitive.
label @label Label names can't contain any whitespace characters. Labels are case insensitive.
priority Either p2 or !!2 A value between 1 (urgent) and 4 (normal)

Search for tasks

todos {query}

Query

Any search query one character or longer. Uses fuzzy search to find the tasks.

Example: todos car => returns (because of fuzzy search):

  • Rent car
  • New cat_ recipe's_
  • C**ut Gras tomor**row

Create task

todo {task}, {date}

Example: todo Get things done, tomorrow @ 9 Example: todo Build tree house #home !!2 @15min, tomorrow @ 9

Documentation

Read the docs.

Changelog

View CHANGELOG.md

Contributing

Instructions

- Fork and clone the repo
- Install dependacies
- Symlink to project workflow folder

  git clone https://github.com/YOUR-USERNAME/alfred-worflow-todoist
  npm install
  npm run setup:dev

Build

Create a new build with

npm run build

Run tests

Run Jest test suite with:

npm run test npm run test:prod

Or run a watcher with

npm run test:watch

Commits

For commits I follow the angular commit guidelines and use semantic release to automate builds, semver version updates and changelog creation. The way to make sure this all works is to run:

npm run commit

Which guides you through the motions

Code of conduct

code-of-conduct.md

License

License MIT © Martien Oranje

Generated using TypeDoc