Ruby bindings for TaskWarrior. Right now this gem provides read-only access to tasks, projects, tags etc.
Add this line to your application's Gemfile:
And then execute:
Or install it yourself as:
$ gem install taskwarrior
This gem is tested on Ruby 1.9.3. Please see the build status for the status of other rubies.
TaskWarrior::Repository is the main entry point. It expects an array of JSON objects, typically produced by
task export. Technically, anything that can be consumed by
JSON.parse is fine as long as it follows the format TaskWarrior uses.
# Assuming that a TaskWarrior export was written to a file r = TaskWarrior::Repository.new(File.read('/tmp/task_export.json'))
Once instantiated, the repository provides access to tasks, projects and tags. Each task will also carry its attributes (description, uuid, etc) as well as its project and tags.
puts r.tasks.size puts r.projects.size puts r.tags.size puts r.tasks.first.description puts r.tasks.first.project.name puts r.tasks.first.tags.join(' ')
- Fork it
- Create your feature branch (
git checkout -b my-new-feature)
- Commit your changes (
git commit -am 'Added some feature')
- Push to the branch (
git push origin my-new-feature)
- Create new Pull Request