[Surfraw-commits] [SCM] surfraw - a fast unix command line interface to WWW branch, master, updated. surfraw_2-2-5_1-110-gc9f9e9e

Ian Beckwith ianb at erislabs.net
Wed Apr 21 19:34:13 UTC 2010


The following commit has been merged in the master branch:
commit e07686966298f488f99174c916a6d7c42ee1d059
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Wed Apr 21 18:45:24 2010 +0100

    wikipedia, ixquick: support SSL. Patch from Simone Fittabile

diff --git a/ChangeLog b/ChangeLog
index a238d64..796f3c7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,7 @@
 
 	* New elvi: jamendo - Search Jamendo: free music with Creative
 	  Commons licenses (www.jamendo.com). Thanks to Simone Fittabile.
+	* wikipedia, ixquick: Support https. Thanks to Simone Fittabile.
 
 2010-04-19  James Rowe  <jnrowe at gmail.com>
 
diff --git a/NEWS b/NEWS
index 074fff5..4dc7ea5 100644
--- a/NEWS
+++ b/NEWS
@@ -15,7 +15,7 @@
 
 				  N E W S
 
-Fri Apr 16 18:53:55 BST 2010  - surfraw 2.2.7
+Wed Apr 21 18:43:12 BST 2010  - surfraw 2.2.7
 
 	* New elvi (surfraw now has over one hundred elvi!):
 	  + by tczy:
@@ -34,6 +34,7 @@ Fri Apr 16 18:53:55 BST 2010  - surfraw 2.2.7
 	  + imdb (thanks to Sadako)
 	  + bbcnews (thanks to Sumant Oemrawsingh and James Rowe)
 	* aur: added options (thanks to Ivy Foster)
+	* wikipedia, ixquick: support https. Thanks to Simone Fittabile.
 	* Improved support for screen(1). Thanks to Ivy Foster:
 	  + Support for using tmux as $SURFRAW_screen.
 	  + Added `-ns|-newscreen' switch for setting $SURFRAW_new_screen.
@@ -49,7 +50,7 @@ Fri Nov 20 03:34:19 GMT 2009  - surfraw 2.2.6
             * mathworld    - search Wolfram MathWorld.
             * mininova     - search mininova for torrents.
             * youtube      - search youtube for videos.
-          + by fittabile at lifegate.it:
+          + by Simone Fittabile:
             * acronym      - find acronyms
             * gcache       - search google cache.
           + by Nick White:
diff --git a/elvi/ixquick b/elvi/ixquick
index b603c46..901d58d 100755
--- a/elvi/ixquick
+++ b/elvi/ixquick
@@ -1,6 +1,6 @@
 #!/bin/sh
 # $Id$
-# elvis: ixquick		-- Search the web using ixquick (www.ixquick.com)
+# elvis: ixquick		-- Search the web using ixquick [HTTPS] (www.ixquick.com)
 . surfraw || exit 1
 
 w3_config_hook () {
@@ -12,7 +12,7 @@ w3_usage_hook () {
     cat <<EOF
 Usage: $w3_argv0 [options] [search words]...
 Description:
-  Surfraw search the web using Ixquick metasearch (www.ixquick.com)
+  Surfraw search the web using Ixquick metasearch [HTTPS] (www.ixquick.com)
 Local options:
   -search=                      Specialized search on topic
           web		|       web
@@ -58,7 +58,7 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"; then
-    w3_browse_url "http://www.ixquick.com/"
+    w3_browse_url "https://www.ixquick.com/"
 else
     case "$SURFRAW_ixquick_lang" in
 	en|english)           SURFRAW_ixquick_lang="english"        ;;
@@ -81,5 +81,5 @@ else
 	*)                    SURFRAW_ixquick_lang="english"        ;;
     esac
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://www.ixquick.com/do/metasearch.pl?cat=${SURFRAW_ixquick_search}&cmd=process_search&language=${SURFRAW_ixquick_lang}&query=${escaped_args}"
+    w3_browse_url "https://www.ixquick.com/do/metasearch.pl?cat=${SURFRAW_ixquick_search}&cmd=process_search&language=${SURFRAW_ixquick_lang}&query=${escaped_args}"
 fi
diff --git a/elvi/wikipedia b/elvi/wikipedia
index 1b73788..59ae151 100755
--- a/elvi/wikipedia
+++ b/elvi/wikipedia
@@ -14,6 +14,7 @@ Usage: $w3_argv0 [options] [search-string]
 Description:
   Search the Wikipedia online encyclopedia
 Local options:
+  -s				  Uses experimental HTTPS secure connection.
   -language=ISOCODE | -l=ISOCODE  Two letter language code (resembles ISO country codes)
 				  Default: en
 				  Environment: SURFRAW_wikipedia_language, SURFRAW_lang
@@ -30,6 +31,7 @@ w3_parse_option_hook () {
     case "$opt" in
 	-language=*)	setopt	SURFRAW_wikipedia_language		$optarg	;;
 	-l=*)	setopt	SURFRAW_wikipedia_language		$optarg	;;
+	-s*)	setopt	SURFRAW_wikipedia_https			$optarg ;;
 	*) return 1 ;;
     esac
     return 0
@@ -45,11 +47,16 @@ if [ -z "$SURFRAW_wikipedia_language" ]; then
 fi
 
 prefix="http://${SURFRAW_wikipedia_language}.wikipedia.org/w/wiki.phtml?search="
+prefixs="https://secure.wikimedia.org/wikipedia/${SURFRAW_wikipedia_language}/w/index.php?search="
 suffix="&go=Go"
 
 if null "$w3_args"; then
     w3_browse_url "http://${SURFRAW_wikipedia_language}.wikipedia.org"
 else
     escaped_args=`w3_url_of_arg $w3_args`
+    if [ -z "$SURFRAW_wikipedia_https" ]; then
+         w3_browse_url "${prefixs}${escaped_args}"
+    else
     w3_browse_url "${prefix}${escaped_args}${suffix}"
+    fi
 fi

-- 
surfraw -  a fast unix command line interface to WWW



More information about the Surfraw-commits mailing list