Giter Site home page Giter Site logo

wped's Introduction

wped

screenshot

Wikipedia (and Wiktionary) client for the command line

Requirements

  • PHP with Curl
  • elinks

Installation

sudo apt-get install php-cli php-curl php-xml elinks
wget https://raw.githubusercontent.com/mevdschee/wped/master/wped.php -O wped
chmod 755 wped
sudo mv wped /usr/bin/wped
sudo ln -s /usr/bin/wped /usr/bin/wikt

Uninstallation

sudo rm /usr/bin/wped
sudo rm /usr/bin/wikt

Running

You can search Wikipedia using the following syntax:

wped [-f] [-l lang] [search]

And if you ran the last line of the installation (optional) you also have a Wiktionary command:

wikt [-f] [-l lang] [search]

If your search returns only a single result you may give the optional "-f" flag to retrieve the full Wikipedia/Wiktionary document of the first result. You can override the language with a two letter code (ISO 639-1) using the "-l" flag. If you do not enter a language, then the system locale is chosen by default.

wped's People

Contributors

mevdschee avatar

Stargazers

John Magdy Lotfy Kamel avatar eg avatar  avatar Normen Hansen avatar Jesse Y. Cho avatar Cassaundra avatar CodingBobby avatar geduardcatalindev avatar  avatar  avatar Inyong Hwang avatar Logan Speck avatar Christian W. avatar Vitaly Zdanevich avatar Jay Dixit avatar Varuna Singh avatar Lorenzo T. Flores avatar yozz avatar Mathieu Dombrock avatar Bram Pauwelyn avatar Chinggis Tenger avatar Max Pleaner avatar Justin Porterfield avatar Kai Charlton avatar Buzz Piersol avatar Amol Umrale avatar Angus H. avatar Phillip Smith avatar Rick Carlino avatar Javier Arce avatar Aitor García Rey avatar  avatar Sudheendra Chilappagari avatar Minh Tran avatar Rougin Gutib avatar Christopher Wilson avatar Mario Young avatar rm "rhz" avatar Dewa Widyakumara avatar

Watchers

James Cloos avatar  avatar Mathieu Dombrock avatar  avatar

Forkers

mrummuka fkobon

wped's Issues

PHP Fatal error (Raspian / Debian)

Hi guy(s) !

I were looking for a simple CLI Wikipedia client, and found yours. Running a Raspberry I'm getting an exception on any search. I'm a simple user but I'm putting some version info and error codes down below for your to see.

user@raspy / $ wped America
PHP Fatal error:  Call to undefined function curl_init() in /usr/bin/wped on line 41

user@raspy / $ php --version
PHP 5.4.45-0+deb7u8 (cli) (built: Mar 28 2017 05:41:27)
Copyright (c) 1997-2014 The PHP Group
Zend Engine v2.4.0, Copyright (c) 1998-2014 Zend Technologies

user@raspy / $ elinks --version
ELinks 0.12pre5
Built on Nov  7 2012 09:27:49

Features:
Standard, IPv6, gzip, bzip2, UTF-8, Periodic Saving, Viewer (Search
History, Timer, Marks), Cascading Style Sheets, Protocol
(Authentication, File, CGI, Finger, FSP, FTP, HTTP, URI rewrite, User
protocols), SSL (GnuTLS), MIME (Option system, Mailcap, Mimetypes
files), LED indicators, Bookmarks, Cookies, Form History, Global
History, Scripting (Perl), Goto URL History

Any idea what could be causing this?

Ideas about how to render page results?

Hey, wonderful little tool. Thanks for this!

This may be only tangentially related to your program, but might you know how to render the page results so as to enable links, page navigation and, possibly, syntax highlighting? I am using zsh, but am not quite sure how to go about achieving this.

I piped the output from wped to a text file and tried to display with syntax highlighting in vim, but the outcome is pretty unremarkable. Is the program output displayed in any standard format? Neither wikitext nor markdown appeared to work

Cheers.

unable to install dependencies

$ sudo apt-get install php-cli php-curl php-xml elinks
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package php-cli
E: Unable to locate package php-curl
E: Unable to locate package php-xml

Ubuntu 14.04

wped does not retrieve abstracts

When I install this in my Linux Mint machine, this does not retrieve the abstracts of wikipedia, only searched results. In an example, it retrieves the abstract. With an option "-f", this gets everything. But it is sometimes too long for my purpose. Why is this environment-dependence? In my opinion, this might stem from the recent structural change of wikipedia. It would be of great help if you could check about this. Thanks in advance.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.