[Surfraw-commits] [surfraw] 01/05: Elvi cleanup: S-U

jason ryan jasonwryan-guest at moszumanska.debian.org
Fri Mar 10 22:13:18 UTC 2017


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

jasonwryan-guest pushed a commit to branch kyle/https-elvi
in repository surfraw.

commit 0d734a573ae35a2239556cad54b03716821e4598
Author: Jason Ryan <jasonwryan at gmail.com>
Date:   Sat Mar 11 11:10:14 2017 +1300

    Elvi cleanup: S-U
---
 elvi/scholar         |  4 ++--
 elvi/scicom          | 32 --------------------------------
 elvi/scirus          | 23 -----------------------
 elvi/scpan           | 24 +++++++++++++++---------
 elvi/slashdot        |  4 ++--
 elvi/slinuxdoc       |  2 +-
 elvi/sourceforge     |  4 ++--
 elvi/springer        |  4 ++--
 elvi/stack           |  6 +++---
 elvi/stockquote      | 12 ++++++------
 elvi/thesaurus       | 10 +++++-----
 elvi/translate       |  8 ++++----
 elvi/urban           |  4 ++--
 test/scicom.test     |  1 -
 test/scirus.test     |  2 --
 test/scpan.test      |  2 +-
 test/stockquote.test |  2 +-
 17 files changed, 46 insertions(+), 98 deletions(-)

diff --git a/elvi/scholar b/elvi/scholar
index 877da95..368907c 100755
--- a/elvi/scholar
+++ b/elvi/scholar
@@ -17,8 +17,8 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"; then
-    w3_browse_url "http://scholar.google.com/"
+    w3_browse_url "https://scholar.google.com/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-	w3_browse_url "http://scholar.google.com/scholar?q=${escaped_args}"
+	w3_browse_url "https://scholar.google.com/scholar?q=${escaped_args}"
 fi
diff --git a/elvi/scicom b/elvi/scicom
deleted file mode 100755
index 2be6caf..0000000
--- a/elvi/scicom
+++ /dev/null
@@ -1,32 +0,0 @@
-#!/bin/sh
-#
-# author: Wim Van Hoydonck
-#
-# elvis: scicom		-- Search Scientific Commons
-. surfraw || exit 1
-
-w3_usage_hook () {
-    cat <<EOF
-Usage: $w3_argv0 [options] [search-string]
-Description:
-  Search Scientific Commons
-Examples:
-  $w3_argv0 vortex pairs
-EOF
-    w3_global_usage
-}
-
-
-w3_config
-w3_parse_args "$@"
-# w3_args now contains a list of arguments
-
-if null "$w3_args"; then
-    w3_browse_url "http://www.scientificcommons.org"
-else
-    escaped_args=`w3_url_of_arg $w3_args`
-    url="http://www.scientificcommons.org/#search_string=${escaped_args}"
-    w3_browse_url "${url}"
-fi
-
-
diff --git a/elvi/scirus b/elvi/scirus
deleted file mode 100755
index cf93ba9..0000000
--- a/elvi/scirus
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/sh
-# elvis: scirus		-- Search for science using Scirus (scirus.com)
-. surfraw || exit 1
-
-w3_usage_hook () {
-    cat <<EOF
-Usage: $w3_argv0 [options] [search words]...
-Description:
-  Surfraw search for science using Scirus (scirus.com)
-EOF
-    w3_global_usage
-}
-
-w3_config
-w3_parse_args "$@"
-# w3_args now contains a list of arguments
-
-if test -z "$w3_args"; then
-    w3_browse_url "http://www.scirus.com/"
-else
-    escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://scirus.com/srsapp/search?q=${escaped_args}&t=all&sort=0&g=s"
-fi
diff --git a/elvi/scpan b/elvi/scpan
index 9f0e183..8a5b23c 100755
--- a/elvi/scpan
+++ b/elvi/scpan
@@ -1,26 +1,25 @@
 #!/bin/sh
 # $Id$
-# elvis: scpan		-- Search the Comprehensive Perl Archive Network (search.cpan.org)
+# elvis: scpan		-- Search the Comprehensive Perl Archive Network (metacpan.org)
 # ianb at erislabs.net 20030918
 . surfraw || exit 1
 
 w3_config_hook () {
-def   SURFRAW_scpan_search all
+def   SURFRAW_scpan_search "$SURFRAW_scpan_opts"
 }
 
+
 w3_usage_hook () {
     cat <<EOF
 Usage: $w3_argv0 [options] [search words]...
 Description:
-  Surfraw search the Comprehensive Perl Archive Network (search.cpan.org)
+  Surfraw search the Comprehensive Perl Archive Network (metacpan.org)
 Local options:
   -search=                      Search Type
-          all     |             All
           module  |             Modules
           dist    |             Distributions
-          author                Authors
-                                Default: $SURFRAW_scpan_search
-                                Environment: SURFRAW_scpan_search
+          author  |             Authors
+                                Default: All
 EOF
     w3_global_usage
 }
@@ -38,9 +37,16 @@ w3_parse_option_hook () {
 w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
+case "$SURFRAW_scpan_search" in
+    module) searchopts="modules::"  ;;
+    dist)   searchopts="dist::"     ;;
+    author) searchopts="author::"   ;;
+    all|*)  searchopts=""           ;;
+esac
+
 if test -z "$w3_args"; then
-    w3_browse_url "http://search.cpan.org/"
+    w3_browse_url "https://metacpan.org/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-	w3_browse_url "http://search.cpan.org/search?query=${escaped_args}&mode=${SURFRAW_scpan_search}"
+	w3_browse_url "https://metacpan.org/search?q=${searchopts}${escaped_args}"
 fi
diff --git a/elvi/slashdot b/elvi/slashdot
index 823fde0..b5f19cf 100755
--- a/elvi/slashdot
+++ b/elvi/slashdot
@@ -16,8 +16,8 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"; then
-    w3_browse_url "http://www.slashdot.org/"
+    w3_browse_url "https://www.slashdot.org/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://www.slashdot.org/index2.pl?fhfilter=${escaped_args}"
+    w3_browse_url "https://www.slashdot.org/index2.pl?fhfilter=${escaped_args}"
 fi
diff --git a/elvi/slinuxdoc b/elvi/slinuxdoc
index 50cfe00..18cce00 100755
--- a/elvi/slinuxdoc
+++ b/elvi/slinuxdoc
@@ -18,7 +18,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.tldp.org/"
+    w3_browse_url "https://www.tldp.org/"
 else
     w3_custom_search -s=tldp.org "$w3_shquoted_args"
 fi
diff --git a/elvi/sourceforge b/elvi/sourceforge
index e3cbdca..b6dbf9c 100755
--- a/elvi/sourceforge
+++ b/elvi/sourceforge
@@ -50,7 +50,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.sourceforge.net/"
+    w3_browse_url "https://www.sourceforge.net/"
 else
     escaped_args=$(w3_url_of_arg $w3_args)
     if  $(yesno SURFRAW_sourceforge_exact)
@@ -59,5 +59,5 @@ else
 	else
 		isexact=0
 	fi
-    w3_browse_url "http://sourceforge.net/search/?words=${escaped_args}&exact=$isexact&typeofsearch=$SURFRAW_sourceforge_searchtype"
+    w3_browse_url "https://sourceforge.net/search/?words=${escaped_args}&exact=$isexact&typeofsearch=$SURFRAW_sourceforge_searchtype"
 fi
diff --git a/elvi/springer b/elvi/springer
index 692a06c..364d32f 100755
--- a/elvi/springer
+++ b/elvi/springer
@@ -53,10 +53,10 @@ case "$SURFRAW_springer_fields" in
 esac
 
 if null "$w3_args"; then
-    w3_browse_url "http://www.springer.com"
+    w3_browse_url "https://www.springer.com"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    url="http://www.springer.com/?searchKey=easySearchKey&searchType=easy&visited=true&propagate=false&resultStart=1&resultCount=10&SGWID=5-102-14-0-0&queryText=${escaped_args}&easySearchOption=${field}&go.x=8&go.y=7"
+    url="https://www.springer.com/?searchKey=easySearchKey&searchType=easy&visited=true&propagate=false&resultStart=1&resultCount=10&SGWID=5-102-14-0-0&queryText=${escaped_args}&easySearchOption=${field}&go.x=8&go.y=7"
     w3_browse_url "${url}"
 fi
 
diff --git a/elvi/stack b/elvi/stack
index 56ee353..036a65e 100755
--- a/elvi/stack
+++ b/elvi/stack
@@ -15,7 +15,7 @@ w3_usage_hook () {
 
 Usage: $w3_argv0 [options] [search-string]
 Description:
- Search Stack Overflow (http://stackoverflow.com)
+ Search Stack Overflow (https://stackoverflow.com)
  Combine search terms (tags) with a "+" eg., "bash+script"
 
 Local options:
@@ -66,9 +66,9 @@ esac
 
 # Check for Unix & Linux Exchange
 if [ "$SURFRAW_stack_unix" = 1 ]; then
-	url="http://unix.stackexchange.com"
+	url="https://unix.stackexchange.com"
 else
-	url="http://stackoverflow.com"
+	url="https://stackoverflow.com"
 fi
 
 # No arguments passed
diff --git a/elvi/stockquote b/elvi/stockquote
index 7113fce..ab63996 100755
--- a/elvi/stockquote
+++ b/elvi/stockquote
@@ -42,24 +42,24 @@ w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test "$SURFRAW_stockquote_provider" = "yahoo"; then
     if test -z "$w3_args"; then
-        w3_browse_url "http://quote.yahoo.com/"
+        w3_browse_url "https://quote.yahoo.com/"
     else
         escaped_args=`w3_url_of_arg $w3_args`
-        w3_browse_url "http://quote.yahoo.com/q?s=${escaped_args}"
+        w3_browse_url "https://quote.yahoo.com/q?s=${escaped_args}"
     fi
 elif test "$SURFRAW_stockquote_provider" = "nasdaq"; then
     if test -z "$w3_args"; then
-        w3_browse_url "http://www.nasdaq.com/"
+        w3_browse_url "https://www.nasdaq.com/"
     else
         escaped_args=`w3_url_of_arg $w3_args`
-        w3_browse_url "http://quotes.nasdaq.com/Quote.dll?mode=Stock&symbol=${escaped_args}&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&multi.x=44&multi.y=12"
+        w3_browse_url "https://quotes.nasdaq.com/Quote.dll?mode=Stock&symbol=${escaped_args}&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&symbol=&multi.x=44&multi.y=12"
     fi
 elif test "$SURFRAW_stockquote_provider" = "quote"; then
     if test -z "$w3_args"; then
-        w3_browse_url "http://www.quote.com/"
+        w3_browse_url "https://www.quote.com/"
     else
         escaped_args=`w3_url_of_arg $w3_args`
-        w3_browse_url "http://www.quote.com/quotecom/stocks/quotes.asp?symbols=${escaped_args}"
+        w3_browse_url "https://www.quote.com/quotecom/stocks/quotes.asp?symbols=${escaped_args}"
     fi
 else
     err "-provider ${SURFRAW_stockquote_provider} unsupported"
diff --git a/elvi/thesaurus b/elvi/thesaurus
index 5d22798..0b057ac 100755
--- a/elvi/thesaurus
+++ b/elvi/thesaurus
@@ -1,13 +1,13 @@
 #!/bin/sh
 # $Id$
-# elvis: thesaurus	-- Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
+# elvis: thesaurus	-- Look up a synonym in Oxford's thesaurus (en.oxforddictionaries.com)
 . surfraw || exit 1
 
 w3_usage_hook () {
     cat <<EOF
-Usage: $w3_argv0 [options] [search words]...
+Usage: $w3_argv0 [search words]...
 Description:
-  Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
+    Look up a synonym in Oxford's thesaurus (en.oxforddictionaries.com)
 EOF
     w3_global_usage
 }
@@ -18,8 +18,8 @@ SURFRAW_quote_ifs=0
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"; then
-    w3_browse_url "http://www.m-w.com/thesaurus.htm"
+    w3_browse_url "https://en.oxforddictionaries.com/english-thesaurus"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://www.m-w.com/cgi-bin/thesaurus?book=Thesaurus&va=${escaped_args}"
+    w3_browse_url "https://en.oxforddictionaries.com/thesaurus/${escaped_args}"
 fi
diff --git a/elvi/translate b/elvi/translate
index 02a346c..998fd5e 100755
--- a/elvi/translate
+++ b/elvi/translate
@@ -89,7 +89,7 @@ Languages (Google only):
 Examples:
   $w3_argv0 			Provider's standard translation page
   $w3_argv0 -from=fr -to=en la verite vous liberera
-  $w3_argv0 -from=en -to=es http://tashian.com/multibabel
+  $w3_argv0 -from=en -to=es https://tashian.com/multibabel
                                 Translate the given Web page
 Bugs:
   Systrans derived providers only support the following translation
@@ -132,7 +132,7 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"
-    then w3_browse_url "http://translate.google.com/"
+    then w3_browse_url "https://translate.google.com/"
 else
     if [ -z "$SURFRAW_translate_to" ];
     then
@@ -144,9 +144,9 @@ else
     fi
     escaped_args=`w3_url_of_arg $w3_args`
     case "$escaped_args" in
-        http*) w3_browse_url "http://translate.google.com/translate?&sl=${SURFRAW_translate_from}&tl=${SURFRAW_translate_to}&u=${escaped_args}"
+        http*) w3_browse_url "https://translate.google.com/translate?&sl=${SURFRAW_translate_from}&tl=${SURFRAW_translate_to}&u=${escaped_args}"
         ;;
-        *) w3_browse_url "http://translate.google.com/?&sl=${SURFRAW_translate_from}&tl=${SURFRAW_translate_to}&q=${escaped_args}"
+        *) w3_browse_url "https://translate.google.com/?&sl=${SURFRAW_translate_from}&tl=${SURFRAW_translate_to}&q=${escaped_args}"
         ;;
     esac
 fi
diff --git a/elvi/urban b/elvi/urban
index 6f764d6..e63419e 100755
--- a/elvi/urban
+++ b/elvi/urban
@@ -21,8 +21,8 @@ w3_config
 w3_parse_args "$@"
 # w3_args now contains a list of arguments
 if test -z "$w3_args"; then
-    w3_browse_url "http://www.urbandictionary.com"
+    w3_browse_url "https://www.urbandictionary.com"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://www.urbandictionary.com/define.php?term=${escaped_args}"
+    w3_browse_url "https://www.urbandictionary.com/define.php?term=${escaped_args}"
 fi
diff --git a/test/scicom.test b/test/scicom.test
deleted file mode 100644
index 97bc447..0000000
--- a/test/scicom.test
+++ /dev/null
@@ -1 +0,0 @@
-SKIP needs javascript
diff --git a/test/scirus.test b/test/scirus.test
deleted file mode 100644
index 527ee19..0000000
--- a/test/scirus.test
+++ /dev/null
@@ -1,2 +0,0 @@
-scirus cryptanalysis chaos cipher
-chaos block cipher
diff --git a/test/scpan.test b/test/scpan.test
index be3ac4b..252a58c 100644
--- a/test/scpan.test
+++ b/test/scpan.test
@@ -1,2 +1,2 @@
 scpan Acme
-Results <b>1</b> - <b>10</b> of
+The Base of Perfection
diff --git a/test/stockquote.test b/test/stockquote.test
index fd12abc..aca1b39 100644
--- a/test/stockquote.test
+++ b/test/stockquote.test
@@ -1,2 +1,2 @@
 stockquote GOOG
-Google Inc.
+Alphabet Inc.

-- 
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