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

Ian Beckwith ianb at erislabs.net
Wed Nov 11 04:33:35 UTC 2009


The following commit has been merged in the master branch:
commit 69062df3009d431403ee86de09ee3f3f2d00ad0e
Author: Ian Beckwith <ianb at erislabs.net>
Date:   Wed Nov 11 04:33:23 2009 +0000

    New elvi: debpkghome: view home page of a debian package.

diff --git a/ChangeLog b/ChangeLog
index 73f1adf..decbacc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2009-11-11  Ian Beckwith  <ianb at erislabs.net>
+
+	* New elvi: debpkghome: view home page of a debian package.
+
 2009-11-10  Ian Beckwith  <ianb at erislabs.net>
 
 	* New elvi: acronym, gcache (google cache).
diff --git a/README b/README
index fa30d72..c691f9f 100644
--- a/README
+++ b/README
@@ -176,6 +176,7 @@ debcontents     -- Search contents of debian/ubuntu packages (packages.debian.or
 deblists        -- Search debian mailing lists (lists.debian.org/search.html)
 deblogs         -- Show changelogs for a package in Debian main (changelogs.debian.net)
 debpackages     -- Search debian/ubuntu packages (packages.debian.org/packages.ubuntu.com)
+debpkghome      -- Visit the home page for a Debian package
 debpts          -- Search the Debian Package Tracking System (packages.qa.debian.org)
 debsec          -- Search the Debian Security Tracker for CVE ids or package names
 debvcsbrowse    -- Browse the VCS repository for a Debian package
diff --git a/elvi/Makefile.am b/elvi/Makefile.am
index da110db..4c072b4 100644
--- a/elvi/Makefile.am
+++ b/elvi/Makefile.am
@@ -28,6 +28,7 @@ dist_elvi_SCRIPTS	= \
 		  deblists \
 		  deblogs \
 		  debpackages \
+		  debpkghome \
 		  debpts \
 		  debsec \
 		  debvcsbrowse \
diff --git a/elvi/Makefile.in b/elvi/Makefile.in
index 1f58a10..86da46b 100644
--- a/elvi/Makefile.in
+++ b/elvi/Makefile.in
@@ -46,16 +46,16 @@ CONFIG_CLEAN_VPATH_FILES =
 am__dist_elvi_SCRIPTS_DIST = W acronym alioth altavista amazon archpkg \
 	arxiv ask aur austlii bbcnews cddb cia cite cliki cnn \
 	codesearch comlaw ctan currency cve debbugs debcontents \
-	deblists deblogs debpackages debpts debsec debvcsbrowse \
-	debwiki deja discogs dmoz ebay etym excite fast foldoc \
-	filesearching freebsd freedb freshmeat fsfdir gcache genbugs \
-	genpkg genportage gutenberg google happypenguin imdb ixquick \
-	javasun scpan slinuxdoc l1sp lastfm leodict lsm mathworld \
-	mininova musicbrainz netbsd ntrs openbsd piratebay pgpkeys \
-	port pubmed rae rfc rhyme scholar scicom slashdot sourceforge \
-	springer stockquote sunonesearch thesaurus translate urban \
-	w3css w3html w3link w3rdf wayback webster wetandwild wikipedia \
-	woffle yahoo youtube yubnub opensearch
+	deblists deblogs debpackages debpkghome debpts debsec \
+	debvcsbrowse debwiki deja discogs dmoz ebay etym excite fast \
+	foldoc filesearching freebsd freedb freshmeat fsfdir gcache \
+	genbugs genpkg genportage gutenberg google happypenguin imdb \
+	ixquick javasun scpan slinuxdoc l1sp lastfm leodict lsm \
+	mathworld mininova musicbrainz netbsd ntrs openbsd piratebay \
+	pgpkeys port pubmed rae rfc rhyme scholar scicom slashdot \
+	sourceforge springer stockquote sunonesearch thesaurus \
+	translate urban w3css w3html w3link w3rdf wayback webster \
+	wetandwild wikipedia woffle yahoo youtube yubnub opensearch
 am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
 am__vpath_adj = case $$p in \
     $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
@@ -164,16 +164,16 @@ elvidir = $(ELVIDIR)
 dist_elvi_SCRIPTS = W acronym alioth altavista amazon archpkg arxiv \
 	ask aur austlii bbcnews cddb cia cite cliki cnn codesearch \
 	comlaw ctan currency cve debbugs debcontents deblists deblogs \
-	debpackages debpts debsec debvcsbrowse debwiki deja discogs \
-	dmoz ebay etym excite fast foldoc filesearching freebsd freedb \
-	freshmeat fsfdir gcache genbugs genpkg genportage gutenberg \
-	google happypenguin imdb ixquick javasun scpan slinuxdoc l1sp \
-	lastfm leodict lsm mathworld mininova musicbrainz netbsd ntrs \
-	openbsd piratebay pgpkeys port pubmed rae rfc rhyme scholar \
-	scicom slashdot sourceforge springer stockquote sunonesearch \
-	thesaurus translate urban w3css w3html w3link w3rdf wayback \
-	webster wetandwild wikipedia woffle yahoo youtube yubnub \
-	$(am__append_1)
+	debpackages debpkghome debpts debsec debvcsbrowse debwiki deja \
+	discogs dmoz ebay etym excite fast foldoc filesearching \
+	freebsd freedb freshmeat fsfdir gcache genbugs genpkg \
+	genportage gutenberg google happypenguin imdb ixquick javasun \
+	scpan slinuxdoc l1sp lastfm leodict lsm mathworld mininova \
+	musicbrainz netbsd ntrs openbsd piratebay pgpkeys port pubmed \
+	rae rfc rhyme scholar scicom slashdot sourceforge springer \
+	stockquote sunonesearch thesaurus translate urban w3css w3html \
+	w3link w3rdf wayback webster wetandwild wikipedia woffle yahoo \
+	youtube yubnub $(am__append_1)
 all: all-am
 
 .SUFFIXES:
diff --git a/elvi/debvcsbrowse b/elvi/debpkghome
similarity index 65%
copy from elvi/debvcsbrowse
copy to elvi/debpkghome
index 2be27cb..1f19ab7 100755
--- a/elvi/debvcsbrowse
+++ b/elvi/debpkghome
@@ -1,21 +1,21 @@
 #!/bin/sh
-# elvis: debvcsbrowse	-- Browse the VCS repository for a Debian package
+# elvis: debpkghome	-- Visit the home page for a Debian package
 . surfraw || exit 1
 
 w3_usage_hook () {
     cat <<EOF
 Usage: $w3_argv0 [package|file.dsc|controlfile]
 Description:
-  Browse the VCS repository for a Debian package
+  Visit the home page for a Debian package
 EOF
     w3_global_usage
 }
 
-extract_vcs_browser ()
+extract_home_page ()
 {
     # sed /I is a gnu extension
-    grep -i '^vcs-browser:' | head -1 | \
-    	sed 's/^[Vv][Cc][Ss]-[Bb][Rr][Oo][Ww][Ss][Ee][Rr]: *//;'
+    grep -i '^homepage:' | head -1 | \
+    	sed 's/^[Hh][Oo][Mm][Ee][Pp][Aa][Gg][Ee]: *//;'
 }
 
 do_control()
@@ -25,10 +25,10 @@ do_control()
 	err $1": file not found"
 	return
     fi
-    OUT="$(cat $1 | extract_vcs_browser)"
+    OUT="$(cat $1 | extract_home_page)"
     if [ -z "$OUT" ]
     then
-	err $1": no Vcs-Browser field"
+	err $1": no Homepage field"
     else
 	echo "$OUT"
     fi
@@ -38,7 +38,7 @@ do_package()
 {
     if [ ! -x "`which apt-cache`" ]
     then
-	err "apt-cache not installed. Try finding the vcs via debpts instead"
+	err "apt-cache not installed. Try finding the homepage via debpts instead"
 	return
     fi
     OUT="$(apt-cache showsrc $1)"
@@ -47,10 +47,10 @@ do_package()
 	err $1": package not found"
 	return
     fi
-    OUT="$(echo "$OUT" | extract_vcs_browser)"
+    OUT="$(echo "$OUT" | extract_home_page)"
     if [ -z "$OUT" ]
     then
-	err $1": no Vcs-Browser field"
+	err $1": no Homepage field"
     else
 	echo "$OUT"
     fi
diff --git a/links.IN b/links.IN
index fc8f3ac..5ed03e2 100644
--- a/links.IN
+++ b/links.IN
@@ -24,6 +24,7 @@ elvi.1sr.gz @mandir@/man1/debcontents.1sr.gz
 elvi.1sr.gz @mandir@/man1/deblists.1sr.gz
 elvi.1sr.gz @mandir@/man1/deblogs.1sr.gz
 elvi.1sr.gz @mandir@/man1/debpackages.1sr.gz
+elvi.1sr.gz @mandir@/man1/debpkghome.1sr.gz
 elvi.1sr.gz @mandir@/man1/debpts.1sr.gz
 elvi.1sr.gz @mandir@/man1/debsec.1sr.gz
 elvi.1sr.gz @mandir@/man1/debvcsbrowse.1sr.gz
diff --git a/test/debpkghome.test b/test/debpkghome.test
new file mode 100644
index 0000000..74a8efb
--- /dev/null
+++ b/test/debpkghome.test
@@ -0,0 +1,2 @@
+debpkghome surfraw
+Oh Baybee

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



More information about the Surfraw-commits mailing list