https://github.com/guypeer8/wiki-cli
:book: Search wikipedia through your command line.
https://github.com/guypeer8/wiki-cli
cli elixir elixir-lang escript wikipedia
Last synced: 7 months ago
JSON representation
:book: Search wikipedia through your command line.
- Host: GitHub
- URL: https://github.com/guypeer8/wiki-cli
- Owner: guypeer8
- Created: 2020-01-17T00:12:08.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-01-19T17:31:30.000Z (about 6 years ago)
- Last Synced: 2023-04-10T11:35:41.401Z (almost 3 years ago)
- Topics: cli, elixir, elixir-lang, escript, wikipedia
- Language: Elixir
- Homepage:
- Size: 6.22 MB
- Stars: 10
- Watchers: 2
- Forks: 2
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Wiki
```text
usage: wiki [term] [-hbltwc]
aliases:
[ -h, --help ], show current help message
[ -b, --briefs ], show brief description of first few matching results
[ -l, --links ], show [x] wikipedia links matching input term
[ -t, --text ], extract the text explaining the term
[ -w, --write ], write the term search result to an html file
[ -c, --locale ], the locale used to fetch the term from wikimedia
```
## Usage
```bash
wiki ww2 # [= wiki ww2 -b] returns short text explaining the term "ww2"
wiki "pearl jam" -l 3 # returns 3 wikipedia links related to the term "pearl jam"
wiki cleopatra -w # writes and html file named "cleopatra" inside a folder named "wikidocs" on the current directory
wiki "donald trump" -c fr -l 2 # returns 2 wikipedia links in french related to "donald trump"
wiki zeus -t # extracts & logs the text related to the term "zeus"
```
## Installation
If [available in Hex](https://hex.pm/docs/publish), the package can be installed
by adding `wiki` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:wiki, "~> 0.1.0"}
]
end
```
Documentation can be generated with [ExDoc](https://github.com/elixir-lang/ex_doc)
and published on [HexDocs](https://hexdocs.pm). Once published, the docs can
be found at [https://hexdocs.pm/wiki](https://hexdocs.pm/wiki).