Package: surfraw
Version: 2.0.2-1
Severity: wishlist
Tags: patch

Attached are four simple optionless elvi that I've found useful.
Use/modify/discard as convenient.

cia
        This could perhaps also have options like -worldfactbook,
        but the basic version does all I ever need.

deblogs
        See note below on bash-completion.

etym
        This may be something only I would ever use...
         
foldoc
        I was surprised there wasn't one for this already.
                  
The deblogs elvis can be added to the "packagename" list in my old
bash-completion script (sorry about the ">&-", guys!).  Strictly
speaking this is wrong - like debpts and perhaps others, it really
wants to complete on source-package names such as xfree86 rather 
than binary-package names such as xserver-common... but I can't find
any way of getting a list of Debian source-package names to complete
on.

Here's a free bonus piece of drive-by wishlistery: it seems to me
that you'd be saved all the effort of maintaining an up-to-date
surfraw.elvi list if each elvis supported a standard "-about" option
which worked something like this:

        $ sr -about google
        Search the web using Google (www.google.com) - v1.2

Then "for x in $elvidir/*; do surfraw -about $x; done" (or perhaps
even just "sr -about $elvidir/*") would give you an automatic elvi
list...

-- System Information:
Debian Release: 3.1
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i586)
Kernel: Linux 2.6.9
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)

Versions of packages surfraw depends on:
ii  debconf                       1.4.30.11  Debian configuration management sy
ii  lynx [www-browser]            2.8.5-2    Text-mode WWW Browser
ii  mozilla-browser [www-browser] 2:1.7.3-5  The Mozilla Internet application s
ii  mozilla-firefox [www-browser] 1.0-4      lightweight web browser based on M
ii  w3m [www-browser]             0.5.1-1    WWW browsable pager with excellent
ii  xemacs21-nomule [www-browser] 21.4.16-1  Editor and kitchen sink -- Non-mul

-- debconf information:
* surfraw/surfraw-path:
  surfraw/surfraw-v2-upgrade:
-- 
JBR
Ankh kak! (Ancient Egyptian blessing)
#!/bin/sh
# jbr20050112
# elvis: cia            -- Search CIA documents at www.cia.gov
. surfraw || exit 1

# could have -worldfactbook etc, but I always use Entire Site

w3_usage_hook () {
    cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
  Search CIA documents at www.cia.gov
Example:
  cia WDM
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.cia.gov/";
else
    escaped_args=`w3_url_of_arg $w3_args`
    w3_browse_url 
"http://www.cia.gov/search?NS-collection=Entire+Site&NS-search-page=results&NS-query=${escaped_args}";
fi
#!/bin/sh
# jbr20050112
# elvis: deblogs        -- Show changelogs for a package in Debian main 
(changelogs.debian.net)

. surfraw || exit 1

w3_usage_hook () {
    cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
Show changelogs for a package in Debian main (changelogs.debian.net)
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://changelogs.debian.net/";
else
    escaped_args=`w3_url_of_arg $w3_args`
        w3_browse_url "http://changelogs.debian.net/${escaped_args}";
fi
#!/bin/sh
# jbr20050112
# elvis: etym           -- Look up word origins at www.etymonline.com
. surfraw || exit 1

w3_usage_hook () {
    cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
  Look up word origins at www.etymonline.com
Example:
  etym surf
  '1685, probably from earlier suffe (1599), of uncertain origin...'
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.etymonline.com/";
else
    escaped_args=`w3_url_of_arg $w3_args`
    w3_browse_url "http://www.etymonline.com/?search=${escaped_args}";
fi
#!/bin/sh
# jbr20050112
# elvis: foldoc -- The Free On-Line Dictionary Of Computing (foldoc.org)
. surfraw || exit 1

w3_usage_hook () {
    cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
  The Free On-Line Dictionary Of Computing (foldoc.org)
Example:
  foldoc pcmcia
  "Personal Computer Memory Card International Association(*).
   (Or People Can't Memorise Computer Industry Acronyms)."
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.foldoc.org/";
else
    escaped_args=`w3_url_of_arg $w3_args`
    w3_browse_url 
"http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=${escaped_args}&action=Search";
fi

Reply via email to