Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Browse wikipedia in Terminal using lynx UNIX
I really like the DICT protocol dictionary-lookup client that comes with Fink to browse various geeky databases easily in Terminal. However, I wish there was also a wikipedia.org command line client. There´s already a hint here describing how to enter your query from the command line, but search results will still be displayed in a browser window.

I thought lynx, a text-only browser for the Terminal, may be my helping friend, so I modified the script from the previous hint to display search results in the terminal window:
#!/bin/bash
lynx http://en.wikipedia.org/wiki/Special:Search?search=$(echo $@ | sed 's/ /+/g')
Save this to a file -- I called mine wp somewhere in your command path (i.e. /usr/local/bin/), and make it executable by typing chmod 755 wp -- don´t forget to rehash. Now enter wp exploding whaleand read the result within the lynx screen in your terminal window.

[robg adds: If you don't have lynx installed, you can either use Fink to get it, or install it by going to OSXgnu.org, which is linked from the Apple site above. I actually prefer the links text browser, so I have that installed (via Fink as well). The script above works just as well if you substitute links for lynx.]
    •    
  • Currently 2.00 / 5
  You rated: 2 / 5 (5 votes cast)
 
[9,978 views]  

Browse wikipedia in Terminal using lynx | 2 comments | Create New Account
Click here to return to the 'Browse wikipedia in Terminal using lynx' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Collection of shell browsing scripts
Authored by: improbability on Feb 11, '05 11:34:25AM

It hasn't been updated recently but http://sourceforge.net/projects/surfraw/ provides shell access to popular web sites



[ Reply to This | # ]
DICT server
Authored by: gatorparrots on Feb 20, '05 11:02:35AM
If you would like your own DICT server running locally (instead of being required to have an Internet connection for DICT queries), I have packaged up the Java implementation, JDictd, into a Mac OS X-native installer. You can grab a copy from my site.

[ Reply to This | # ]