Re: Hamster contributions



hi I'm really sorry for the late reply, I have been very busy with a
project according to hamster 96.1hours so far this month (awesome!)

On Thu, Oct 9, 2008 at 10:59 AM, Toms <toms baugis gmail com> wrote:
> Welcome aboard, Jorge!
>
> hamster-applet-devel-list gnome org is our mailing list. Rest of
> answers in-line!
>
if this didn't bounce I'm there.

>
> On Thu, Oct 9, 2008 at 5:10 PM, Jorge Vargas <jorge vargas gmail com> wrote:
>> Hello, I'm writing to you regarding hamster. I have been using it
>> since the first of the month and I'm loving it.
>
> The first of the month being first of october or did you actually
> break into my computer? :)
>
lets say it's oct 1st to prevent any misunderstandings of past events. :)

>
>>> I'm specially interested in working on the reports, I have already
>> setup a clone for this and I'm working on a set of db queries to
>> extend db.py and I'm also working on an abstraction layer so we can
>> have different outputs (CSV,html,etc.) I plan to have something usable
>> at most by the end of the month because I need to export the data to
>> report hours for my day job. Now keep in mind this will only be the
>> backend as I don't know gtk and I don't have time to sit down and
>> learn it, so I was wondering if you or other contributor is willing to
>> write the GUI code for my export subsystem. If for some reason that's
>> not possible I'm going to write a CLI or at least keep this developers
>> only a python UI.
>
> I think i saw some of the activity going on in bugzilla
> http://bugzilla.gnome.org/show_bug.cgi?id=549604
>
> And also somebody was mentioning command line interface, can't
> remember who it was though.
>
I'll take a look at that and try to accommodate it, although I think a
more general approach will be nice.

> Regarding GUI - it would be lovely if you at least thought a little
> about it, because when i did, i ran into major headaches about what
> the configuration screen could look like.
> Proper way, instead of writing totally customizable export, would be
> to target standarts, like iCal and friends. And for the guys who hate
> parsing - csv with all the facts we know.
>
my general idea so far is the following. I'm going to write an
export.py file that will provide some sort of list & dict nested
datastructure, maybe json with several reports. and several
configuration parameters so far I have:

- time
-- month (possible values number of month (1-12), maybe "last" and "current"
-- week (1-52)
-- day (equivalente to the current code)
- category (two parameters include='all',exclude=None)

so in theory you will do something in the likes of

export_tasks(month='current',categories='hamster')
export_tasks(month=3,headers=True)

then we'll have a bunch of converters that will query this
datastructure for information and do their thing. Also it will be
trivial for people to contribute their converters. as they won't need
to know the internals of hamster for that.

as for the converters itself I'm strongly thinking of using a
templating engine. for three reasons:
1- separation of layers.
2- the extensive use of looping needed in the exporters, most if not
all are table-like formats.
3- user customizable reports.

the reports could be done with string.Template but I'm skeptic of that
because of #2 I'm not sure if you guys are happy with an external
dependency but right now I think the best bet will be to use Tempita
http://pythonpaste.org/tempita, it's only two files (730 LOC) and it's
almost identical to string.Template but provides for and if
constructs, and it was build for this use case
http://pythonpaste.org/tempita/#why-another-templating-language

> i think i have heard 3 or so people "working on export/etc making
> generic something". instead of talking i'd prefer to see patches. they
> can be green and ugly and break stuff, just it's better that the idea
> is out there, so it can be worked on and discussed about.
> so a patch + instructions would be great, Jorge!
>
>
I'm starting to work on the above implementation the moment I hit
send, so I should get something ugly and dirty pretty soon.

>>
>> I also have some questions about the project which I haven't found on
>> the internet.
>> 1- which is the current official site?
>> http://projecthamster.wordpress.com/ hasn't had anything new for
>> several months, the google code stuff is returning denied (probably
>> because you deleted it) and the only thing I can find on gnome is the
>> bug tracker.
>
> projecthamster.wordpress.com indeed is the official site. Could use
> some refreshing though and pointer to list, i guess :)
>
yes indeed. I think the whole infrastructure needs a little love.

>> 2- is there a way to run 2 instances of hamster? I want to be able to
>> run trunk for my development (with a copy of hamster.db) and still use
>> my system install for my day work. I really don't want to run trunk
>> only as I'm depending on hamster stable to report my day work and I
>> can't afford to lose that data.
>
> TRUNK version can be run by going into hamster-applet/hamster folder
> and executing "./hamster-applet.py -w" - that will run it in the
> checkout folder and in a window.
> But you have to remove applet from panel first. Also, keep in mind
> that they both will use same database backend
> (~/.gnome2/hamster-applet/hamster.db) - so back it up if you are
> afraid about your data

awesome, I'll make a note of this.

>
I figure out a way to run my code without gtk and with a copy of the
db. maybe this could be build into a flag --dev?

import hamster
from hamster.db import Storage

hamster.HAMSTER_DB = './hamster.db'

s = Storage(None)

that will give me an instance of the "backend".
>
>> 3- is there an IRC channel? or a mailing list (a dev google group will
>>  be awesome)? how do you guys comment and contribute together?
>
> mailing list.
>
>> 4- why bugzilla? It sucks :( is that a requirement for being in gnome?
> i beg to differ, bugzilla rules.
>
trac rules :) although I have to say gnome's bugzilla sucks less than
the default.

>
>> which will be the process of submitting patches?
> via bugzilla.
>
ok I'll get an account there.

>>> These are more regarding the applet itself.
>> 5- is there a way to delete a fact that was wrong? last night I left
>> the wrong task running and I had to hack the .db file with sqlite3 in
>> order to delete the offending task. Even worse I try overwriting it
>> with an "add older fact" and I had 2 activities in the same timeframe.
>> The last seems like a bug.
>
> pressing delete keyboard button both in day view and overview, and
> also clicking "-" icon in overview deletes activity.
>
I didn't knew the delete trick.

>> 6- is there a way to rename a fact? like above if you have been doing
>> something for 10 minutes but figure out it was the wrong task.
>
> edit activity and change name.
>
I figure that one out by mistake the other day.

>> 7- is there a way to split a fact?
>
> just add another fact overlapping the chosen one. hamster will try
> it's best to do splits/inserts
>
Awesome.

>> 8- in the overview window, the Activity column seems to be too narrow,
>> as I tend to write longer descriptions. could you make that at least 4
>> words? right now on my machine it's cutting down anything that is
>> longer than 1 word.
>
> hmmm, the activity column in tree is of variable width and changes,
> when you stretch window. the standart is about 40 symbols on my
> computer.
>
> if you are referring to graphs, tooltips should be added.
>
yes in the graphs, the thing is that when I maximize the window all
the extra space is added to the task list on the left and the bars are
made longer, which is why I think that column could be bigger or at
least grow when maximized.

>>
>> anyway have a great day and keep up the work on this awesome software.
>>
>
> Thanks for the letter, and hope to see more of you around!
>
another usability idea: since I forget (a lot) to change my activity
I'm constantly using the "add older fact" window to change what I'm
doing right now (based on your comment that hamster will fix the
overlapping), and I have to do the mental calculation of current time
- "time i have been working on" to set the correct time, So why not
add the same dropdown the second timer has to the first timer so you
could do something like. "Since 30 minutes" and still in progress.

> Toms
>


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