/usr/lib/surfraw/rae is in surfraw 2.2.8-1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 | #!/bin/sh
# $Id$
# elvis: rae -- Busca en el diccionario de la Real Academia de la Lengua EspaƱola (Spanish Dictionary)
# Author: Ruben Pollan <meskio@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://buscon.rae.es/diccionario/drae.htm"
else
escaped_args=`w3_url_of_arg $w3_args`
w3_browse_url "http://buscon.rae.es/draeI/SrvltGUIBusUsual?TIPO_HTML=2&LEMA=${escaped_args}&&TIPO_BUS=${SURFRAW_rae_tipo}"
fi
|