pacmax beta

Alfred Pac by moranje on GitHub

todoist

An Alfred workflow for managing tasks in Todoist

From their README

Build Status Coverage Status CodeFactor GitHub Releases (by Asset)

ALFRED TODOIST WORKFLOW

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

Getting started Installation Configuration Usage Contributing

Getting started

For this workflow to work you need:

  • Alfred version 3.x or 4.x and a powerpack licence.
  • Node.js version 10.x 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).

The downside is having problems switching between versions because most processes will default to the symlinked version.

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 executable (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. Click "Configure workflow and variables" in the top right corner and edit the node_path variable with the node path followed by a colon i.e. /Users/{user}/.nvm/versions/node/v11.6.0/bin:

Observe, variable will have to be updated whenever node version changes.

Node flags

If you need to enable any node.js command-line flags, you can with

  1. Navigate to the workflow in Alfred Preferences Alfred Preferences -> Workflows-tab
  2. Click "Configure workflow and variables" in the top right corner and edit the node_flag variable with the command-line flag i.e. --experimental-worker --experimental-modules

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.
cache_timeout 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)
anonymous_statistics 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 cache_timeout 13

todo:setting anonymous_statistics {true or false}

Example: todo:setting anonymous_statistics 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
  • Cut Grass tomorrow

Create task

todo {task}, {date}

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

Important

For date parsing the work the date needs to be the only thing after the comma.

The reason for this is that multilanguage date string parsing is hard, and Todoist has already solved this problem. But in order to have Todoist read the date the workflow needs to present it a string that holds just the date. The workflow does this by having the date string between a comma and the end of the string.

Documentation

Read the docs.

Changelog

View CHANGELOG.md

Contributing

Instructions

Build

Create a new build with

npm run build

Create a distributable package (.alfredworkflow) after the build step with

npm run build:workflow

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

License

License MIT © Martien Oranje

Latest release

  • 6.0.0-beta.16 years ago, 1.1 MBDownload

    6.0.0-beta.1 (2020-02-26)

    Bug Fixes

    • settings: rename annonymous_statistics to error_tracking (3816345)
    • api filter requests being broken (3b344a1)
    • build: possibly fix version number not updated in alfred workflow (ac02c22)
    • cache: cache always being reset (d83408e)
    • cache: handle empty resource lists (af89785)
    • cache: issue where cache timestamps wouldn't be updated once created (5156040)
    • commands: #151 don't rely on alfred input filtering, remove uids (92d9ac4)
    • commands: certain characters not (" and ) being parsed (d53d68f)
    • commands: error when trying to retrieve a non existent project (42e0009)
    • project: unhelpful error message when missing todoist token in settings (5a0af91)
    • settings: #152 settings break with multiple consecutive spaces (b3f2f2a)
    • todoist: task cache not being refreshed (179c0bc)
    • alfred workflow version is the same as the release version again (0ce67a3)
    • updater not picking up new prereleases, please update manually (fdcb793)
    • updater not storing last update timestamp (35ff532)

    Features

    BREAKING CHANGES

    • project: Improve string parsing, now requires id for project, labels and sections
19 earlier releases
  • 6.0.0-alpha.106 years ago, 1.1 MBDownload

    6.0.0-alpha.10 (2020-02-25)

    Bug Fixes

    • api filter requests being broken (3b344a1)
    • todoist: task cache not being refreshed (179c0bc)
  • 6.0.0-alpha.96 years ago, 1.2 MBDownload

    6.0.0-alpha.9 (2020-02-22)

    Bug Fixes

    • commands: certain characters not (" and ) being parsed (d53d68f)

    Features

  • 6.0.0-alpha.86 years ago, 1.2 MBDownload

    6.0.0-alpha.8 (2020-02-16)

    Bug Fixes

    • cache: cache always being reset (d83408e)

    Features

    • commands: #13 sort by due date by default (32044b0)
  • 6.0.0-alpha.76 years ago, 1.2 MBDownload

    6.0.0-alpha.7 (2020-02-16)

    Bug Fixes

    • cache: handle empty resource lists (af89785)
    • cache: issue where cache timestamps wouldn't be updated once created (5156040)

    Features

    • parser: reimplement date from now for timestamped tasks (cd090d8)
  • 6.0.0-alpha.66 years ago, 1.1 MBDownload

    6.0.0-alpha.6 (2020-02-13)

    Bug Fixes

    • commands: error when trying to retrieve a non existent project (42e0009)
    • settings: #152 settings break with multiple consecutive spaces (b3f2f2a)
  • 6.0.0-alpha.56 years ago, 1.1 MBDownload

    6.0.0-alpha.5 (2020-02-12)

    Bug Fixes

    • updater not storing last update timestamp (35ff532)
    • commands: #151 don't rely on alfred input filtering, remove uids (92d9ac4)
  • 6.0.0-alpha.46 years ago, 1.1 MBDownload

    6.0.0-alpha.4 (2020-02-11)

    Bug Fixes

    • updater not picking up new prereleases, please update manually (fdcb793)
    • project: unhelpful error message when missing todoist token in settings (5a0af91)
  • 6.0.0-alpha.36 years ago, 1.3 MBDownload

    6.0.0-alpha.3 (2020-02-08)

    Bug Fixes

    • alfred workflow version is the same as the release version again (0ce67a3)
  • 6.0.0-alpha.26 years ago, 1.3 MBDownload

    6.0.0-alpha.2 (2020-02-08)

    Bug Fixes

    • build: possibly fix version number not updated in alfred workflow (ac02c22)
  • 6.0.0-alpha.16 years ago, 1.3 MBDownload

    6.0.0-alpha.1 (2020-02-08)

    Features

    BREAKING CHANGES

    • project: Improve string parsing, now requires id for project, labels and sections
  • 5.8.46 years ago, 1.1 MBDownload

    5.8.4 (2019-12-15)

    Bug Fixes

    • alfred: notifications not showing in Alfred v4 (93c7307), closes #125
    • dependency: lower required node.js to v10.x (a222d5d)
    • settings: no update notifications for alfa and beta releases (1ad3186)
  • 5.8.37 years ago, 1.1 MBDownload

    5.8.3 (2019-08-04)

    Bug Fixes

    • project: update to stable todoist v1 rest api (7f3f34a), closes #113
    • tests: failing test suite due a bug in nock under node 12 (42cc96d)
    • todoist: support emoticons/emoji (bfdce97), closes #112
  • 5.8.27 years ago, 1.1 MBDownload

    5.8.2 (2019-04-22)

    Bug Fixes

    • parser: add all language scripts in a more robust way (b5fd7b4), closes #111
    • parser: use es5 compatible robust script parsing (0b22006), closes #111
  • 5.8.17 years ago, 1.1 MBDownload

    5.8.1 (2019-04-05)

    Bug Fixes

    • project: empty files constant on fresh install (ea7ad1f), closes #109
  • 5.8.07 years ago, 1.1 MBDownload

    5.8.0 (2019-03-30)

    Bug Fixes

    • project: tests failing due to faulty notifier reference (236a369)

    Features

    • project: periodic checks for workflow updates (e9f4262), closes #108
  • 5.7.17 years ago, 1.1 MBDownload

    5.7.1 (2019-03-26)

    Bug Fixes

    • project: failing node.js check (c9409d9)
    • project: return useful error message when node.js is missing (a8a966e), closes #107
    • project: return useful error when API key is missing (7fbc41b), closes #106
  • 5.7.07 years agoDownload

    5.7.0 (2019-03-16)

    Features

    • parser: add support for scripts other than latin (b12ce3d), closes #105
    • todoist: add japanese timestamp translations (44b47dd)
  • 5.6.58 years agoDownload

    5.6.5 (2018-12-05)

    Bug Fixes

    • fix missing new invocation in cache module (probably harmless) (4777b2f)
  • 5.6.48 years agoDownload

    5.6.4 (2018-11-11)

    Bug Fixes

    • allow labels to be hyphenated (ae309ef), closes #50