aupa, pues yo tambien como me aburro he hecho un plugin para la barra de buscadores del Firefox para realizar directamente busquedas con el buscador htdig de la universidad [http://www.ehu.es/htdig/search.html]. En principio parece que funciona pero me gustaria que lo probaseis y me comentaseis que os parece esta primera version...
Para instalarlo teneis que descomprimir el archivo tar.gz y dejar los
dos archivos (*.src y *.png) en el directorio "search" de Firefox (tiene
que haber otros archivos src y png de google, yahoo, ...). En windows
creo que esta por c:\\Archivos de Programa\Mozilla Firefox\search\ y en
linux podeis ubicarlo por ejemplo en
/home/pepe/.mozilla/firefox/..../search.
Espero comentarios....
Funcionamiento (solo para los interesados en como funciona)
-----------------------------------------------------------
Al crear el plugin me he encontrado con el problema que Firefox *solo*
soporta plugins de busqueda con método GET. Sin embargo, el htdig de la
escuela usa el método POST. He estado buscando por la red y he dado con
la solución...
El plugin es un método GET, que envia los datos a un cgi que he escrito
en python en el servidor de ITSAS y este script reconstruye el
formulario en un método POST para interactura con htdig.
Firefox con ehu.src <- solicitud GET a
| http://itsas.mundurat.net/cgi-bin/ehusearch.py
|
|
v
itsas.mundurat.net con ehusearch.py <- Script en Python
desarrollado con | modpython. Convierte el
GET a un
| un formulario POST que es enviado
| al buscador de la escuela. El
| usuario no tiene que pinchar en
| "submit" gracias al uso de
| javascript.
|
v
www.ehu.es/cgi-bin/htdig <- Se realiza la consulta POST
La pega es que el servidor de ITSAS tiene que estar levantado para que
funcione x-DDDD. Y que el DNS no deje de funcionar (cosa que pasa de vez
en cuando con periodos largos de inactividad...). Tal vez el dia de
mirar un DNS de segundo orden mas fiable (dyndns.org y del estilo)....
Además, este plugin se actualiza automaticamente buscando en:
http://itsas.mundurat.net/firefox/ehu.src
http://itsas.mundurat.net/firefox/ehu.png
Eso es todo. Saludos,
zako
ehu.tar.gz
Description: GNU Zip compressed data
# EHUsearch.py
# version: 0.1.0
# Copyright 2006 Christian Pinedo Zamalloa <[EMAIL PROTECTED]>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
def index(req, action, words, method, format, sort, config):
req.content_type = "text/html"
if not (action and words and method and format and sort and config):
req.write("""
<html>
<head><title>EHU Search</title></head>
<body>Error: No all parameters</body>
</html>
""")
elif req.method != "POST" and action != "http://www.ehu.es/cgi-bin/htsearch":
req.write("""
<html>
<head><title>EHU Search</title></head>
<body>Error: No supported method or URL</body>
</html>
""")
else:
restrict=""
exclude=""
req.write("""
<html>
<head><title>EHU Search</title></head>
<body OnLoad="document.ehu.submit();">
<form name="ehu" method="POST" action="%s">
<input type="hidden" name="words" value="%s">
<input type="hidden" name="method" value="%s">
<input type="hidden" name="format" value="%s">
<input type="hidden" name="sort" value="%s">
<input type="hidden" name="config" value="%s">
<input type="hidden" name="restrict" value="%s">
<input type="hidden" name="exclude" value="%s">
</form></body>
""" % (action, words, method, format, sort, config, restrict, exclude))
