[Ml-yokadi] Summary of recent changes
Sébastien Renard
Sebastien.Renard
Dim 7 Déc 11:41:05 CET 2008
Le dimanche 7 décembre 2008, Aurélien Gâteau a écrit :
> > 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.
Sure ;-)
> > 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.
Thx.
> > 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.
Well, we have to change renderer interaction in this case. Actually renderer
can be call to print task header, task line or task detail.
This make sense for screen display but not for XML, CSV or whatever 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.
It would be nice in order to keep it unbloated from the user point of view.
DRY ( don't repeat yourself) is very pythonic ;-)
> PS: I just pushed the interfacing of YokadiOptionParser and Cmd helps!
I've merge it with my small raw mode and push it... Git is quite cool
sometimes, but if we don't push/pull very often it generates lots of merge
commits ;-(.
a+
--
Sébastien
Plus d'informations sur la liste de diffusion Ml-yokadi