All Projects → DavidBadura → Taskwarrior

DavidBadura / Taskwarrior

Licence: MIT license
a php lib for taskwarrior

Programming Languages

PHP
23972 projects - #3 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to Taskwarrior

taskw-dart
Taskwarrior-inspired mobile todo app
Stars: ✭ 58 (+262.5%)
Mutual labels:  todo, taskwarrior
Taskwarrior
Taskwarrior - Command line Task Management
Stars: ✭ 2,239 (+13893.75%)
Mutual labels:  todo, taskwarrior
lunatask
All-in-one encrypted to-do list, notebook, habit and mood tracker, pomodoro timer, and journaling app
Stars: ✭ 35 (+118.75%)
Mutual labels:  todo
say-no-to-projects
WIP framework for chronic overcommitters
Stars: ✭ 15 (-6.25%)
Mutual labels:  todo
Blue-Diary
Lightweight & effective Todo app with Flutter and BLoC pattern 🙆🏻‍♂️
Stars: ✭ 146 (+812.5%)
Mutual labels:  todo
thingsapp
Node module for creating todos in Things.app
Stars: ✭ 37 (+131.25%)
Mutual labels:  todo
Streak-Tasks
Streak Tasks Habit Tracker
Stars: ✭ 27 (+68.75%)
Mutual labels:  todo
styleguide-todo-grammar
/sBin/StyleGuide/ToDo
Stars: ✭ 19 (+18.75%)
Mutual labels:  todo
reactodo
Multiple localStorage TODO lists, built with React
Stars: ✭ 28 (+75%)
Mutual labels:  todo
taskdb
Personal task management solution
Stars: ✭ 24 (+50%)
Mutual labels:  taskwarrior
doom-todo-ivy
Display all TODO and FIXME entries for a project or buffer in ivy. Extracted from doom-emacs.
Stars: ✭ 31 (+93.75%)
Mutual labels:  todo
swiss-army
Ansible-driven configuration management for maintaining a preferred environment (base system and app dotfiles / configurations)
Stars: ✭ 44 (+175%)
Mutual labels:  taskwarrior
todo bloc
Todo Bloc example with unit, widget and integration tests
Stars: ✭ 28 (+75%)
Mutual labels:  todo
Nickel
Micro tasks manager written in pure Python
Stars: ✭ 18 (+12.5%)
Mutual labels:  todo
todo-app
The app helps you to add todo items to your list, mark completed ones and also delete finished items. Its a handy tool for your day today activies. Check out the live demo.
Stars: ✭ 14 (-12.5%)
Mutual labels:  todo
api
Mirror of vikunja from https://code.vikunja.io/api
Stars: ✭ 119 (+643.75%)
Mutual labels:  todo
pomogoro
Text-file based todo time tracking
Stars: ✭ 22 (+37.5%)
Mutual labels:  todo
somebody-should
A place to document practices on the wiki and collect issues/suggestions/to-do items for the physical space at DoES Liverpool
Stars: ✭ 26 (+62.5%)
Mutual labels:  todo
devlog
Command-line tool for tracking your day-to-day software development work
Stars: ✭ 16 (+0%)
Mutual labels:  todo
Tasky
Tasky is a task management app made with SwiftUI.
Stars: ✭ 22 (+37.5%)
Mutual labels:  todo

Taskwarrior PHP lib

used by doThings - a Taskwarrior web-ui.

Build Status

WOW

Install

composer require 'davidbadura/taskwarrior'

Unfortunately, the annotation reader is not automatically registered on composer. So you should add following line if you have [Semantical Error] The annotation "@JMS\Serializer\Annotation\Type" in property [...] does not exist, or could not be auto-loaded. exception:

\Doctrine\Common\Annotations\AnnotationRegistry::registerLoader('class_exists');

Requirements

Taskwarrior changes its behavior by patch level updates and it is very difficult to support all versions. The current supported versions are:

PHP Lib Taskwarrior PHP Version
2.x >=2.4.3 >=5.4
3.x >=2.5.0 >=5.5

Usage

use DavidBadura\Taskwarrior\TaskManager;
use DavidBadura\Taskwarrior\Task;
use DavidBadura\Taskwarrior\Recurring;
use DavidBadura\Taskwarrior\Annotation;

$tm = TaskManager::create();

$task = new Task();
$task->setDescription('program this lib');
$task->setProject('hobby');
$task->setDue('tomorrow');
$task->setPriority(Task::PRIORITY_HIGH);
$task->addTag('next');
$task->setRecurring(Recurring::DAILY);
$task->addAnnotation(new Annotation("and add many features"));

$tm->save($task);

$tasks = $tm->filterPending('project:hobby'); // one task

$tm->done($task);

$tasks = $tm->filterPending('project:hobby'); // empty
$tasks = $tm->filter('project:hobby'); // one task

$tasks = $tm->filterByReport('waiting'); // and sorting

API

Task

attr writeable type
uuid false string
description true string
priority true string
project true string
due true DateTime
wait true DateTime
tags true string[]
annotations true Annotation[]
urgency false float
entry false DateTime
start false DateTime
recur true Recurring
unti true DateTime
modified false DateTime
end false DateTime
status false string

Example:

$task = new Task();
$task->setDescription('program this lib');
$task->setProject('hobby');
$task->setDue('tomorrow');
$task->setPriority(Task::PRIORITY_HIGH);
$task->addTag('next');
$task->setRecurring(Recurring::DAILY);

Taskwarrior

create TaskManager:

$tm = TaskManager::create();

save a task:

$task = new Task();
$task->setDescription('foo');
$tm->save($task);

find a task:

$task = $tm->find('b1d46c75-63cc-4753-a20f-a0b376f1ead0');

filter tasks:

$tasks = $tm->filter('status:pending');
$tasks = $tm->filter('status:pending +home');
$tasks = $tm->filter('status:pending and +home');
$tasks = $tm->filter(['status:pending', '+home']);

filter pending tasks:

$tasks = $tm->filterPending('+home');
$tasks = $tm->filterPending('project:hobby +home');
$tasks = $tm->filterPending('project:hobby and +home');
$tasks = $tm->filterPending(['project:hobby', '+home']);

count tasks:

$tasks = $tm->count('status:pending');
$tasks = $tm->count('status:pending +home');
$tasks = $tm->count('status:pending and +home');
$tasks = $tm->count(['status:pending', '+home']);

delete task:

$tm->delete($task);

done task:

$tm->done($task);

start task:

$tm->start($task);

stop task:

$tm->stop($task);

reopen task:

$tm->reopen($task);

dependencies:

$task1 = new Task();
$task1->setDescription('a');

$task2 = new Task();
$task2->setDescription('b');

$task1->addDependency($task2);

// the order is important!
$tm->save($task2);
$tm->save($task1);

$tm->clear(); // clear object cache

$task1 = $tm->find('uuid-from-task1');
$task2 = $task1->getDependencies()[0];
echo $task2->getDesciption(); // "b" <- lazy loading

annotations:

$task = new Task();
$task->setDescription('a');
$task->addAnnotation(new Annotation("foobar"));

$tm->save($task);

$tm->clear(); // clear object cache

$task = $tm->find('uuid-from-task1');
$annotation = $task->getAnnotations()[0];
echo $annotation->getDesciption(); // "foobar"

QueryBuilder

example:

$tasks = $taskManager->createQueryBuilder()
    ->whereProject('hobby')
    ->orderBy(['entry' => 'DESC'])
    ->getResult()
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].