https://github.com/sheepla/fzwiki
🚀 A command line tool with fzf-like UI to search Wikipedia articles and open it in your browser quickly
https://github.com/sheepla/fzwiki
fuzzy-finder go go-cli wikipedia wikipedia-api
Last synced: 3 months ago
JSON representation
🚀 A command line tool with fzf-like UI to search Wikipedia articles and open it in your browser quickly
- Host: GitHub
- URL: https://github.com/sheepla/fzwiki
- Owner: sheepla
- License: mit
- Created: 2021-12-31T05:06:39.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2022-06-10T12:16:00.000Z (over 2 years ago)
- Last Synced: 2024-10-30T14:42:57.959Z (4 months ago)
- Topics: fuzzy-finder, go, go-cli, wikipedia, wikipedia-api
- Language: Go
- Homepage:
- Size: 46.9 KB
- Stars: 83
- Watchers: 2
- Forks: 5
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README


fzwiki
A command line tool with fzf-like UI to search Wikipedia articles and open it in your browser quickly.

![]()
## Usage
1. Run the command by specifying a search query.
2. Press the `` key to select item(s), then press `` key to confirm the selection.
3. The pages URL of the selected items will output. If you specify the `-o`, `--open` flag, it will open the page in your default browser.### Help message
```
fzwiki [OPTIONS] QUERY...Application Options:
-V, --version Show version
-o, --open Open URL in your web browser
-l, --lang= Language for wikipedia.org such as "en", "ja", ...Help Options:
-h, --help Show this help message
```### Key bindings
|Key |Description |
|-----------------|----------------------|
|type some text |narrow down candidates|
|`` / ``|move focus down |
|`` / ``|move focus up |
|`` |select the item |
|`` |confirm the selection |## Installation
### Build from source
```bash
git clone https://github.com/sheepla/fzwiki.git
cd fzwiki
go install
```### Download executable binary
You can download executable binaries from the release page.
> [Latest Release](https://github.com/sheepla/fzwiki/releases/latest)
### Use GitHub release installer tools
These tools make it easy to install executable binaries from GitHub Release.
with [ghg](https://github.com/Songmu/ghg):
```bash
ghg get sheepla/fzwiki # Install
ls -l $(ghg bin)/fzwiki # It will exists executable
```with [relma](https://github.com/jiro4989/relma):
Copy download link URL from [Latest Release](https://github.com/sheepla/fzwiki/releases/latest) page, then run below.
```bash
relma init # Setup
relma install {{DOWNLOAD_LINK_URL}} # Install
ls -l $(ghg bin)/fzwiki # It will exists executable
```with [gh-install](https://github.com/redraw/gh-install)
```bash
gh install sheepla/fzwiki # Install
ls -l ~/.local/bin/fzwiki # It will exists executable
```## Configuration
To change the default language for Wikipedia, set a value in the environment variable `FZWIKI_LANG` .
```bash
FZWIKI_LANG="ja" fzwiki ... # --> search from ja.wikipedia.org instead of en.wikipedia.org
```To make the setting persistent, add the following line to your rc file of the shell.
- **bash** (`~/.bashrc`) or **zsh** (`~/.zshrc`):
```bash
export FZWIKI_LANG="ja"
```- **fish** (`~/.config/fish/config.fish`):
```fish
set -Ux FZWIKI_LANG ja
```## LICENSE
[MIT](./LICENSE)
## Contributing
Welcome! 💕
## Author
[Sheepla](https://github.com/sheepla)