[Surfraw-commits] [surfraw] 02/03: fix rae

Ian Beckwith ianb at alioth.debian.org
Sun Oct 20 00:03:19 UTC 2013


This is an automated email from the git hooks/post-receive script.

ianb pushed a commit to branch 2.2.9_release_candidate
in repository surfraw.

commit dae3beca323b3d45066104d1fc0430f5a3d4eed9
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Sun Oct 20 01:03:00 2013 +0100

    fix rae
---
 ChangeLog     |    5 +++++
 elvi/rae      |   26 +++-----------------------
 test/rae.test |    3 +--
 3 files changed, 9 insertions(+), 25 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 7056d1a..58eebca 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-20  Ian Beckwith  <ianb at erislabs.net>
+
+	* rae: fix url, remove -tipo option (no longer supported),
+	  disable test as there is now gratuitous javascript.
+
 2013-10-06  Ian Beckwith  <ianb at erislabs.net>
 
 	* Replaced phpdoc with version posted back in
diff --git a/elvi/rae b/elvi/rae
index d6caf2b..08d089d 100755
--- a/elvi/rae
+++ b/elvi/rae
@@ -4,43 +4,23 @@
 # Author: Ruben Pollan <meskio at terra.es>
 . surfraw || exit 1
 
-w3_config_hook () {
-def   SURFRAW_rae_tipo 0
-}
 
 w3_usage_hook () {
     cat <<EOF
 Usage: $w3_argv0 [options] [search words]...
 Description:
   Busca en el diccionario de la Real Academia de la Lengua Española (Spanish Dictionary)
-Local options:
-  -tipo=                        Tipo de busqueda
-          0             |       Busqueda exacta
-          1             |       Busqueda sin signos diacriticos
-          2             |       Semejanza fonetico-ortografica
-          3             |       Busqueda escalonada
-                                Default: $SURFRAW_rae_tipo
-                                Environment: SURFRAW_rae_tipo
 EOF
     w3_global_usage
 }
 
-w3_parse_option_hook () {
-    opt="$1"
-    optarg="$2"
-    case "$opt" in
-    	-tipo=*)  setopt SURFRAW_rae_tipo $optarg ;;
-	*)        return 1 ;;
-    esac
-    return 0
-}
-
 w3_config
+
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if null "$w3_args"; then
-    w3_browse_url "http://www.rae.es/drae/"
+    w3_browse_url "http://lema.rae.es/drae/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://www.rae.es/drae/srv/search?type=${SURFRAW_rae_tipo}=&val=${escaped_args}"
+    w3_browse_url "http://lema.rae.es/drae/?val=${escaped_args}"
 fi
diff --git a/test/rae.test b/test/rae.test
index 629c4d9..97bc447 100644
--- a/test/rae.test
+++ b/test/rae.test
@@ -1,2 +1 @@
-rae palabra
-Segmento del discurso unificado habitualmente por el acento
+SKIP needs javascript

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/surfraw/surfraw.git



More information about the Surfraw-commits mailing list