Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

CoffeeScript library for Todo.txt

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 .npmignore
Octocat-spinner-32 LICENSE
Octocat-spinner-32 README.md
Octocat-spinner-32 npm-debug.log
Octocat-spinner-32 package.json
README.md

Installation

    npm install todotxt-coffee

Loading Tasks

    {TodoList} = require ('todotxt-coffee/lib/TodoList')

    # Instantiate list of Tasks
    tasks = new TodoList(["(A) stop +p +c", "@c @b blah +c"])

    # Load tasks from done file
    tasks = new TodoList("~/Dropbox/todo/done.txt")

Querying Individual Tasks

    task.contexts()     # => ['@context1', '@context2'] 
    task.date()     # => 'YYYY-MM-DD'
    task.priority()     # => "(A)"
    task.projects()     # => ['+project', '+project2']
    task.properties()   # => ['due:1234', 'note:345']
        task.raw()      # => "Full text of task"

Querying Todo Lists

    tasks.byContext('@context')
    tasks.byPriority("A")
    tasks.byProject('+project')
Something went wrong with that request. Please try again.