Commit aadc380d authored by Ian Beckwith's avatar Ian Beckwith

new elvi: scpan and deblists (closes #134498) elvi/amazon: fixed quoting

    (closes #163903) elvi/deja: added patch from Christian Garbs
    <mitch@yggdrasil.mitch.h.shuttle.de> (closes #149600) surfraw.in: fixed
    browser selection (closes #118314) applied new_window handling patch
    from Brian Nelson <bnelson@bloodclot.net> (closes #165967) HACKING:
    added instructions for adding an elvi to the distribution AUTHORS:
    added myself ran aclocal, automake and autoconf plus various
    typo/formatting fixes.
parent 986f1208
......@@ -10,4 +10,8 @@ Christian Surchi <csurchi@debian.org>
Jason Harris <jharris@widowmaker.com>
elvi: freebsd, openbsd, filesearching, ftpfind
Ian Beckwith <ianb@nessie.mcc.ac.uk>
elvi: alioth, bbcnews, cddb, deblists, freedb, imdb, scpan
plus various tweaks.
$Id$
......@@ -112,4 +112,27 @@ Or... How to Eat The CHEESE
-Julian Assange <proff-projects-surfraw@iq.org>
APPENDIX 1
Adding an elvi to the distribution:
1: write it (see above)
2: copy elviname to the elvi directory
3: add elviname to the bin_SCRIPTS list in elvi/Makefile.am
4: add a link for the manpage in debian/surfraw.links
5: rm elvi/surfraw_elvi.list
6: run automake and autoconf
7: rebuild the package (eg fakeroot debian/rules binary)
(this recreates elvi/surfraw.list)
8: update the elvi list in README from elvi/surfraw_elvi.list
9: if using cvs, '(cd elvi;cvs add elviname)' then 'cvs commit'
$Id$
This diff is collapsed.
......@@ -50,49 +50,56 @@ Distribution:
For example:
$ surfraw
W -- Activate Surfraw defined web-browser
altavista -- Search the web using Altavista (www.altavista.com)
amazon -- Search the amazon.com bookstore
appwatch -- Search entries on Appwatch (www.appwatch.com)
ask -- Question the web using Ask Jeeves (www.ask.com)
austlii -- Search Australian Law docs (www.austlii.edu.au)
britannica -- Look up word in Encyclopedia Britannica (www.britannica.com)
cite -- Search computer science papers (www.researchindex.com)
cnn -- Search on CNN (cnn.com)
currency -- Abuse the Universal Currency Converter (www.xe.net/ucc)
debbugs -- Search the debian BTS (bugs.debian.org)
debcontents -- Search contents of debian packages(packages.debian.org)
debpackages -- Search debian packages (packages.debian.org)
deja -- Search usenet using Deja News (www.dejanews.com)
excite -- Search on Excite (www.excite.com)
fast -- Search the web using FAST Search (www.alltheweb.com)
filesearching -- Search files on filesearching (www.filesearching.com)
freebsd -- Search FreeBSD related information (www.freebsd.org)
freshmeat -- Search Freshmeat (www.freshmeat.net)
ftpfind -- Search files on ftpfind (www.ftpfind.com)
ftpsearch -- Search files on ftpsearch (ftpsearch.lycos.com)
google -- Search the web using Google (www.google.com)
jake -- Search journal/databases in jake (jake.med.yale.edu)
linuxdoc -- Search entries in LDP (www.linuxdoc.org)
netbsd -- Search NetBSD related information (www.netbsd.org)
openbsd -- Search OpenBSD related information (www.openbsd.org)
pubmed -- Search medical/molbio databases (www.ncbi.nlm.nih.gov)
raging -- Search the web using Raging (www.raging.com)
rhyme -- Search for rhymes et al using Lycos Rhyme (rhyme.lycos.com)
scaleplus -- Search Australian Law using ScalePlus (scaleplus.law.gov.au)
slashdot -- Search stories on Slashdot (www.slashdot.org)
sourceforge -- Search SourceForge (www.sourceforge.net)
stockquote -- Get a single stock quote (multiple providers)
sundocs -- Search docs on Sun.com (docs.sun.com)
sunsolve -- Search public docs on Sunsolve (sunsolve.sun.com)
swhois -- Search Whois (www.geektools.com)
thesaurus -- Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
translate -- Translate human languages (various providers)
webster -- Look up word in Merriam-Webster's Dictionary (www.m-w.com)
wetandwild -- Real time weather information (many sources)
woffle -- Search the web using Woffle (localhost:8080)
xxx -- Superior XXX, hot and ready to press (arXiv.org)
yahoo -- Search Yahoo categories (www.yahoo.com)
W -- Activate Surfraw defined web-browser
alioth -- Search Alioth (alioth.debian.org)
altavista -- Search the web using Altavista (www.altavista.com)
amazon -- Search the amazon.com bookstore
appwatch -- Search entries on Appwatch (www.appwatch.com)
ask -- Question the web using Ask Jeeves (www.ask.com)
austlii -- Search Australian Law docs (www.austlii.edu.au)
bbcnews -- Search BBC News (news.bbc.co.uk)
britannica -- Look up word in Encyclopedia Britannica (www.britannica.com)
cddb -- Search for cd track listings in CDDB (www.gracenote.com)
cite -- Search computer science papers (www.researchindex.com)
cnn -- Search on CNN (cnn.com)
currency -- Abuse the Universal Currency Converter (www.xe.net/ucc)
debbugs -- Search the debian BTS (bugs.debian.org)
debcontents -- Search contents of debian packages (packages.debian.org)
deblists -- Search debian mailing lists (lists.debian.org/search.html)
debpackages -- Search debian packages (packages.debian.org)
deja -- Search usenet using Google Groups (groups.google.com)
excite -- Search on Excite (www.excite.com)
fast -- Search the web using FAST Search (www.alltheweb.com)
filesearching -- Search files on filesearching (www.filesearching.com)
freebsd -- Search FreeBSD related information (www.freebsd.org)
freedb -- Search for cd track listings in FreeDB (www.freedb.org)
freshmeat -- Search Freshmeat (www.freshmeat.net)
ftpfind -- Search files on ftpfind (www.ftpfind.com)
ftpsearch -- Search files on ftpsearch (ftpsearch.lycos.com)
google -- Search the web using Google (www.google.com)
imdb -- Search the Internet Movie Database (www.imdb.com)
jake -- Search journal/databases in jake (jake.med.yale.edu)
netbsd -- Search NetBSD related information (www.netbsd.org)
openbsd -- Search OpenBSD related information (www.openbsd.org)
pubmed -- Search medical/molbio databases (www.ncbi.nlm.nih.gov)
raging -- Search the web using Raging (www.raging.com)
rhyme -- Search for rhymes et al using Lycos Rhyme (rhyme.lycos.com)
scaleplus -- Search Australian Law using ScalePlus (scaleplus.law.gov.au)
scpan -- Search the Comprehensive Perl Archive Network (search.cpan.org)
slashdot -- Search stories on Slashdot (www.slashdot.org)
slinuxdoc -- Search entries in LDP (www.linuxdoc.org)
sourceforge -- Search SourceForge (www.sourceforge.net)
stockquote -- Get a single stock quote (multiple providers)
sundocs -- Search docs on Sun.com (docs.sun.com)
sunsolve -- Search public docs on Sunsolve (sunsolve.sun.com)
swhois -- Search Whois (www.geektools.com)
thesaurus -- Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
translate -- Translate human languages (various providers)
webster -- Look up word in Merriam-Webster's Dictionary (www.m-w.com)
wetandwild -- Real time weather information (many sources)
woffle -- Search the web using Woffle (localhost:8080)
xxx -- Superior XXX, hot and ready to press (arXiv.org)
yahoo -- Search Yahoo categories (www.yahoo.com)
All elvi have useful low calorie help, for example:
......
This diff is collapsed.
This diff is collapsed.
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/alioth.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/altavista.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/amazon.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/appwatch.1.gz
......@@ -9,6 +10,7 @@ usr/share/man/man1/surfraw.1.gz usr/share/man/man1/cnn.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/currency.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/debbugs.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/debcontents.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/deblists.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/debpackages.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/deja.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/excite.1.gz
......@@ -26,6 +28,7 @@ usr/share/man/man1/surfraw.1.gz usr/share/man/man1/pubmed.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/raging.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/rhyme.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/scaleplus.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/scpan.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/slashdot.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/slinuxdoc.1.gz
usr/share/man/man1/surfraw.1.gz usr/share/man/man1/sourceforge.1.gz
......
# $Id$
bin_SCRIPTS = \
alioth \
altavista \
amazon \
appwatch \
......@@ -13,6 +14,7 @@ bin_SCRIPTS = \
currency \
debbugs \
debcontents \
deblists \
debpackages \
deja \
excite \
......@@ -26,6 +28,7 @@ bin_SCRIPTS = \
jake \
google \
imdb \
scpan \
slinuxdoc \
netbsd \
openbsd \
......
This diff is collapsed.
#!/bin/sh
# elvis: alioth -- Search Alioth (alioth.debian.org)
# $Id$
# elvis: alioth -- Search Alioth (alioth.debian.org)
# ianb@nessie.mcc.ac.uk 20030910
# adapted from sourceforge elvi
......
......@@ -82,7 +82,7 @@ pre_url="http://${host}/exec/obidos"
w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
if null $w3_args; then
if null "$w3_args"; then
w3_browse_url "${pre_url}/redirect-home/undergroundpubli?tag-id=undergroundpubli"
else
escaped_args=`w3_url_of_arg $w3_args`
......
#!/bin/sh
# $Id$
# elvis: debcontents -- Search contents of debian packages(packages.debian.org)
# elvis: debcontents -- Search contents of debian packages (packages.debian.org)
. surfraw || exit 1
w3_config_hook () {
......
#!/bin/sh
# $Id$
# elvis: deblists -- Search debian mailing lists (lists.debian.org/search.html)
# ianb@nessie.mcc.ac.uk 2003919
. surfraw || exit 1
function dodate
{
if [ $# -eq 0 ]
then
datespec=""
else
datespec="$1"
fi
echo "$datespec" |
perl -w -e '
######################################################################
# start perl
$arg=<>;
chomp($arg);
$arg=~s/\s//g;
$arg=lc($arg);
$arcstartyear="1995";
$arcstartquarter="3";
$arcstartdate="1995q3";
$arcstartrange="1995q3-1995q4";
$ynow=qx/date +%Y/; chomp($ynow);
$mnow=qx/date +%m/; chomp($mnow);
$qnow=sprintf("%.0d",($mnow / 4)); $qnow++;
if($arg eq "") { $arg="${ynow}q${qnow}"; }
@ranges=split(/,/,$arg,-1);
@ranges=map(canonrange($_),@ranges);
@ranges=map(fillrange($_),@ranges);
@ranges=unique(@ranges);
@ranges=sort(@ranges);
@ranges=map(toform($_),@ranges);
my $dsep="&dates=";
print($dsep,join($dsep,@ranges),"\n");
sub unique
{
my %hash=map { $_ => 1; } @_;
return(keys(%hash));
}
sub toform
{
my $range=shift;
my @quarters=("Jan+to+Mar+",
"Apr+to+Jun+",
"Jul+to+Sep+",
"Oct+to+Dec+");
my ($y,$q)=($range=~/^(\d+)q(\d)/i);
$q--;
return($quarters[$q].$y);
}
sub fillrange
{
my $range=shift;
my @ranges=();
my $year;
# expand bare years
if(($year)=($range=~/^(\d+)$/))
{
if($year eq $arcstartyear) { push(@ranges,fillrange($arcstartrange)); }
elsif($year eq $ynow)
{
if($qnow>1) { push(@ranges,fillrange("${ynow}q1-${ynow}q$qnow")); }
else { push(@ranges,"${ynow}q1"); }
}
else
{
push(@ranges,fillrange("${year}q1-${year}q4"));
}
}
if(my ($start,$end)=($range=~/(.*)-(.*)/))
{
push(@ranges,expandrange($start,$end));
}
else
{
push(@ranges,$range);
}
return @ranges;
}
# convert eg "1998q3","1999q2" -> ("1998q3","1998q4","1999q1","1999q2")
sub expandrange
{
my($start,$end)=@_;
my($sy,$sq)=($start=~/^(\d+)q(\d)/);
my($ey,$eq)=($end =~/^(\d+)q(\d)/);
my @quarts=();
for (my $q=$sq;$q<=4;$q++) { push(@quarts,"${sy}q$q"); }
for (my $y=($sy+1);$y<$ey;$y++) { for my $q (1..4) { push(@quarts,"${y}q$q") } }
for (my $q=1;$q<=$eq;$q++) { push(@quarts, "${ey}q$q") }
return @quarts;
}
# fill in range defaults
sub canonrange
{
my $arg=shift;
if($arg=~/(.*)-(.*)/)
{
my($start,$end)=(canondate($1),canondate($2));
# if arcstartyear, get the right start quarter
if(($start eq "") || ($start eq $arcstartyear)) { $start=$arcstartdate;}
# if they specified a start quarter but no year
if($start!~/^\d+/) { $start=$arcstartyear.$start;}
# start in 1st quarter
if($start!~/q\d$/) { $start.="q1"; }
# end in last quarter
if($end !~/q\d$/) { $end .="q4"; }
# default to current year/quarter
if(($end eq "") || ($end eq $ynow)) { $end=$ynow."q".$qnow;}
if($end !~/^\d+/) { $end =$ynow.$end ;}
return($start."-".$end);
}
else
{
$arg=canondate($arg);
# default to current year/quarter
if($arg eq "") { $arg=$ynow."q".$qnow; }
if($arg!~/^\d+/) { $arg=$ynow.$arg; }
# expand a year to all its quarters
if($arg=~/^(\d+)$/)
{
my $y=$1;
my $startq=1;
# get archive start right
if($y eq $arcstartyear) { $startq = $arcstartquarter; }
my @arg=map({$y."q".$_} $startq..4); return @arg;
}
return $arg;
}
}
# checks date and make it 4 digit
sub canondate
{
my $datespec=shift;
return "" if($datespec eq "");
unless($datespec=~/^(\d*)?(q\d)?$/)
{
print("Bad date spec: $datespec\n");
exit(1);
}
if($datespec=~/^(\d+)/)
{
my $year=$1;
if(($year>90) && ($year <= 99)) { $datespec="19".$datespec; }
elsif($year<90)
{
$newyear=sprintf("20%02.d",$year);
$datespec=~s/^$year/$newyear/;
}
}
return($datespec);
}
#end perl
######################################################################
' # end of perl quoting
return $?
}
w3_config_hook () {
def SURFRAW_deblists_results $SURFRAW_results
def SURFRAW_deblists_lists "user"
def SURFRAW_deblists_dates ""
def SURFRAW_deblists_case ""
def SURFRAW_deblists_errors 0
def SURFRAW_deblists_partial ""
def SURFRAW_deblists_sameline ""
def SURFRAW_deblists_maxlines 10
def SURFRAW_deblists_searchhelp 0
}
w3_usage_hook () {
cat <<EOF
Usage: $w3_argv0 [options] [search patterns]...
Description:
Surfraw search debian mailing lists (lists.debian.org/search.html)
Local options:
-shelp | Go to search help page
(http://lists.debian.org/glimpse.html#sect7)
-results=NUM | Number of search results returned
Default: $SURFRAW_deblists_results
Environment: SURFRAW_deblists_results
-dates=DATESPEC | Specify quarters to search
Format: YEARqQUARTER eg 1998q3
Separate multiple quarters with commas
Whole years expanded (eg 97 => 1997q1-1997q4)
Ranges allowed
Range ends default to archive start/now
Examples:
1995,96q2-97q1,99q3-0,2002-
- (whole archive)
Archive starts 1995q3
Default: current quarter
Environment: SURFRAW_deblists_dates
-case | Case-sensitive search
Default: no
Environment: SURFRAW_deblists_case
-errors=0|1|2|best | Errors allowed (best=Best Match)
Default: $SURFRAW_deblists_errors
Environment: SURFRAW_deblists_errors
-partial | Allow partial matches (eg deb => "debian" or "debug")
Default: no
Environment: SURFRAW_deblists_partial
-sameline | Words separated by ';' must appear on same line
Default: no
Environment: SURFRAW_deblists_sameline
-lines=0|5|10|50|100 | Max lines per message (0=titles only)
-list=LIST | List to search
Default: $SURFRAW_deblists_lists
Environment: SURFRAW_deblists_lists
Lists (as of 2003-09-18):
68k accessibility admintool alpha amd64 announce apache arm autobuild
beowulf books boot bsd cd cd-vendors cdwrite changes chinese
chinese-big5 chinese-gb commercial consultants ctte curiosa debbugs
deity devel devel-announce devel-changes devel-french devel-games
devel-italian devel-m68k-changes devel-portuguese
devel-powerpc-changes devel-spanish devel-sparc-changes doc dpkg edu
emacsen embedded esperanto events-eu events-na faq firewall french gcc
glibc gtk-gnome hams handheld hppa hurd i18n ia64 ipv6 isp italian
japanese java jr kde l10n-catalan l10n-danish l10n-dutch l10n-english
l10n-finnish l10n-french l10n-german l10n-greek l10n-hungarian
l10n-italian l10n-polish l10n-portuguese l10n-spanish l10n-turkish
laespiral laptop lcs-eng legal lex lint-maint lsb lsb-confcall
lsb-discuss lsb-impl lsb-spec lsb-test med mentors mips mirrors
multimedia newmaint newmaint-admin newmaint-discuss news news-french
news-german news-portuguese nonprofit ocaml-maint openoffice parisc
perl pilot policy pool powerpc project publicity python qa qa-packages
qa-private qt-kde release russian s390 s390-changes security
security-announce sgml simplified-chinese snapshots sparc
sparc-changes spi-announce spi-general ssh superh testing tetex-maint
toolchain ultralinux user user-catalan user-danish user-de user-french
user-german user-indonesian user-polish user-portuguese user-spanish
user-swedish user-turkish user-ukrainian vgui-discuss vote win32 wnpp
www x
EOF
w3_global_usage
}
w3_parse_option_hook () {
opt="$1"
optarg="$2"
case "$opt" in
-result*=*) setopt SURFRAW_deblists_results $optarg ;;
-error*=*) setopt SURFRAW_deblists_errors $optarg ;;
-line*=*) setopt SURFRAW_deblists_maxlines $optarg ;;
-lis*=*) setopt SURFRAW_deblists_lists $optarg ;;
-date*=*) setopt SURFRAW_deblists_dates $optarg ;;
-case) setopt SURFRAW_deblists_case on ;;
-partial) setopt SURFRAW_deblists_partial on ;;
-same*) setopt SURFRAW_deblists_sameline on ;;
-shelp*) setopt SURFRAW_deblists_searchhelp 1 ;;
*) return 1 ;;
esac
return 0
}
w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
if [ $SURFRAW_deblists_searchhelp -eq 1 ]; then
w3_browse_url "http://lists.debian.org/glimpse.html#sect7"
elif test -z "$w3_args"; then
w3_browse_url "http://lists.debian.org/search.html"
else
escaped_args=`w3_url_of_arg $w3_args`
url="http://lists.debian.org/cgi-bin/searchlists?query=${escaped_args}&maxfiles=${SURFRAW_deblists_results}&maxlines=${SURFRAW_deblists_maxlines}&errors=${SURFRAW_deblists_errors}"
# 2003-09-19: website implies you can search multiple lists
# simultaneously, but it doesn't work (and hasn't for a long time
# judging by bug reports), so this code is disabled for now
# lists=`echo "${SURFRAW_deblists_lists}" | sed 's/[[:space:]]//g;s/,/\&lists=/g'`
url="${url}&lists=${SURFRAW_deblists_lists}"
dodate_ret=`dodate "${SURFRAW_deblists_dates}"`
if [ $? -eq 0 ]
then
url="${url}${dodate_ret}"
else
# error in date spec - abort
echo "$0: $dodate_ret"
exit 1
fi
if [ "${SURFRAW_deblists_case}" != "" ]
then
url="${url}&case=${SURFRAW_deblists_case}"
fi
if [ "${SURFRAW_deblists_partial}" != "" ]
then
url="${url}&partial=${SURFRAW_deblists_partial}"
fi
if [ "${SURFRAW_deblists_sameline}" != "" ]
then
url="${url}&lineonly=${SURFRAW_deblists_sameline}"
fi
w3_browse_url "$url"
fi
#!/bin/sh
# $Id$
# elvis: deja -- Search usenet using Deja News (www.dejanews.com)
# elvis: deja -- Search usenet using Google Groups (groups.google.com)
. surfraw || exit 1
w3_config_hook () {
def SURFRAW_deja_results $SURFRAW_results
def SURFRAW_deja_style "normal"
}
w3_usage_hook () {
cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
Search the usenet using Deja-News (www.dejanews.com)
Search usenet using Google Groups (groups.google.com)
Local options:
-results=NUM Number of search results returned
Default: $SURFRAW_deja_results
Environment: $SURFRAW_deja_results
Environment: SURFRAW_deja_results
-m Search for Message-ID
EOF
w3_global_usage
}
......@@ -25,6 +27,7 @@ w3_parse_option_hook () {
optarg="$2"
case "$opt" in
-results=*) setopt SURFRAW_deja_results $optarg ;;
-m*) setopt SURFRAW_deja_style "message-id" ;;
*) return 1 ;;
esac
return 0
......@@ -34,8 +37,12 @@ w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
if test -z "$w3_args"; then
w3_browse_url "http://www.dejanews.com/"
w3_browse_url "http://groups.google.com/"
else
escaped_args=`w3_url_of_arg $w3_args`
w3_browse_url "http://x25.deja.com/=dnc/[ST_rn=ps]/qs.xp?ST=PS&svcclass=dnserver&QRY=${escaped_args}&defaultOp=AND&DBS=1&OP=dnquery.xp&LNG=ALL&showsort=date&test=PS&maxhits=${SURFRAW_deja_results}"
if test "${SURFRAW_deja_style}" = "normal"; then
w3_browse_url "http://groups.google.com/groups?q=${escaped_args}&num=${SURFRAW_deja_results}"
else
w3_browse_url "http://groups.google.com/groups?as_umsgid=${escaped_args}&num=${SURFRAW_deja_results}"
fi
fi
#!/bin/sh
# elvis: freedb -- Search for cd track listings in FreeDB (www.freedb.org)
# elvis: freedb -- Search for cd track listings in FreeDB (www.freedb.org)
# ianb@nessie.mcc.ac.uk 20030129
# notes at end of script
......
#!/bin/sh
# $Id$
# elvis: scpan -- Search the Comprehensive Perl Archive Network (search.cpan.org)
# ianb@nessie.mcc.ac.uk 20030918
. surfraw || exit 1
w3_config_hook () {
def SURFRAW_scpan_search all
}
w3_usage_hook () {
cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
Surfraw search the Comprehensive Perl Archive Network (search.cpan.org)
Local options:
-search= Search Type
all | All
module | Modules
dist | Distributions
author Authors
Default: $SURFRAW_scpan_search
Environment: SURFRAW_scpan_search
EOF
w3_global_usage
}
w3_parse_option_hook () {
opt="$1"
optarg="$2"
case "$opt" in
-search=*) setopt SURFRAW_scpan_search $optarg ;;
*) return 1 ;;
esac
return 0
}
w3_config
w3_parse_args "$@"
# w3_args now contains a list of arguments
if test -z "$w3_args"; then
w3_browse_url "http://search.cpan.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}"
fi
W -- Activate Surfraw defined web-browser
alioth -- Search Alioth (alioth.debian.org)
altavista -- Search the web using Altavista (www.altavista.com)
amazon -- Search the amazon.com bookstore
appwatch -- Search entries on Appwatch (www.appwatch.com)
ask -- Question the web using Ask Jeeves (www.ask.com)
austlii -- Search Australian Law docs (www.austlii.edu.au)
bbcnews -- Search BBC News (news.bbc.co.uk)
britannica -- Look up word in Encyclopedia Britannica (www.britannica.com)
cddb -- Search for cd track listings in CDDB (www.gracenote.com)
cite -- Search computer science papers (www.researchindex.com)
cnn -- Search on CNN (cnn.com)
currency -- Abuse the Universal Currency Converter (www.xe.net/ucc)
debbugs -- Search the debian BTS (bugs.debian.org)
debcontents -- Search contents of debian packages(packages.debian.org)
debpackages -- Search debian packages (packages.debian.org)
deja -- Search usenet using Deja News (www.dejanews.com)
excite -- Search on Excite (www.excite.com)
fast -- Search the web using FAST Search (www.alltheweb.com)
filesearching -- Search files on filesearching (www.filesearching.com)
freebsd -- Search FreeBSD related information (www.freebsd.org)
freedb -- Search for cd track listings in FreeDB (www.freedb.org)
freshmeat -- Search Freshmeat (www.freshmeat.net)
ftpfind -- Search files on ftpfind (www.ftpfind.com)
ftpsearch -- Search files on ftpsearch (ftpsearch.lycos.com)
google -- Search the web using Google (www.google.com)
imdb -- Search the Internet Movie Database (www.imdb.com)
jake -- Search journal/databases in jake (jake.med.yale.edu)
netbsd -- Search NetBSD related information (www.netbsd.org)
openbsd -- Search OpenBSD related information (www.openbsd.org)
pubmed -- Search medical/molbio databases (www.ncbi.nlm.nih.gov)
raging -- Search the web using Raging (www.raging.com)
rhyme -- Search for rhymes et al using Lycos Rhyme (rhyme.lycos.com)
scaleplus -- Search Australian Law using ScalePlus (scaleplus.law.gov.au)
slashdot -- Search stories on Slashdot (www.slashdot.org)
slinuxdoc -- Search entries in LDP (www.linuxdoc.org)
sourceforge -- Search SourceForge (www.sourceforge.net)
stockquote -- Get a single stock quote (multiple providers)
sundocs -- Search docs on Sun.com (docs.sun.com)
sunsolve -- Search public docs on Sunsolve (sunsolve.sun.com)
swhois -- Search Whois (www.geektools.com)
thesaurus -- Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
translate -- Translate human languages (various providers)
webster -- Look up word in Merriam-Webster's Dictionary (www.m-w.com)
wetandwild -- Real time weather information (many sources)
woffle -- Search the web using wwwoffle (localhost:8080)
xxx -- Superior XXX, hot and ready to press (arXiv.org)
yahoo -- Search Yahoo categories (www.yahoo.com)
W -- Activate Surfraw defined web-browser
alioth -- Search Alioth (alioth.debian.org)
altavista -- Search the web using Altavista (www.altavista.com)
amazon -- Search the amazon.com bookstore
appwatch -- Search entries on Appwatch (www.appwatch.com)
ask -- Question the web using Ask Jeeves (www.ask.com)
austlii -- Search Australian Law docs (www.austlii.edu.au)
bbcnews -- Search BBC News (news.bbc.co.uk)
britannica -- Look up word in Encyclopedia Britannica (www.britannica.com)
cddb -- Search for cd track listings in CDDB (www.gracenote.com)
cite -- Search computer science papers (www.researchindex.com)
cnn -- Search on CNN (cnn.com)
currency -- Abuse the Universal Currency Converter (www.xe.net/ucc)
debbugs -- Search the debian BTS (bugs.debian.org)
debcontents -- Search contents of debian packages (packages.debian.org)
deblists -- Search debian mailing lists (lists.debian.org/search.html)
debpackages -- Search debian packages (packages.debian.org)
deja -- Search usenet using Google Groups (groups.google.com)
excite -- Search on Excite (www.excite.com)
fast -- Search the web using FAST Search (www.alltheweb.com)
filesearching -- Search files on filesearching (www.filesearching.com)
freebsd -- Search FreeBSD related information (www.freebsd.org)
freedb -- Search for cd track listings in FreeDB (www.freedb.org)
freshmeat -- Search Freshmeat (www.freshmeat.net)
ftpfind -- Search files on ftpfind (www.ftpfind.com)
ftpsearch -- Search files on ftpsearch (ftpsearch.lycos.com)
google -- Search the web using Google (www.google.com)
imdb -- Search the Internet Movie Database (www.imdb.com)
jake -- Search journal/databases in jake (jake.med.yale.edu)
netbsd -- Search NetBSD related information (www.netbsd.org)
openbsd -- Search OpenBSD related information (www.openbsd.org)
pubmed -- Search medical/molbio databases (www.ncbi.nlm.nih.gov)
raging -- Search the web using Raging (www.raging.com)
rhyme -- Search for rhymes et al using Lycos Rhyme (rhyme.lycos.com)
scaleplus -- Search Australian Law using ScalePlus (scaleplus.law.gov.au)
scpan -- Search the Comprehensive Perl Archive Network (search.cpan.org)
slashdot -- Search stories on Slashdot (www.slashdot.org)
slinuxdoc -- Search entries in LDP (www.linuxdoc.org)
sourceforge -- Search SourceForge (www.sourceforge.net)
stockquote -- Get a single stock quote (multiple providers)
sundocs -- Search docs on Sun.com (docs.sun.com)
sunsolve -- Search public docs on Sunsolve (sunsolve.sun.com)
swhois -- Search Whois (www.geektools.com)
thesaurus -- Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
translate -- Translate human languages (various providers)
webster -- Look up word in Merriam-Webster's Dictionary (www.m-w.com)
wetandwild -- Real time weather information (many sources)
woffle -- Search the web using Woffle (localhost:8080)
xxx -- Superior XXX, hot and ready to press (arXiv.org)
yahoo -- Search Yahoo categories (www.yahoo.com)
......@@ -246,8 +246,8 @@ w3_parse_option () {
w3_parse_args () {
w3_args=
SURFRAW_browser=none
SURFRAW_browser_args=none
def SURFRAW_browser none
def SURFRAW_browser_args none
do_help=0
mode=unknown
for arg in "$@"; do
......@@ -257,7 +257,7 @@ w3_parse_args () {
if ok SURFRAW_graphical && test -n "$DISPLAY"; then
SURFRAW_browser=$SURFRAW_graphical_browser
SURFRAW_browser_args=$SURFRAW_graphical_browser_args
mode=graphics
mode=graphical
else
SURFRAW_browser=$SURFRAW_text_browser
SURFRAW_browser_args=$SURFRAW_text_browser_args
......@@ -283,7 +283,7 @@ w3_browse_url () {
$SURFRAW_screen $SURFRAW_browser $SURFRAW_browser_args "$@"
fi
else
if ok SURFRAW_graphical_remote && test mode = graphical; then
if ok SURFRAW_graphical_remote && test $mode = graphical; then
if ok SURFRAW_new_window; then
newwin=", new-window"
else
......
......@@ -40,7 +40,7 @@ Summary: Shell Users Revolutionary Front Rage Against the Web
$ ask why is jeeves gay?
$ google -results=100 RMS, GNU, which is sinner, which is sin?
$ austlii -method=phrase dog like
$ ryhme -method=perfect Julian
$ rhyme -method=perfect Julian
@configure_input@
%prep
%setup -n %{name}-%{version}
......