https://github.com/localjo/encyclopedia-cli
An application that allows reading MediaWiki sources from the command line
https://github.com/localjo/encyclopedia-cli
Last synced: 9 months ago
JSON representation
An application that allows reading MediaWiki sources from the command line
- Host: GitHub
- URL: https://github.com/localjo/encyclopedia-cli
- Owner: localjo
- Created: 2019-09-25T22:18:03.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-11-10T12:39:03.000Z (over 6 years ago)
- Last Synced: 2025-06-27T10:06:54.105Z (12 months ago)
- Language: JavaScript
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# encyclopedia-cli
> A demo application that allows reading a MediaWiki encyclopedia from the command line
## Install
Unzip or clone the repo, then, from the project's root directory, run:
```
npm install
```
Before running the app, you must set which MediaWiki domain to use as your encyclopedia source. For example;
```bash
export ENCYCLOPEDIA_DOMAIN=wikipedia.org
```
## Usage
Start the interactive CLI with:
```
node index.js --language en
```
The language parameter is optional. You can replace `en` with the language code for any existing encyclopedia language
(e.g. `fr`, `es`, `de`, etc).
## Commands
Once you've started the app, you can type the following commands:
### `READ `
Show article text. Press `q` to stop reading an article.
The `` parameter is a string. If it includes spaces,
you must enclose it in double quotes, e.g. `READ "Santa Claus"`.
### `QUIT`
Exit the application.
### `HELP`
Print the available commands with a short description.
## Tests
This app includes unit tests that can be run with `npm test`.