togo

command module
v0.4.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 17, 2020 License: MIT Imports: 4 Imported by: 0

README

togo

CLI for Todoist's v1 API written in Go.

Pipeline Status Lines of Code Test coverage MIT license FOSSA Status

Open bug count Open issue count Closed issue count

Renovate badge Known vulnerabilities

Maintainability score Technical debt ratio Quality issues

Releases

Binaries are available from the Github releases page and container images from the Docker hub.

github release link github release version github commits since release

docker size

Build

dep ensure
go build

Config

togo expects a ~/.togo.yml file to exist in the current user's home directory.

The config file should contain:

root: "https://api.todoist.com/rest/v1"
token: "api-token"

You can find your API token on the Integrations page.

You may also set the default columns and sort order for tables:

default:
  labels:
    columns: [ID, Name]
    sort: Name
  projects:
    columns: [ID, Name]
    sort: Name
  tasks:
    columns: [ID, Content]
    sort: ID

These defaults are used unless the --columns and --sort flags are passed. This section is optional; if omitted, the values shown above will be used.

Usage

togo [--columns col1,col2] [--sort col] cmd [flags...]

You can run togo as a binary or from a Docker container (mounting the config):

$ docker run -it -v ${HOME}:/root:ro ssube/togo list

    ID   Priority  Content
...
Count
togo

Count incomplete tasks:

$ togo

3 tasks to go

Count uses the --filter parameter, defaulting to today | overdue.

List
togo [options...] list [--labels label1,label2,label3] [--project project_id] [filter...]

List incomplete tasks:

$ togo list

    ID   Priority  Content
 01231          1  clean desk
 01232          1  update gitlab
 01233          1  clean computer monitor

$ togo --sort Content list

    ID   Priority  Content
 01233          1  clean computer monitor
 01231          1  clean desk
 01232          1  update gitlab

$ togo list --project 03211 --labels computer,desk "search: monitor"

    ID   Priority  Content
 01233          1  clean computer monitor

The columns parameter selects fields from the tasks, in order, and displays them in a table with headers:

$ togo --columns ID,Order list

    ID   Order
 01231       1
 01232       2
 01233       3

The project parameter only lists tasks from a single project, labels are applied with an | operator, and any trailing arguments are passed as an & filter.

Filters are documented here and limited to Todoist Premium. If no filter is provided, the parameter is omitted, which is equivalent to "all". Labels are combined with the | operator. Additional filters are wrapped in parentheses and joined with &. In examples:

options filter
--labels foo,bar @foo | @bar
"search: foo" "search: foo"
--labels foo "search: bar" (@foo) & ("search: bar")
"overdue | today" "#Work" (overdue | today) & (#Work)
Add
togo add [--done] [content...]

Add a new task:

$ togo add "task"

    ID  Content
 01234  hello world

Trailing arguments are merged with " " (a space), so loose words will be combined but special characters should be quoted.

The --done parameter completes the task immediately after adding it.

Done
togo done [id...]

Complete a task:

$ togo done 01231 01232 01233 01234

closing 01231
closing 01232
closing 01233
closing 01234
Projects
togo projects

List projects:

$ todo projects

     ID  Name
  01231  Inbox
  01232  Personal

Project IDs may be used with list --project.

Todo

Features:

  • labels
  • filters
  • custom columns
  • list projects
  • sort order
  • add task & complete
  • custom root filter
  • add task project
  • list labels
  • add task labels
  • config defaults
  • columns & sort on root
  • add due date column
  • list project names
  • list label names
  • test coverage
  • edit task
  • postpone task
  • create config

togo was written by ssube and is not created by, affiliated with, or supported by Doist.

Source, documentation, and everything else in this repository is distributed under the included MIT license.

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL