Re: [Deskbar] Learning Python and scripting a handler

On 11/28/06, Will Simpson <linux photo geek gmail com> wrote:
I have an idea for a handler but I have few python skills. I'm willing to
learn and have read some of the popular python tutorials. Anyways, I'm sort
have got a start but am stuck figuring our which classes and functions to
use and how to have deskbar parse a file. My idea is to have a handler that
reads a file which has a list of commands in it and then execute the command
matching the query. At first glance seems dumb but the file I'd like to
parse is .aliases which contains all my alias commands. If this works as
envisioned, I could create an alias of 'ff' for firefox or 'mail' for
evolution or 'vt' for gnome-terminal. Once this works I have some other
ideas to extend this further.

Anyone have tips for how I'd get started.

Try copying the Epiphany handler, which (1) reads a file (via
load_shortcuts in deskbar/ and (2) allows for
search-aliases, so that Deskbar'ing for "wp foo" will search the
wikipedia for foo.

There's also the wiki page, that has lots of links to other handlers'
source code.

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