

Surfraw - naner
http://surfraw.alioth.debian.org/

======
Bjoern
I found this article interesting to explain a bit more [1]. Then I was still
not happy and tried it myself. Basically it is a tool that lets you choose
what frontend you want to use e.g. w3m, lynx, firefox etc. and gives you
shortcuts to certain interesting pages [2] you might want to access on CLI.
That shortcut again has also a help page - very interesting for scripting.
It's sort of like the "dict" command but for all kind of webpages.

I played around...

surfraw -browser="dlynx" translate -from=fr -to=en la verite vous liberera |
head -50

> Will show the proper translation

surfraw -browser="dlynx" piratebay 2012 | egrep -i "\\.torrent" | head -1 |
sed 's/^[0-9. ]*//g' | xargs -iin wget in

> Will download a torrent file from piratebay

etc.

[1] <http://crazylazy.info/blog/content/scrapers-surfraw> [2]
<http://surfraw.alioth.debian.org/#elvilist>

------
limmeau
Interesting: Copyright (c) 2000-2001 Julian Assange <proff@iq.org>

(probably the Julian Assange of wikileaks fame)

~~~
tptacek
Unless there are two Julian Assanges that call themselves "proff", yes.

------
alanh
Anybody want to put this into plain English? (Why are the example usages void
of output?)

~~~
Bjoern
The output depends if you want to use e.g. w3m, lynx, firefox, etc. etc.

------
leif
I'd be happier with this if it would, for example, parse the google results
and just print them rather than opening a browser window.

Also, it seems to be broken with chrome.

------
res0nat0r
As with all of these cli based www search tools I just don't see how
learning/installing these is any quicker than: alt-j (I'm using wmii which is
pretty 'raw'), "<imdb|slashdot|freshmeat|define> keyword" from your firefox
google based homepage, cut/paste. I like to be minimal and love my
mutt/irssi/cplay/vim sessions all wrapped in screen, but google based keyword
searching via a firefox homepage seems hard to really beat in practicality.

~~~
mcav
Could be useful for scripting.

~~~
zzzzzzzzz
How so?

Afaict it just produces a url and hands it off to a browser of your choice.

For example, the piratebay example which Bjoern posted (which requires a
separate 'dlynx' script, btw):

surfraw -browser="dlynx" piratebay 2012 | whatever...

can be rewritten as:

lynx -dump <http://thepiratebay.org/search/2012> | whatever...

