Re: export/reports POC



Hi Jorge!

It is hard to work with patches in mailing list. Could you please
attach it to appropriate bug? (please create one if not there).

Regards,
Toms

2008/10/28 Jorge Vargas <jorge vargas gmail com>:
> Hello guys, as promise here is my first stab at the export/reports rewrite.
>
> Please consider this is very alpha code and of poor quality control,
> right now it works, but nothing more.
>
> Some things I'm going to improve before summiting a real patch
> - transform the "output" variable into a class with some handy methods.
> - have a proper time measuring object*
> - add data range support
> - add totals per category
>
> * I found a bug/omission with the time reporting, the code tends to
> round up to minutes and pass strings around. shouldn't there be a
> proper date/time/datetime class to calculate those values? I
> implemented a method to read from timedelta objects. I think we should
> have an object that will take care of all the time/date/datetime
> conversions.
>
> attached the patch. in order to apply it to the svn checkout you will do
> $ patch -p1 < path/to/initial-export.patch
>
> in order to make this run you will need to:
> $ cd <your local svn checkout>
> $ cp ~/.gnome2/hamster-applet/hamster.db .
> $ python -i hamster/export.py
>>>> console()
> #pprint output of your db
>>>> dump_to_file('something.txt',console)
> # the above will create ~/something.txt, it is compatible with all functions
> # if you want json output, install simplejson (python-simplejson in
> debian & familly)
>>>> json()
> # and to get plain text and html you will need tempita.
> $ cd hamster
> $ svn co http://svn.pythonpaste.org/Tempita/trunk/tempita tempita
> # so you will have tempita as a submodule of hamster
> # then you can do
>>>> text()
> # and
>>>> html()
>
> _______________________________________________
> hamster-applet-devel-list mailing list
> hamster-applet-devel-list gnome org
> http://mail.gnome.org/mailman/listinfo/hamster-applet-devel-list
>
>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]