4 thoughts on “Search Wikipedia from Command Line

  1. Hi Binny. This is a really interesting idea, but I couldn’t get it to work, always getting only the error message:
    ;; connection timed out; no servers could be reached”

    Could it be the address is incorrect? How did you come up with the address:

  2. Thanks Binny.
    I’m not sure how it works, but it looks to me like the script that serves this has stopped. More can be read about it here:

    I have a rather clumsy substitute:
    lynx -dump ‘http://en.wikipedia.org/wiki/Special:Search/’ | head -n50

    Omitting the pipe to the head command (which, as I give it, only shows the first 50 lines) instead outputs the whole page as text. This has some advantages over the original server, which was limited to about 400 bytes, but unfortunately doesn’t display just the introductory paragraph, including all the navigation stuff as well.

    I could simply use wget with the same kind of link above to download the page and select out the introductory paragraph using sed or awk, but I’m supposed to be working. 🙂 So I’ll do it later and try to remember to post my results here.

  3. Wikit is a free and open source command line program for easily viewing Wikipedia summaries of search queries; it is built using Nodejs. The verb Wikit (derived from wikipedia it ) means looking up something on wikipedia.org, the popular and remarkable open source encyclopedia on the Internet.

Leave a Reply

Your email address will not be published. Required fields are marked *