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

Ian Beckwith ianb at erislabs.net
Mon Oct 10 02:24:39 UTC 2011


The following commit has been merged in the master branch:
commit 977c5e815b8538a871cc1da866a50d16da1f736d
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Mon Oct 10 03:23:25 2011 +0100

    new elvi: f5 and cisco, by Shain Singh <shain.singh at gmail.com>

diff --git a/.gitignore b/.gitignore
index 90d55e9..b56e5ab 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,3 +1,4 @@
+*~
 Makefile
 build-stamp
 config.log
diff --git a/AUTHORS b/AUTHORS
index 896097d..02b33d9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -126,6 +126,9 @@ Sara Fauzia <sara at archlinux.us>
 Paulo Almeida <paulo at diasalmeida.com>
         elvi: priberam
 
+Shain Singh <shain.singh at gmail.com>
+        elvi: cisco, f5 
+
 THANKS TO
 
 Brian Nelson           <bnelson at bloodclot.net>
diff --git a/ChangeLog b/ChangeLog
index 58e4a4a..d22d4ef 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2011-10-10  Shain Singh <shain.singh at gmail.com>
+
+	* New elvi: f5, cisco
+
 2011-10-10  Jason Ryan  <jasonwryan at gmail.com>
 
 	* New elvi: pin (search pinboard.in).
diff --git a/README b/README
index 0d0125a..00a4d5c 100644
--- a/README
+++ b/README
@@ -172,6 +172,7 @@ bugmenot        -- Bypass compulsory web registration with bugmenot.com
 bugzilla        -- Search for bugs on Bugzilla bugtrackers
 cablesearch     -- search openports for OpenBSD packages
 cia             -- Search CIA documents at www.cia.gov
+cisco           -- Search Cisco documentation (www.cisco.com)
 cite            -- Search computer science papers (citeseerx.ist.psu.edu)
 cliki           -- Search the common lisp wiki
 cnn             -- Search on CNN (cnn.com)
@@ -198,6 +199,7 @@ duckduckgo      -- Securely search the web using duckduckgo (www.duckduckgo.com)
 ebay            -- Search the Ebay auction site
 etym            -- Look up word origins at www.etymonline.com
 excite          -- Search on Excite (www.excite.com)
+f5              -- Search F5 related information (www.f5.com)
 finkpkg         -- Search Fink packages (pdb.finkproject.org)
 foldoc          -- The Free On-Line Dictionary Of Computing (foldoc.org)
 freebsd         -- Search FreeBSD related information (www.freebsd.org)
diff --git a/elvi/Makefile.am b/elvi/Makefile.am
index 717ce53..aa53291 100644
--- a/elvi/Makefile.am
+++ b/elvi/Makefile.am
@@ -20,6 +20,7 @@ dist_elvi_SCRIPTS	= \
 		  bugzilla \
 		  cablesearch \
 		  cia \
+		  cisco \
 		  cite \
 		  cliki \
 		  cnn \
@@ -46,6 +47,7 @@ dist_elvi_SCRIPTS	= \
 		  ebay \
 		  etym \
 		  excite \
+		  f5 \
 		  foldoc \
 		  finkpkg \
 		  freebsd \
diff --git a/elvi/sunonesearch b/elvi/cisco
similarity index 52%
copy from elvi/sunonesearch
copy to elvi/cisco
index 267b938..17d03fa 100755
--- a/elvi/sunonesearch
+++ b/elvi/cisco
@@ -1,6 +1,6 @@
 #!/bin/sh
 # $Id$
-# elvis: sunonesearch	-- Search Sun One Search (onesearch.sun.com)
+# elvis: cisco		-- Search Cisco documentation (www.cisco.com)
 
 . surfraw || exit 1
 
@@ -8,7 +8,7 @@ w3_usage_hook () {
     cat <<EOF
 Usage: $w3_argv0 [options] [search words]...
 Description:
-  Surfraw search Sun One Search (onesearch.sun.com)
+Surfraw search Cisco documentation (www.cisco.com)
 EOF
     w3_global_usage
 }
@@ -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://onesearch.sun.com/"
+    w3_browse_url "http://tools.cisco.com/"
 else
     escaped_args=`w3_url_of_arg $w3_args`
-    w3_browse_url "http://search.sun.com/search/onesearch/index.jsp?qt=${escaped_args}"
+    w3_browse_url "http://tools.cisco.com/search/JSP/search-results.get?isFormSubmit=true&strQueryText=${escaped_args}"
 fi
diff --git a/elvi/f5 b/elvi/f5
new file mode 100755
index 0000000..1941b95
--- /dev/null
+++ b/elvi/f5
@@ -0,0 +1,56 @@
+#!/bin/sh
+# $Id$
+# elvis: f5		-- Search F5 related information (www.f5.com)
+. surfraw || exit 1
+
+w3_config_hook () {
+defyn   SURFRAW_f5_dc           no
+}
+
+w3_usage_hook () {
+    cat <<EOF
+Usage: $w3_argv0 [options] [search-string | PR-number]
+Description:
+  Surfraw search F5 related information
+Local options:
+  -dc[=(yes|no)]                Search F5 Devcentral
+                                Default: $SURFRAW_f5_dc
+                                Environment: SURFRAW_f5_dc
+Examples:
+  $w3_argv0                       Teleport to the F5 Knowledgebase
+  $w3_argv0 -dc                   Teleport to the F5 Devcentral site
+EOF
+    w3_global_usage
+}
+
+w3_parse_option_hook () {
+    opt="$1"
+    optarg="$2"
+    case "$opt" in
+	-dc)	setoptyn	SURFRAW_f5_dc		yes	;;
+	-dc=*) setoptyn	SURFRAW_f5_dc		$optarg	;;
+	*) return 1 ;;
+    esac
+    return 0
+}
+
+w3_config
+w3_parse_args "$@"
+# w3_args now contains a list of arguments
+test -z "$w3_args" || escaped_args=`w3_url_of_arg $w3_args`
+
+if ok SURFRAW_f5_dc; then
+    if test -z "$escaped_args"; then
+        w3_browse_url "http://devcentral.f5.com"
+    else
+        w3_browse_url "http://devcentral.f5.com/Default.aspx?tabid=37&cx=015798286719081439686:g38hs-tdy64&cof=FORID:11i&q=${escaped_args}"
+    fi
+    exit $?
+fi
+if test -z "$escaped_args"; then
+    w3_browse_url "http://www.f5.com"
+else
+    w3_browse_url "http://search.f5.com/search?q=${escaped_args}&btnG=Search&entqr=0&ud=1&sort=date%3AD%3AL%3Ad1&output=xml_no_dtd&oe=UTF-8&ie=UTF-8&client=default_frontend&proxystylesheet=default_frontend"
+
+fi
+exit $?
diff --git a/test/cisco.test b/test/cisco.test
new file mode 100644
index 0000000..2a23863
--- /dev/null
+++ b/test/cisco.test
@@ -0,0 +1,2 @@
+cisco netflow
+Cisco IOS NetFlow
diff --git a/test/f5.test b/test/f5.test
new file mode 100644
index 0000000..c215e07
--- /dev/null
+++ b/test/f5.test
@@ -0,0 +1,3 @@
+f5 SNMP
+Simple Network Management Protocol
+

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



More information about the Surfraw-commits mailing list