GothenburgBitFactory / GothenburgBitFactory/tasklib

tasklib should respect context or support it as an option IMO

Open
#133 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
159
Forks
29
PR merge metrics
No merged PRs in 30d

Description

I think context should be supported.

As a workaround I have code similar to this:

```python3
from tasklib import TaskWarrior

tw = TaskWarrior(data_location='~/.task')

context = tw.execute_command(["_get","rc.context"])[0]

if context:
context_read = tw.execute_command(["_get","rc.context." + context + ".read"])[0]
context_filter = '+PENDING and ( ' + context_read + ')'
nexttasks = tw.tasks.filter(context_filter)
else:
nexttasks = tw.tasks.pending()

```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.