· 6 years ago · Sep 30, 2019, 02:08 PM
1 Surfraw - Shell Users' Revolutionary Front Rage Against the Web
2
3Home Page: https://gitlab.com/surfraw/Surfraw
4
5 ______ _ _ ______ _______ ______ _______ _ _ _
6 / _____)(_) (_)(_____ \ (_______)(_____ \ (_______)(_)(_)(_)
7 ( (____ _ _ _____) ) _____ _____) ) _______ _ _ _
8 \____ \ | | | || __ / | ___) | __ / | ___ || || || |
9 _____) )| |___| || | \ \ | | | | \ \ | | | || || || |
10 (______/ \_____/ |_| |_||_| |_| |_||_| |_| \_____/
11
12 Surfraw - Shell Users' Revolutionary Front Rage Against the Web
13 New: https://gitlab.com/surfraw/Surfraw
14 Old: http://surfraw.alioth.debian.org
15
16 Oh Baybe
17 I need some
18 Deep Linking
19 Let us go
20 Surfin' in the raw!
21
22 Surfraw provides a fast unix command line interface to a variety of
23 popular WWW search engines and other artifacts of power. It reclaims
24 google, altavista, babelfish, dejanews, freshmeat, research index,
25 slashdot and many others from the false-prophet, pox-infested heathen
26 lands of html-forms, placing these wonders where they belong, deep in
27 unix heartland, as god loving extensions to the shell.
28
29 Surfraw abstracts the browser away from input. Doing so lets it get on
30 with what it's good at. Browsing. Interpretation of linguistic forms
31 is handed back to the shell, which is what it, and human beings are
32 good at. Combined with netscape-remote or incremental text browsers,
33 such as links (http://artax.karlin.mff.cuni.cz/~mikulas/links/), w3m
34 (http://www.w3m.org/), and screen(1) a Surfraw liberateur is capable
35 of navigating speeds that leave GUI tainted idolaters agape with fear
36 and wonder.
37
38 Surfraw consists of a collection of elvi, each of which knows how
39 to search a specific web site.
40 To see the list of elvi type:
41
42 surfraw -elvi
43
44 Note that sr is an alias for surfraw, so that could equally be
45
46 sr -elvi
47
48 To search using an elvis use:
49
50 sr elviname [options] search terms..
51
52 For example, to search google for information on Debian ports,
53 using the "I'm feeling lucky" option:
54
55 sr google -l debian ports
56
57 Note that putting quotes round arguments works now, so you can do,
58 for example:
59
60 sr google foo "bar baz" bam
61
62 and the quoting is passed on to the search engine.
63
64ADDING THE ELVI TO YOUR PATH
65
66 If you are a regular user of surfraw, you will probably get sick
67 of typing sr or surfraw each time. You can regain the old
68 behaviour of running the elvi directly by adding the elvi
69 directory (usually /usr/lib/surfraw or /usr/local/lib/surfraw/) to
70 your path, either manually or using surfraw-update-path(1).
71
72CONFIG FILES
73
74 Surfraw implements the XDG basedir spec
75 (http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html)
76
77 Essentially this means global config will be in /etc/xdg/surfraw/
78 and local config will be in $HOME/.config/surfraw/.
79 This can be modified by setting $XDG_CONFIG_DIRS and $XDG_CONFIG_HOME,
80 see the spec for more details.
81
82 If your system has a different sysconfdir set during configure, that
83 will be used instead of /etc (for instance, /usr/local/etc).
84
85 In the documentation below, only the default paths will be referred to.
86
87LOCAL ELVI
88
89 Surfraw can use your own private elvi, store them in
90 $HOME/.config/surfraw/elvi/.
91
92 Local elvi will be listed separately at the end of
93 'surfraw -elvi'.
94
95 Use existing elvi (e.g. google) as a template. If you think your
96 elvi may be useful to others, consider submitting them to
97 surfraw-devel@lists.alioth.debian.org.
98
99BOOKMARKS
100
101 Surfraw now supports bookmarks. To add a bookmark, add it to to the
102 global bookmark list in /etc/xdg/surfraw/bookmarks or to your
103 personal bookmark list in $HOME/.config/surfraw/bookmarks
104
105 The format of the bookmarks file is simple, each bookmark is on a
106 separate line, with the bookmark and URL separated by whitespace,
107 eg:
108
109 ntk http://www.ntk.net/
110
111 To invoke a bookmark, use "surfraw bookmark" or "sr bookmark",
112 and if an elvis of that name doesn't exist, it searches for a
113 bookmark of that name instead.
114
115 There are some example bookmarks in /etc/xdg/surfraw/bookmarks
116
117CUSTOM SEARCH
118
119Several elvi use a search engine with site: and inurl: keywords.
120The search engine used can be customized by setting
121the environment variable SURFRAW_customsearch_provider
122or using the command-line argument -customsearch=
123Currently google and duckduckgo are supported
124
125Examples:
126
127SURFRAW_customsearch_provider=duckduckgo sr mysqldoc -v=5.5 select
128sr pgdoc -customsearch=google -v=9.1 select
129
130The default is to use duckduckgo.
131
132Currently affected elvi:
133
134mdn mysqldoc netbsd openbsd pgdoc slinuxdoc
135
136INSTALLATION
137
138 Surfraw is installed with the standard ./configure; make; make install
139 procedure. See INSTALL for more details. If you obtained surfraw
140 direct from the git repository rather than a release tarball, run
141 ./prebuild to generate the autotools build files *before* running
142 ./configure.
143
144 Note that the opensearch elvis depends on the perl libraries
145 WWW::OpenSearch, HTML::Parser and LWP (libwww-perl). If you don't
146 want to install opensearch, use ./configure --disable-opensearch.
147
148 Surfraw supports the following options to ./configure:
149
150 --with-text-browser=BROWSER Use BROWSER as text-mode browser
151 --with-graphical-browser=BROWSER Use BROWSER as graphical-mode browser
152 --with-elvidir=DIR Use DIR as location for storing elvi
153 --disable-opensearch Disable OpenSearch support
154 --disable-sr Disable installing sr alias
155
156 By default, the text and graphical browsers are detected from a
157 list of installed browsers at configure time. elvidir defaults
158 to $(libdir)/surfraw (probably /usr/local/lib/surfraw).
159
160EXAMPLES
161
162 $ surfraw google -results=100 RMS, GNU, which is sinner, which is sin?
163 $ sr wikipedia surfraw
164 $ sr austlii -method=phrase dog like
165 $ /usr/lib/surfraw/stack -u -s=vote shell
166OPTIONS
167
168 Global options are common to all Surfraw elvi (clients). You can
169 get a list of the currently installed elvi by just typing `surfraw -elvi'.
170 For example:
171
172 $ surfraw -elvi
173 GLOBAL ELVI:
174W -- Activate Surfraw defined web-browser
175acronym -- Look for acronyms definitions (www.acronymfinder.com)
176ads -- Search SAO/NASA Astrophysics Data System
177alioth -- Search Alioth (alioth.debian.org)
178amazon -- Search the amazon.com bookstore
179archpkg -- Search Arch Linux Packages (www.archlinux.org/packages/)
180archwiki -- Search the Arch Linux Wiki
181arxiv -- Search arXiv E-Print Archive for articles
182ask -- Question the web using Ask Jeeves (www.ask.com)
183aur -- Search aur.archlinux.org for PKGBUILDs
184austlii -- Search Australian Law docs (www.austlii.edu.au)
185bbcnews -- Search BBC News (news.bbc.co.uk)
186bing -- Search the web using Microsoft's Bing (www.bing.com)
187bookfinder -- Search for books using www.bookfinder.com
188bugmenot -- Bypass compulsory web registration with bugmenot.com
189bugzilla -- Search for bugs on Bugzilla bugtrackers
190cia -- Search CIA documents at www.cia.gov
191cisco -- Search Cisco documentation (www.cisco.com)
192cite -- Search computer science papers (citeseerx.ist.psu.edu)
193cliki -- Search the common lisp wiki
194cnn -- Search on CNN (cnn.com)
195comlaw -- Search Australian Law using Comlaw (www.comlaw.gov.au)
196commandlinefu -- Search on www.commandlinefu.com
197ctan -- Search the Comprehensive TeX Archive Network (ctan.org)
198currency -- Convert currencies with the Universal Currency Converter (www.xe.net/ucc)
199cve -- Search for CAN assignments in CVE
200debbugs -- Search the debian BTS (bugs.debian.org)
201debcodesearch -- Search debian source code
202debcontents -- Search contents of debian/ubuntu packages (packages.debian.org/packages.ubuntu.com)
203deblists -- Search debian mailing lists (lists.debian.org/search.html)
204deblogs -- Show changelogs for a package in Debian main (changelogs.debian.net)
205debpackages -- Search debian/ubuntu packages (packages.debian.org/packages.ubuntu.com)
206debpkghome -- Visit the home page for a Debian package
207debpts -- Search the Debian Package Tracking System (packages.qa.debian.org)
208debsec -- Search the Debian Security Tracker for CVE ids or package names
209debvcsbrowse -- Browse the VCS repository for a Debian package
210debwiki -- Search the Debian Wikis (wiki.debian.org & women.debian.org/wiki)
211deja -- Search usenet using Google Groups (groups.google.com)
212discogs -- Search the Discogs database of music information (www.discogs.com)
213dockerhub -- Search for Docker images (https://hub.docker.com)
214duckduckgo -- Securely search the web using duckduckgo (www.duckduckgo.com)
215ebay -- Search the Ebay auction site
216etym -- Look up word origins at www.etymonline.com
217excite -- Search on Excite (www.excite.com)
218f5 -- Search F5 related information (www.f5.com)
219finkpkg -- Search Fink packages (pdb.finkproject.org)
220foldoc -- The Free On-Line Dictionary Of Computing (foldoc.org)
221freebsd -- Search FreeBSD related information (www.freebsd.org)
222freedb -- Search for cd track listings in FreeDB (www.freedb.org)
223freshmeat -- Search Freshmeat (www.freshmeat.net)
224fsfdir -- Search the FSF/UNESCO Free Software Directory (directory.fsf.org)
225gcache -- Search the web using Google cache (www.google.com)
226genbugs -- Search the Gentoo bug tracker (bugs.gentoo.org)
227genportage -- Search gentoo-portage.com for packages
228github -- Search GitHub (https://github.com)
229gmane -- Search mailing list with gmane (gmane.org)
230google -- Search the web using Google (www.google.com)
231gutenberg -- Search for books on Project Gutenberg (gutenberg.org)
232imdb -- Search the Internet Movie Database (www.imdb.com)
233ixquick -- Search the web using ixquick [HTTPS] (www.ixquick.com)
234jamendo -- Search Jamendo: free music with Creative Commons licenses (www.jamendo.com)
235javasun -- Search Java API docs (java.sun.com)
236jquery -- Search the jQuery documentation (api.jquery.com)
237l1sp -- Search lisp documentation
238lastfm -- Search last.fm
239leodict -- Search Leo's German <-> English dictionary (dict.leo.org)
240lsm -- Search the Linux Software Map
241macports -- Search macports packages (macports.org)
242mathworld -- Search Wolfram MathWorld
243mdn -- Search the mozilla developer network (developer.mozilla.org)
244mininova -- Search the mininova bittorent source.
245musicbrainz -- Search MusicBrainz (musicbrainz.org)
246mysqldoc -- Search mysql documentation (dev.mysql.com)
247netbsd -- Search NetBSD related information (www.netbsd.org)
248nlab -- Search the nLab wiki (http://ncatlab.org)
249ntrs -- Search the NASA Technical Report Server
250openbsd -- Search OpenBSD related information (www.openbsd.org)
251oraclesearch -- Search an OpenSearch-enabled website
252pgdoc -- Search postgres documentation (www.pgdoc.com)
253pgpkeys -- Search the PGP key database
254phpdoc -- Search php documentation (php.net)
255pin -- Search Pinboard bookmarks (http://pinboard.in)
256piratebay -- Search The Pirate Bay (http://thepiratebay.org)
257priberam -- Look up word in Priberam online dictionary (www.priberam.pt/dlpo)
258pubmed -- Search medical/molbio databases (www.ncbi.nlm.nih.gov)
259rae -- Busca en el diccionario de la Real Academia de la Lengua Española (Spanish Dictionary)
260rfc -- Search RFCs (internet standards documents)
261scholar -- Search Google Scholar (scholar.google.com)
262scpan -- Search the Comprehensive Perl Archive Network (search.cpan.org)
263searx -- Search using searx metasearch engine instances (searx.me)
264slashdot -- Search stories on Slashdot (www.slashdot.org)
265slinuxdoc -- Search entries in LDP (www.linuxdoc.org)
266sourceforge -- Search SourceForge (www.sourceforge.net)
267springer -- Search Springer for Books and Articles
268stack -- Search Stack Overflow
269stockquote -- Get a single stock quote (multiple providers)
270thesaurus -- Look up word in Merriam-Webster's Thesaurus (www.m-w.com)
271translate -- Translate human languages
272urban -- Search urbandictionary.com for a definition
273w3css -- Validate a CSS URL with the w3c CSS validator (jigsaw.w3.org/css-validator)
274w3html -- Validate a web page URL with the w3c validator (validator.w3.org)
275w3link -- Check web page links with the w3c linkchecker (validator.w3.org/checklink)
276w3rdf -- Validate a RDF URL with the w3c RDF validator (validator.w3.org)
277wayback -- Search The Internet Archive's Wayback Machine for a URL (archive.org)
278webster -- Look up word in Merriam-Webster's Dictionary (www.m-w.com)
279wikipedia -- Search the free encyclopedia wikipedia
280wiktionary -- Search the free multilingual dictionary (wiktionary.org)
281woffle -- Search the web using Woffle (localhost:8080)
282wolfram -- Ask questions of the computational knowledge engine
283worldwidescience -- Search for science with www.worldwidescience.org
284yahoo -- Search Yahoo categories (www.yahoo.com)
285yandex -- Search the web using Yandex (yandex.ru)
286youtube -- Search YouTube (www.youtube.com)
287
288
289All elvi have useful low calorie help, for example:
290
291 sr bbcnews -help
292 Usage: bbcnews [options] [search words]...
293 Description:
294 Surfraw search BBC News (news.bbc.co.uk)
295 Local options:
296 -scope=world | uk Search world or uk news
297 Default: world
298 Environment: SURFRAW_bbcnews_scope
299
300 If you just want to see the elvi-specific help, use
301 elvi -lh or -local-help.
302
303 The system wide configuration file can usually be found in
304 /etc/xdg/surfraw/conf (but see 'Config files' above). This can be
305 overridden by setting the environment variable SURFRAW_global_conf.
306
307 Each user can also specify their own overrides, usually in
308 $HOME/.config/surfraw/conf (again, see 'Config files' above). This
309 can be overridden by setting SURFRAW_conf, either in the environment
310 or the global config file.
311
312 e.g
313
314 SURFRAW_graphical_remote=yes
315 SURFRAW_graphical_browser=mozilla
316 SURFRAW_text_browser=w3m
317 SURFRAW_pgpkeys_sigs=on
318
319INTEGRATION
320
321 There is a browser plugin for Pentadactyl (a vimperator fork) at
322 http://code.google.com/p/dactyl/issues/detail?id=320
323 For details, see:
324 http://lists.alioth.debian.org/pipermail/surfraw-devel/2011-April/000916.html
325
326 Code to integrate with uzbl is in
327 examples/uzbl_load_url_from_surfraw
328
329RADICALIZATION
330
331 Read HACKING. Surfrawize the soul of your favourite internet wonder.
332 Join the Shell Users' Revolutionary Front Against the WWW by
333 submitting code. Reclaim heathen lands. Bear witness to the
334 truth. Its love will set you free.
335
336 Join us on surfraw-devel@lists.alioth.debian.org
337 _________________________________________________________________
338
339README originally by Julian Assange
340Updated by Ian Beckwith
341 _________________________________________________________________
342
343See NEWS, and ChangeLog for a summary of changes.
344 _________________________________________________________________