Sokajin-dahatsoratra
o Tonony tsara ny hoe "Linux"
o Logiciel Libre
o Loharano
o Boky, Magazine
o Linux & Industrie
o Madagasikara
o Tantaran'i Linux
o Distribution
o Hardware
o Software
o Office
o X-Window

Rohy samihafa
/
http://www.amul.mg/
http://www.linuxfr.org/
Software::Surfraw - fitadiavana eto @ tranok’ala

Mitovy sokajy
K3b: fanoratana CD/DVD
Konqueror: sftp / fish
Flash Player 7
Package Manager
Fonosan-tahiry

Nalefan'i Rado tamin'ny 13 juin 2004

Atao inona surfraw

Surfraw [1] dia andiana "script shell" izay afaka manontany "moteur de recherche" maro be ary mampiseho ny valin’izany @ "browser" "mode texte" (lynx [2], links [3], elinks [4], w3m [5]) na "mode graphique" ( konqueror [6], firefox [7], opera [8], ...sns...).

Fametrahana

Alaivo ny tahiry ao @ http://surfraw.sf.net na apetrao ny tahiry avy @ "distribution" ampiasaina.


./configure --prefix=/usr --sysconfidir=/etc
make
make install

Configuration

Anankiroa ny "fichier" izay tena lehibe:
-  /etc/surfraw.conf: notsongaina eto ambany ireo safidy lehibe dia ny anaran’ ireo "browser" izay hanehoana ny valin’ny fitadiavana


def   SURFRAW_global_conf       /etc/surfraw.conf

# secondary configuation file
def   SURFRAW_conf              $HOME/.surfraw.conf

# graphical browser? defaults to yes for meatminds. text browser # users can  work it out how to change it.
def   SURFRAW_graphical         no

# name/path of text browser executable
# e.g elinks, links, lynx, w3m
def   SURFRAW_text_browser      elinks

# name/path of browser executable
# e.g konqueror, mozilla, netscape etc
def   SURFRAW_graphical_browser konqueror

-  /etc/surfraw_elvi.list : misy ny lisitr’ireo "moteur de recherche"

Fampiasana azy

-  Lisitr’ireo "moteur de recherche":


[rado@linux ~]# 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)
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 Woffle (localhost:8080)
xxx             -- Superior XXX, hot and ready to press (arXiv.org)
yahoo           -- Search Yahoo categories (www.yahoo.com)

-  Rehefa hampiditra fitadiavana @ "moteur de recherche" izany dia ny anarany miampy ireo teny tadiavana sy safidy no ampidirina eo @ akora (shell).

oh: hitady ny valin’ny hoe "linuxmg konqueror" ao @ google.

  • hampiditra ny teny tadiavina


[rado@linux ~] google "linuxmg konqueror"

-  Ny "moteur de recherche" dia samy manana ny safidy azy manokana. Ny ahitana ireo safidy ireo dia ny fampidirana ny "—help". Ohatra mikasika ny fitadiavana .deb ao @ http://packages.debian.org.


[rado@linux ~] debpackages --help
Usage: debpackages [options] [search words]...
Description:
 Surfraw search debian packages (packages.debian.org)
Local options:
 -release=                     Specialized search on release
         all           |       all releases
         main          |       main release
         non-US        |       packages restricted in US
         contrib       |       contrib
         non-free      |       packages not meeting FSG
                               Default: all
                               Environment: SURFRAW_debian_release
 -distro=                      Specific distribution
         stable        |       Stable
         testing       |       Testing
         unstable      |       Unstable
                               Default: stable
                               Environment: SURFRAW_debian_distro
Global options:
 -browser=EXECUTABLE           Set browser
                               Default: elinks
 -elvi                         List Surfraw mechanims for conquering evil
 -escape-url-args=yes|no       Apply url escaping to arguments
                               Default: yes
                               Environment: SURFRAW_escape_url_args
 -g | -graphical               Get some windowed sin
                               Default: no
                               Environment: SURFRAW_graphical
 -p0rn=yes|no                  Yes, yes, harder, deeper, faster, oh baybe
                               Default: no
                               Environment: SURFRAW_p0rn
 -help                         What you're reading now, dude
 -quiet=yes|no                 I can't enjoy it with you talking all the time
                               Default: no
                               Environment: SURFRAW_quiet
 -new[=yes|no]                 Start in a new window
                               Default: no
                               Environment: SURFRAW_new_window
 -t | -text                    Back to the yellow brick road
 -q | -quote                   Quote arguments with " characters
                               Default: no
                               Environment: SURFRAW_quote_args
 -version                      Display Surfraw version (1.0.7)
Copyright:
 Copyright (c) 2000-2001 Julian Assange <proff@iq.org>
 Copyright (c) 2001 Australian Institute for Collaborative Research
 Copyright (c) 2000 Melbourne Institute for Advanced Study

Fampidirana fitadiavana vaovao

Ny fampidirana "moteur de recherche" izay tsy mbola ao anatin’ny surfraw dia misy dingana 2:
-  fijerena ny URL ny takila izay hanao fizahana

oh: http://linuxmg.org/recherche.php3?recherche=

-  fametrahana ny script ao @ $PATH (eto dia /usr/bin). Misy "fonction" 3 farafahakeliny, ao @ /usr/bin/surfraw , izay tsy maintsy ampiasaina:

  • w3_config
  • w3_parse_args
  • w3_url_of_arg

-  /usr/bin/linuxmg


#!/bin/sh

. surfraw || exit 1

w3_usage_hook () {
   cat <<EOF
Usage: $w3_argv0 [options] [search words]...
Description:
 Surfraw search articles in linuxmg.org
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://linuxmg.org/"
else
   escaped_args=`w3_url_of_arg $w3_args`
   w3_browse_url "http://linuxmg.org/recherche.php3?recherche=${escaped_args}"
fi

-  Fametrahana ny bit "x":


[rado@linux ~]chmod a+x /usr/bin/linuxmg

-  Fampiasana azy:

  • fitadiavana


[rado@linux ~]#linuxmg "konqueror"

-  Farany dia ampidirina ao @ lisitra /etc/surfraw_elvi.list ny anaran’ny "moteur" vaovao

Surfraw dia fampiasa matetika @ ny "serveur" na "firewall" linux/*BSD.

Atonta Atonta (dinika)  Omeo ny hevitrao
© 2004, linuxmg.org