[Ml-yokadi] Summary of recent changes

Aurélien Gâteau aurelien.gateau
Dim 7 Déc 01:06:58 CET 2008


Sébastien Renard wrote:
> Le samedi 6 décembre 2008, Aurélien Gâteau a écrit :
>> Hi again,
>>
>> I got a bit creative these last two days and made a few changes to
>> Yokadi which I would like to present to you:
>>
>> # t_list --done
>> "t_list --done" now takes a parameter to specify the range. For now you
>> can use the following range keywords (hopefully self-explanatory):
>> - today
>> - thisweek
>> - thismonth
>> - all
>>
>> I hope you like this one Simon :)
> 
> I like it too !
> 
>> I am still not sure about the range keywords and it may be a good idea
>> to have a syntax similar to the one Sébastien introduced in t_set_due.
>> Feel free to suggest ideas.
> [...]
> 
> Things like t_list --d +1w  ?
> 
> Yes, it would be cool.

It should probably be -d -1w for consistency, but I fear this will clash 
with option parser.

> We would need to factorize the code then.

I did the very first step by moving the code from t_set_due to dateutils.py.

> BTW, I had a raw mode to t_list (-r) to ease copy/paste in email.

Actually I was thinking about merging t_list and t_export. It would 
require adding two options:

-o,--output to optionally redirect the output to a file.
--format to define the output format:
- table: the actual output
- list:  the simple version you implemented
- xml:   from t_export
- csv:         "
- html:        "

The implementation should use different renderer classes, based on the 
format.

We could even add a bit of magic to change the format based on the file 
extension if the format is not explicitly set. This way you could do:
"t_list -d thisweek -o weeklyreport.html"
"t_list -d thismonth -o monthlyreport.xml"

And Yokadi would output the right document.

Aurélien

PS: I just pushed the interfacing of YokadiOptionParser and Cmd helps!


Plus d'informations sur la liste de diffusion Ml-yokadi