Re: Oops, where did GetCurrentFact go?



Sorry, forgot to copy the list.
Also i'll correct myself - i don't remember what was i thinking when i
dropped GetCurrentFact, but i certainly was thinking something. Maybe
something about "there are too many dbus methods now out there, some
can be skipped as trivial to figure" or something. Or maybe the
short-cut seemed to be too small to provide an extra method.
Well, in case i was wrong, next six month will show that and i'll put
the method back for the stable.

I also wonder if this is relevant to your interests:
http://github.com/tbaugis/hamster_experiments/blob/master/hamster_tracks.py

To run a hamster experiment, just check out the whole thing and run
specific script (as in `python hamster_tracks.py`)

Toms

On Tue, Apr 20, 2010 at 8:57 AM, Toms <toms baugis gmail com> wrote:
> Hey Ryan!
>
> In case if your art project is in Python, you can import
> hamster.client.Storage and skip the d-bus bit (it will do that for
> you).
> But GetCurrentFact was dropped as it was ambiguous, you get most
> recent fact by calling GetTodaysFacts and the last one is the one you
> are looking for, provided the end time is 0.
>
> So, in python:
>
> import hamster.client
> storage = hamster.client.Storage()
>
> todays_facts = storage.get_todays_facts()
> last = None
> if todays_facts and todays_facts[-1]['end_time'] is None:
>  last = todays_facts[-1]
>
>
> As for the idle detection - don't remember which bit you refer to as
> broken, but i don't think anything has changed there.
>
> Would love to see that project of yours!
>
> Regards,
> Toms
>
>
> On Tue, Apr 20, 2010 at 6:53 AM, Ryan Kelln <ryankelln gmail com> wrote:
>> Hi Toms,
>>
>> I've been using Hamster in an art project of mine (which creates
>> collages of the stuff I do every day) and today I thought, "this dang
>> idle detection isn't working and it's really bugging me, maybe I'll pull
>> the latest and see if that fixes it" (I think was running some random
>> pull from a few months ago before).
>>
>> Anyways, the idle stuff is less important, my poor art software is
>> complaining and I notice now that GetCurrentFact() seems to be gone when
>> I fire up D-Feet and check out what's happening on dbus. If I want to
>> get the name of the current fact (or query if there is any current fact)
>> what should I be using now?
>>
>> Thanks very much, I love the Hamster,
>> Ryan
>>
>> _______________________________________________
>> 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]