Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/KorySchneider/wikit
Wikipedia summaries from the command line
https://github.com/KorySchneider/wikit
cli wiki wikipedia wikit
Last synced: 5 days ago
JSON representation
Wikipedia summaries from the command line
- Host: GitHub
- URL: https://github.com/KorySchneider/wikit
- Owner: KorySchneider
- License: mit
- Created: 2017-08-12T05:03:01.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2024-05-15T17:13:53.000Z (6 months ago)
- Last Synced: 2024-10-01T15:49:34.614Z (about 1 month ago)
- Topics: cli, wiki, wikipedia, wikit
- Language: JavaScript
- Homepage:
- Size: 188 KB
- Stars: 268
- Watchers: 7
- Forks: 17
- Open Issues: 4
-
Metadata Files:
- Readme: readme.md
- License: license
Awesome Lists containing this project
- awesome-starred - KorySchneider/wikit - Wikipedia summaries from the command line (cli)
README
# wikit
A command line program for getting Wikipedia summaries easily.
- [Installation](#installation)
- [Usage](#usage)
- [Examples](#examples)
- [Flags](#flags)
- [Output](#output)
- [Bugs & Suggestions](#bugs-and-suggestions)
- [Support Development - Buy Me A Coffee](#support-development)## Installation
`$ npm i wikit -g`
## Usage
Syntax: `$ wikit [-flags]`
Quotes are not required for multi-word queries.
To change the default language, edit `~/.config/configstore/wikit.json`.
### Examples
`$ wikit wikipedia`
`$ wikit empire state building`
`$ wikit linux -b`
`$ wikit jugo -l es --link -a`
### Flags
| Flag | Description |
| ---- | ----------- |
| `--lang langCode`
`-l langCode` | Specify language; `langCode` is an [HTML ISO language code](https://www.w3schools.com/tags/ref_language_codes.asp) |
| `--all`
`-a` | Print all sections of the article (the full page). Recommended to pipe into a reader e.g. `less` |
| `--line num` | Set line wrap length to `num` |
| `--link` | Print a link to the full article after the summary |
| `-b` | Open full Wikipedia article in default browser |
| `--browser browser` | Open full Wikipedia article in specific `browser` |
| `-d` | Open disambiguation CLI menu |
| `-D` | Open disambiguation page in browser |
| `--version`
`-v` | Print installed version number |
| `--name`
`-n` | Print the name of the program: wikit |### Output
The output will be the paragraphs of the wikipedia article before the table of contents.
Line length is neatly wrapped based on your terminal's window size, with a max
of about 80 characters. For example:```
$ wikit arch linux
Arch Linux (or Arch /ˈɑːrtʃ/) is a Linux distribution for computers based on x86-64
architectures. Arch Linux is composed predominantly of free and open-source software,
and supports community involvement. The design approach of the development team
follows the KISS principle ("keep it simple, stupid") as the general guideline,
and focuses on elegance, code correctness, minimalism and simplicity, and expects
the user to be willing to make some effort to understand the system's operation.
A package manager written specifically for Arch Linux, pacman, is used to install,
remove and update software packages. Arch Linux uses a rolling release model, such
that a regular system update is all that is needed to obtain the latest Arch software;
the installation images released by the Arch team are simply up-to-date snapshots
of the main system components. Arch Linux has comprehensive documentation in the
form of a community wiki, called the ArchWiki. The wiki is widely regarded among
the Linux community and ecosystem for often having the most recent information on
a specific topic and being applicable beyond Arch Linux.
```## Bugs and Suggestions
Please create an issue
[here](https://github.com/koryschneider/wikit/issues/new). Thanks!