AnotherKamila / tasksched

An opinionated Taskwarrior web UI. Great for scheduling when to do your tasks.
MIT License
37 stars 3 forks source link

DISCUSS: Context and Next report support #25

Closed evilham closed 6 years ago

evilham commented 6 years ago

Right now tasksched basically uses task export and, if I recall correctly, it filters by task state on the ELM side of things.

This complicates things a bit, like: what about context support? Or custom next reports?

I'd think it's kind of to be expected that what is shown on task and what is shown on tasksched's interface are the same, which means supporting these two things.

One way I'd go about that, would be replacing the task export call with three calls:

If I recall correctly, spawn should take care of shell escaping, it should be checked in any case (filters contain stuff like ! and context names can be "weird").

What do people using tasksched think? :-)

evilham commented 6 years ago

Shamelessly pinging people who may be interested in this: @AnotherKamila @robertbasden

AnotherKamila commented 6 years ago

Sounds good to me, somebody should do something :D

I don't see right now how exactly to actually get at the values of the filters (task _get is actually for something else, task $something show does work but would require parsing). I don't know how to get the info out in a machine-friendly format.

Escaping should not be necessary, IIRC, but better check :D

evilham commented 6 years ago

Is it for sth else? :-D I just checked it and it gives me the things I want in that order and without the fancy formatting from show.

AnotherKamila commented 6 years ago

Doesn't work for me:

> task _get context
'context' is not a DOM reference.
> task --version
2.5.0

There is the machine-readable task _show, from which you can grep out the context and next filters. I still haven't found a clean way to get the current context though.

AnotherKamila commented 6 years ago

Crap, rc.context :D sorry :D you're right, works. I should sleep more :D

evilham commented 6 years ago

Nah, you probably got it from the email notification, I actually mistyped first :-D. I just thought maybe you knew sth I was missing :).

evilham commented 6 years ago

Check the new branch for code implementing this behaviour :). https://github.com/AnotherKamila/tasksched/tree/25-active-filters

AnotherKamila commented 6 years ago

@evilham check the new PR I made out of your branch ;-) #26. Next time you can do that yourself, if I create it, I can't assign me to review it :D

evilham commented 6 years ago

Probably should have done that ^^. Check the changed thingy.