Re: [Deskbar] Hi all!



On Fri, 2006-01-06 at 14:18 +0100, Francisco Jesús Jordano Jiménez 
Hi !

> I want improve my python skills so i decided to build a simple handler 
> for deskbar using the examples in the web.
> Cause of my work, sometimes i have to do little queries against a ldap 
> server, so why not build a handler to do that.
> This is what i done, but i have some questions:
> 

Not yet looked at the handler, but i'll answer your questions:

> * I have not used the async handler cause when you search through a ldap 
> server you usually know its structure (subtrees,attribs ...), so i 
> decided to limit the search using pre ("ldap") and post ("#") strings in 
> the query, for example if you wanna search the users with uid starting 
> with "lau" the entered query should be : ldap uid=lau*#.
> There is an alternative? May i search pairs attrib value? Any suggestion?
> 

There is no hard restricitons on the string, so every handler get called
with exactly what's in the text entry. each handler can have it's own
format for the query.

It's preferred to use no prefix (or keyword), even though they are
allowed through the web search handler for example, but they are
configurable (i prefer not to have them, Nigel loves them :))

In your case, it would be nice to be able to only write 'lau' or any
string in the name and ldap handler automatically try to search for
uid=lau*. I'm not familiar at all with ldap, so maybe this was a stupid
suggestion.

Another way would be to simply enter uid=lau* and the ldp handler
detects key=value strings in the query and does the query, or do nothing
if it isn't a key=value.

Keep in mind that i wouldn't want to learn ldap queries internal when
using deskbar i just want to search for my coworker 'lau*' so i
shouldn't need to know i must use uid=, i would just type 'lau'

> * Debugging the handler with the windowed mode i see that the last query 
> i do in a session is repeated while handler's load, delaying the deskbar 
> load. Is this a bug, a feature?
> 

Well this is a bug, and a feature, more a feature than a bug i'd say..
What happens is that at startup the handlers are queried for historic
matches, so we are able to provide a menu and history persistant across
restarts.

This is not a problem for local/fast handlers, but it becomes a problem
with internet-enabled (google for example) or remote/slow handlers.
Right now, the feature is disabled for async handlers, presuming that
they have slow response time, versus non-async handlers.

> * In the method query of the handler the max param is set to 5 by 
> default, but i  see that this method is called with a value of 6  :?
> 

Yes, the default is there because i need to put a default :)
in fact what that means is that the method could be called with no max
argument, in that case the default would be 5. It's usually always
called with another value, though.

I think we should remove this, it's confusing.

> * Exists a method called when the bar is dispossed? It could be usefull 
> for closing sessions against the ldap server ...
> 

There exists a stop() method called when deskbar exits, or when the
handler is deactivated. You can override it in your own handler

def stop(self):
	ldap.disconnect()

> I released a earlier version (you  can find it in 
> http://ww.ardeenelinfierno.com/deskbar).
> You can test it, now is configured to work with the ldap of rediris (a 
> global net of the universities in Spain), you can browse this ldap via 
> web too 
> (http://www.rediris.es/ldap/ldap-es/navega?h=ldap.rediris.es:1389&b=dc=rediris,dc=es)
> Some search examples:
> ldap uid=laura#
> ldap uid=c*#
> ldap (&(uid=c*)(givenName=ch*))
> 

I'll test that asap, but i must study first :)
> And this is my story.
> Thanks again for your fantastic application!

Thanks for contributing handlers !
When you feel it's ready we can put a link on the webpage.

As a sidenote: ldap query should work through evolution data-server as
well, did you try that, or are you not using evolution ?

Note to all: One day we could consider a way to easily install handlers
via a web page ?

Raf




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