[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, 2.2.9_release_candidate, updated. surfraw_2-2-5_1-279-g61546f5
Ian Beckwith
ianb at erislabs.net
Sat May 4 21:10:00 UTC 2013
The following commit has been merged in the 2.2.9_release_candidate branch:
commit 61546f514afe412d61a0c194f27e9a83507d1a41
Author: Ian Beckwith <ianb at erislabs.net>
Date: Sat May 4 22:09:55 2013 +0100
deli: fix url;remove options;disable test (search now javascript)
diff --git a/ChangeLog b/ChangeLog
index ee254cd..d39a38f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -9,6 +9,7 @@
* genportage: switch to gpo.zugaina.org
* debcodesearch: new (trivial) elvi for codesearch.debian.net
* jamendo: fix url, disable test (search now javascript)
+ * deli: fix url; remove options; disable test (search now javascript)
2013-04-28 Ian Beckwith <ianb at erislabs.net>
diff --git a/elvi/deli b/elvi/deli
index 6e6f6d3..d27cca0 100755
--- a/elvi/deli
+++ b/elvi/deli
@@ -4,59 +4,23 @@
. surfraw || exit 1
-w3_config_hook () {
-def SURFRAW_delicious_results $SURFRAW_results
-def SURFRAW_delicious_tags $SURFRAW_tags
-def SURFRAW_delicious_user $SURFRAW_user
-}
-
w3_usage_hook () {
cat <<EOF
Usage: $w3_argv0 [options] [search-string]
Description: Search Delicious bookmarks (www.delicious.com)
-Local options
- -tags=TAG | -t=TAG Refine your search with tags
- [Separate multiple tags with "+"]
-
- -user=USER | -u=USER Search a particular user's bookmarks
-
EOF
w3_global_usage
}
-w3_parse_option_hook () {
- opt="$1"
- optarg="$2"
- case "$opt" in
- -tags=*) setopt SURFRAW_delicious_tags $optarg ;;
- -t=*) setopt SURFRAW_delicious_tags $optarg ;;
- -u=*) setopt SURFRAW_delicious_user $optarg ;;
- -user=*) setopt SURFRAW_delicious_user $optarg ;;
- *) return 1 ;;
- esac
- return 0
-}
w3_config
w3_parse_args "$@"
# w3_args now contains list of arguments
# standard topic seach
if [ -z "$w3_args" ]; then
- w3_browse_url "http://www.delicious.com/search?p=${SURFRAW_delicious_results}&chk=&context=all&fr=del_icio_us&lc=1"
+ w3_browse_url "http://www.delicious.com/discover"
else
escaped_args=$(w3_url_of_arg $w3_args)
-
- # search for topic and tag(s) in a user's bookmarks
- if [ -n "${SURFRAW_delicious_user}" -a "${SURFRAW_delicious_tags}" ]; then
- w3_browse_url "http://www.delicious.com/search?p=${escaped_args}&chk=&fr=del_icio_us&lc=1&atags=${SURFRAW_delicious_tags}&rtags=&context=userposts%7C${SURFRAW_delicious_user}%7C"
-
- # search for topic in a user's bookmarks
- elif [ -n "${SURFRAW_delicious_user}" ]; then
- w3_browse_url "http://www.delicious.com/search?p=${escaped_args}&chk=&context=userposts%7C${SURFRAW_delicious_user}&fr=del_icio_us&lc=1"
-
- # search for topic with tag(s)
- else
- w3_browse_url "http://www.delicious.com/search?p=${escaped_args}&chk=&fr=del_icio_us&lc=1&atags=${SURFRAW_delicious_tags}&rtags=&context=userposts=all"
- fi
+ w3_browse_url "http://www.delicious.com/search?p=${escaped_args}"
fi
diff --git a/test/deli.test b/test/deli.test
index 696e63a..c82734c 100644
--- a/test/deli.test
+++ b/test/deli.test
@@ -1,2 +1 @@
-deli Complete Work of Charles
-<b>Work</b> <b>of</b> <b>Charles</b> Darwin
+SKIP: javascript
--
surfraw - a fast unix command line interface to WWW
More information about the Surfraw-commits
mailing list