From: Rob Golding Date: Sun, 10 Nov 2013 15:31:03 +0000 (+0000) Subject: Tidy up README a little X-Git-Url: https://git.madduck.net/etc/taskwarrior.git/commitdiff_plain/06062c15e71e1640e6d320ea8fd5de2cb95a42bf?ds=inline;hp=-c Tidy up README a little --- 06062c15e71e1640e6d320ea8fd5de2cb95a42bf diff --git a/README.rst b/README.rst index feb5f70..a5dcfe5 100644 --- a/README.rst +++ b/README.rst @@ -25,7 +25,7 @@ Install via pip:: Usage ----- -.. source-code: +tasklib has a similar API to that of Django's ORM:: >>> from tasklib.task import TaskWarrior @@ -38,24 +38,10 @@ Usage >>> type(tasks[0]) >>> task[0].done() - -Filtering Tasks ---------------- - -Tasks can be filtered using the ``TaskQuerySet`` API which emulates the -Django ORM:: - - >>> tw.tasks.filter(status='pending', tags__contain='work') - ['Upgrade Ubuntu Server'] - -Filter arguments are passed to the ``task`` command (``__`` is replaced by -a period); so the above example is equivalent to the following command:: - - $ task status:pending tags.contain=work + >>> tasks = tw.tasks.pending() + >>> tasks + ['Learn German'] + >>> tasks[0]['tags'] = ['languages'] + >>> tasks[0].save() .. _taskwarrior: http://taskwarrior.org - -Tasks can also be filtered using raw commands, like so:: - - >>> tw.tasks.filter('status:pending +work') - ['Upgrade Ubuntu Server']