Hello everyone,

I developed a plugin for Gnome-Do called WebDo, it permits to
configure actions that if performed open the default browser with a
customised url. WebDo is inspired by the Weby plugin for Launchy. For
every action the user can specify name, description, icon and of
course the url to open. The idea is that every url is composed by
segments; there are 3 kinds of segments available: string (a string
defined while configuring the action), firstContentPane (the text in
the first content pane), secondContentPane (the text in the second
content pane); the user can configure the plugin specifying how to
compose urls using the defined segments.

#################
### An Example ###
#################
Who used weby in launchy probably knows how this kind of plugin can
reduce the time for accessing the information you need in the web. I
will make you an example that is also the main reason that motivated
me to develop WebDo as soon as I passed from windows to linux.
I use a lot wordreference for translating words in different
languages. In wordreference the translation pages have a standard url
composed by "http://www.wordreference.com/"; + a language1-to-language2
specific part + the word to translate; with WebDo all I have to do for
opening the page with the translation I need is: press win+space,
start to write the first words of the two languages, press tab, paste
the word, press enter. Of course there is still the time for opening
the page, but the time for generating the url and the probability of
errors are really low; I think this is a great example of how gnome-do
can let the user do what he wants as fast as possible (not faster...)

##################
### Why WebDo ###
##################
WebDo can be really useful in all that cases where the user can
recognise a pattern in the urls of the pages he needs to open, what is
specified in the content panes can be inserted in the url pattern as
needed. A lot of useful and really simple plugins could be developed
just by letting the user customise the url to open: for example
flickr, lastfm or imdb searches. Of course a lot of features can be
offered to the user developing ad-hoc plugins, but the main point is
that not everyone has the programming knowledge or the time for
developing a plugin for everything he needs. Moreover, often single
users has a really specific need: just think to someone looking for
cover bands playing in his area, he will probably use a small website
dedicated to local events, when will he have the opportunity to access
the pages he most reads "as fast as possible"?

########################
### Development Status ###
########################
WebDo is working and I'm using it on my laptop. I developed this plug-
in to fulfil my own needs; now WebDo is exactly what I was looking for
but it's too early for proposing a merge with gnome-do-plugins, I give
you some reasons:
- the configuration UI is missing. Right now the configuration is done
editing an XML file. When Gnome-Do is opened the XML is parsed and the
actions created; edits to the XML will be effective just from the
following time Gnome-Do is opened. I know it's not a great solution
but I don't have a lot of time and this was the fastest for obtaining
something working
- The XML file is not checked: if it contains errors gnome-do could
become unstable or don't start.
- The text inserted in the content panes is not checked.
- The plug-in in general needs testing.

I think opensource is a great thing and for this reason I decided to
release what I have done up to now; whoever is interested in joining
in its development is welcome, I don't know how much time I will have
in the future.

Possible future improvements (a part from fixing the issues listed
before):
- variables could be added as url segment type (useful for example in
the case the same string is used in several urls and needs to be often
updated)
- functions could be added as url segment type (I think for example to
current day, month or year functions)
- variable and functions could be used not only in composing the urls
but even as items in the content panes.

##########################
### How to Install WebDo ###
##########################
- You can get the plugin directly from my branch
https://code.launchpad.net/~ecosicresci/do-plugins/WebDo or even
downloading the current (25/02/10) version from 
http://ecosicresci.altervista.org/WebDo.tar.gz
- for the installation you need the "WebDo.ddl" file and a "WebDo"
folder containing the XML configuration file and a subfolder named
"icons". If you download the archive you will find just what you need;
if you use my branch you probably already know how to get the dll,
while the "WebDo" folder I'm talking about is in the "Resources"
folder.
- Drop the dll in the plugins tab of the gnome-do preferences, like
for every other plugin; to move the directory at $home/.local/share
(the $home/.local folder is hidden, press CTRL + H to show it in
nautilus).
- the configuration file (WebDo/WebDo.xml) comes configured with a
couple of examples: some actions for using wordreference, two for the
softcatalĂ  Catalan-Spanish translator and two for searching events in
lastfm
- close gnome-do, open it and you will have the new actions

#############################
### How to Configure WebDo ###
############################
- The configuration file is $home/.local/share/WebDo/WebDo.xml; every
time you edit it your changes won't have effect if you don't close and
reopen gnome-do. At the end of the post (too long, sorry) you find an
example.
- In WebDo.xml, the order of the elements name - iconFile -
description - url has to be respected
- In WebDo.xml, the order of the "segment" elements is free and will
be conserved in the opened url
- In WebDo.xml, segments of type "firstContentPane" and
"secondContentPane" can be used more then once, they will be replaced
with the text specified by the user in the two content panes.
- The second pane is shown just if in WebDo.xml the "webDoAction"
element contains a "secondContentPane" sub-element.
- In WebDo.xml, if an "url" element contains a "secondContentPane" sub-
element it has to contain a "firstContentPane" too.

###########################
### Example of WebDo.xml ###
###########################
<?xml version="1.0" standalone="yes"?>
<webDo version="1.0">
  <webDoAction>
        <name>WordReference: English to Spanish</name>
        <iconFile>wordReference.gif</iconFile>
        <description>Translate English words to Spanish</description>
        <url>
                <segment type="string">http://www.wordreference.com/es/
translation.asp?tranword=</segment>
                <segment type="firstContentPane"/>
        </url>
  </webDoAction>
  <webDoAction>
        <name>LastFm: events in the United Kingdom (event/city)</name>
        <iconFile>lastfm.png</iconFile>
        <description>Look for events in the United Kingdom with LastFm</
description>
        <url>
                <segment type="string">http://www.last.fm/events/search?
search=1&amp;by=event&amp;q=</segment>
                <segment type="firstContentPane"/>
                <segment type="string">&amp;city=</segment>
                <segment type="secondContentPane"/>
                <segment type="string">&amp;country=United
Kingdom&amp;distance=&amp;past=0</segment>
        </url>
  </webDoAction>
</webDo>

-- 
You received this message because you are subscribed to the Google Groups 
"GNOME Do" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/gnome-do?hl=en.

Reply via email to