1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398
|
.\" Hey, EMACS: -*- nroff -*-
.\" First parameter, NAME, should be all caps
.\" Second parameter, SECTION, should be 1-8, maybe w/ subsection
.\" other parameters are allowed: see man(7), man(1)
.TH SURFRAW 1 "Feb 03, 2004"
.\" Please adjust this date whenever revising the manpage.
.\"
.\" Some roff macros, for reference:
.\" .nh disable hyphenation
.\" .hy enable hyphenation
.\" .ad l left justify
.\" .ad b justify to both left and right margins
.\" .nf disable filling
.\" .fi enable filling
.\" .br insert line break
.\" .sp <n> insert n+1 empty lines
.\" for manpage-specific macros, see man(7)
.SH NAME
surfraw \- a fast unix command line interface to WWW services
.SH SYNOPSIS
.B surfraw
.I elviname [options] search words ...
.br
.B sr
.I elviname [options] search words ...
.br
.B sr \-elvi
.br
.B sr
.I [options] bookmark [search words]
.br
.SH DESCRIPTION
Surfraw provides a fast unix command line interface to a variety of
popular WWW search engines and other artifacts of power.
It reclaims google, altavista, dejanews, freshmeat, research index,
slashdot and many others from the false\(hyprophet, pox\(hyinfested heathen
lands of html\(hyforms, placing these wonders where they belong, deep in
unix heartland, as god loving extensions to the shell.
.PP
Surfraw consists of a collection of \fBelvi\fP, each of which knows how
to search a specific web site.
To see the list of elvi type:
surfraw \-elvi
Note that sr is an alias for surfraw, so that could equally be
sr \-elvi
To search using an elvis use:
sr elviname [options] search terms..
For example, to search google for information on Debian ports,
using the "I'm feeling lucky" option:
sr google \-l debian ports
.SS Adding the elvi to your path
If you are a regular user of surfraw, you will probably get sick
of typing sr or surfraw each time. You can regain the old
behaviour of running the elvi directly by adding the elvi
directory (\%@ELVIDIR@) to your path, either manually or using
\fB\%surfraw\-update\-path(1)\fP.
.SS Bookmarks
Surfraw supports bookmarks. To add a bookmark, add it to
\fB\%@sysconfdir@/xdg/surfraw/bookmarks\fP or
\fB\%$HOME/.config/surfraw/bookmarks\fP
The format of the bookmarks file is simple, each bookmark is on a
separate line, with the bookmark and URL separated by whitespace,
eg:
ntk http://www.ntk.net/
If the url contains the string \fB%s\fP, you can specify an
optional argument to the bookmark. Without an argument, only
the domain will be returned. With arguments, \fb%s\fP will
be replaced by the arguments. This obviates the need to
create elvi for sites with very simple search options.
To invoke a bookmark, use "surfraw bookmark" or "sr bookmark",
and if an elvis of that name doesn't exist, it searches for a
bookmark of that name instead.
There are some example bookmarks in \%@sysconfdir@/xdg/surfraw/bookmarks
.SH OPTIONS
Use \fB\%sr elviname \-local\-help\fP for elvi\(hyspecific options.
The following options work with all elvi.
.TP
.B \-help
Show summary of options (including elvi\(hyspecific options).
.TP
.B \-local-help
Show elvi\(hyspecific options.
.TP
.B \-version
Show version of program.
.TP
\fB\-browser=\fP\fIEXECUTABLE\fP
Set browser (default: sensible\-browser).
.TP
.B \-elvi
Display a list of other Surfraw mechanisms for conquering evil.
.TP
.B \-escape\-url\-args=yes|no
Apply url escaping to arguments (default: yes)
.TP
.B \-q|\-quote
Bracket all arguments with " characters (default: no).
Note that putting quotes round arguments works now, so you can do,
for example:
sr google foo "bar baz" bam
and the quoting is passed on to the search engine
.SH EXAMPLES
$ sr ask why is jeeves gay?
$ surfraw google \-results=100 RMS, GNU, which is sinner, which is sin?
$ sr austlii \-method=phrase dog like
$ @ELVIDIR@/rhyme \-method=perfect Julian
.SH CONFIGURATION
Surfraw uses the XDG basedir spec
(http://standards.freedesktop.org/basedir-spec/basedir-spec-0.6.html) to
locate config files. The default locations are shown below, but can be
modified by setting the environment variables
.B $XDG_CONFIG_HOME
and
.B $XDG_CONFIG_DIRS.
See the spec for more details.
Surfraw gets its configuration from three sources, in order:
.IP 1. 4
Environment variables
.IP 2.
\%@sysconfdir@/xdg/surfraw/conf
.IP 3.
\%$HOME/.config/surfraw/conf
.PP
@sysconfdir@/xdg/surfraw.conf and $HOME/.config/surfraw/conf are both fragments of
bourne\(hyshell style shell script.
@sysconfdir@/xdg/surfraw.conf should use def and defyn to define variables.
These functions set variables unless they are already set by the
environment.
defyn is used for boolean configuration variables, def for
all others. For instance:
def SURFRAW_text_browser /usr/bin/lynx
defyn SURFRAW_graphical no
$HOME/.config/surfraw/conf should use sh\(hystyle entries, eg:
SURFRAW_text_browser=/usr/bin/lynx
SURFRAW_graphical=no
This is because you want them to override environment variables
unconditionally.
.SH CONFIGURATION VARIABLES
.TP
.B SURFRAW_global_conf
Location of global configuration file.
Default:
def SURFRAW_global_conf @sysconfdir@/xdg/surfraw/conf
.TP
.B SURFRAW_conf
Location of per\(hyuser configuration file.
Default:
def SURFRAW_conf $HOME/.config/surfraw/conf
.TP
.B SURFRAW_graphical
Whether to use a graphical browser.
Default:
defyn SURFRAW_graphical no
.TP
.B SURFRAW_text_browser
Name/path of text browser executable.
e.g. links, lynx, w3m
Default:
def SURFRAW_text_browser sensible\-browser
.TP
.B SURFRAW_graphical_browser
Name/path of graphical browser executable.
e.g mozilla, netscape etc.
Default:
def SURFRAW_graphical_browser sensible\-browser
.TP
.B SURFRAW_text_browser_args
Text browser arguments, or "none".
Default:
def SURFRAW_text_browser_args none
.TP
.B SURFRAW_graphical_browser_args
Graphical browser arguments, or "none".
Default:
def SURFRAW_graphical_browser_args none
.TP
.B SURFRAW_graphical_remote
Whether to use "\fB\-remote openURL\fP" for graphical browser.
Default:
defyn SURFRAW_graphical_remote yes
.TP
.B SURFRAW_new_window
When using SURFRAW_graphical_remote, open a new window?
Default:
defyn SURFRAW_new_window no
.TP
.B SURFRAW_screen
Name of screen command to run.
Default:
def SURFRAW_screen screen
.TP
.B SURFRAW_new_screen
If surfraw is running under screen(1), start a new screen
for each text browser invocation?
Default:
defyn SURFRAW_new_screen no
.TP
.B SURFRAW_screen_args
Arguments to pass to the SURFRAW_screen command
Default:
def SURFRAW_screen_args ""
.TP
.B SURFRAW_quote_args
Whether to "quote" all the arguments.
Default:
defyn SURFRAW_quote_args no
.TP
.B SURFRAW_quote_ifs
Whether to re\(hyquote arguments if they have spaces in, ie so:
sr google foo "bar baz" bam
.br
works as expected.
Default:
defyn SURFRAW_quote_ifs yes
.TP
.B SURFRAW_results
Default number of results to return (not supported by all elvi).
Default:
def SURFRAW_results 30
.TP
.B SURFRAW_escape_url_args
Whether to escape [% "$%&+,/:;<=>?@[\^{|}~'] characters in command line arguments
subsequently used to construct a url.
Default:
defyn SURFRAW_escape_url_args yes
.SH FILES
.TP
.B @ELVIDIR@
Location of the elvi.
.TP
.B ${HOME}/.config/surfraw/elvi
Per\(hyuser elvi.
.TP
.B @sysconfdir@/xdg/surfraw/conf
Default system wide configuration file.
.TP
.B $HOME/.config/surfraw/conf
Default per\(hyuser config file
.TP
.B @sysconfdir@/xdg/surfraw/bookmarks
System wide bookmarks file.
.TP
.B $HOME/.config/surfraw/bookmarks
Per\(hyuser bookmarks file.
.SH BUGS
Please report any bugs found (or any web sites in need of surfrawizing)
either via the debian bug tracking system (\%http://bugs.debian.org/) or
to the surfraw\-devel list (\%surfraw\-devel@lists.alioth.debian.org).
.SH SEE ALSO
http://alioth.debian.org/projects/surfraw/
.SH PROPAGANDA
.ce 1000
Oh Baybe
I need some
Deep Linking
Let us go
Surfin' in the raw!
.ce 0
Read HACKING. Surfrawize the soul of your favourite internet wonder.
Join the \fBS\fPhell \fBU\fPsers' \fBR\fPevolutionary \fBFr\fPont
\fBA\fPgainst the WW\fBW\fP by submitting code.
Reclaim heathen lands.
Bear witness to the truth.
Its love will set you free.
Join us on surfraw\-devel@lists.alioth.debian.org
.SH AUTHORS
Originally written by Julian Assange.
Now maintained by the surfraw\-devel team
<\%surfraw\-devel@lists.alioth.debian.org>.
See the file AUTHORS for the full list of contributors.
Man page by Ian Beckwith, based on the original README and an earlier
man page by Christian Surchi.
.SH COPYRIGHT
Copyright (c) 2003-2018 The Surfraw\-Devel Team
<surfraw\-devel@lists.alioth.debian.org>
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
The copyright holders listed above assert no rights on this release
of the software ``surfraw'' and thereby explicity place this release into
the into the public domain. Do what you will.
|