All Projects β†’ filiparag β†’ Wikiman

filiparag / Wikiman

Licence: mit
Wikiman is an offline search engine for manual pages, Arch Wiki, Gentoo Wiki and other documentation.

Programming Languages

shell
77523 projects

Projects that are alternatives of or similar to Wikiman

Redux Offline Docs
Redux documentation in PDF, ePub and MOBI formats for offline reading.
Stars: ✭ 292 (+149.57%)
Mutual labels:  documentation, offline
Hads
πŸ“š Markdown superpowered documentation for Node.js
Stars: ✭ 147 (+25.64%)
Mutual labels:  documentation, offline
Dot Hugo Documentation Theme
Dot - Hugo Documentation Theme
Stars: ✭ 162 (+38.46%)
Mutual labels:  documentation, search-engine
Quark
Stay happy while offline | World's first offline search engine.
Stars: ✭ 561 (+379.49%)
Mutual labels:  search-engine, offline
Bootstrap4 Offline Docs
Bootstrap 4.4 offline documentation
Stars: ✭ 655 (+459.83%)
Mutual labels:  documentation, offline
Dash Docset Builder
Dash Docset Builder in PHP.
Stars: ✭ 54 (-53.85%)
Mutual labels:  documentation, offline
Devdocs
API Documentation Browser
Stars: ✭ 27,208 (+23154.7%)
Mutual labels:  documentation, offline
Zeal
Offline documentation browser inspired by Dash
Stars: ✭ 9,164 (+7732.48%)
Mutual labels:  documentation, offline
React Most Wanted
React starter kit with "Most Wanted" application features
Stars: ✭ 1,867 (+1495.73%)
Mutual labels:  offline
Hypertag
Knowledge Management for Humans using Machine Learning & Tags
Stars: ✭ 116 (-0.85%)
Mutual labels:  search-engine
Devportal
Steem Platform Developer Documentation.
Stars: ✭ 114 (-2.56%)
Mutual labels:  documentation
Docc
A starter documentation theme for Gridsome. Featuring instant search, great navigation and a dark mode!
Stars: ✭ 115 (-1.71%)
Mutual labels:  documentation
Xinahn Client
δΈ€δΈͺεΌ€ζΊοΌŒι«˜ιšη§οΌŒθ‡ͺ枢θ‡ͺη”¨ηš„θšεˆζœη΄’εΌ•ζ“Žγ€‚https://xinahn.com
Stars: ✭ 116 (-0.85%)
Mutual labels:  search-engine
Save For Offline
Android app for saving webpages for offline reading.
Stars: ✭ 114 (-2.56%)
Mutual labels:  offline
Openbsm
OpenBSM open audit implementation
Stars: ✭ 116 (-0.85%)
Mutual labels:  freebsd
Guide
Screwdriver.cd Documentation
Stars: ✭ 113 (-3.42%)
Mutual labels:  documentation
Catalog
Create living style guides using Markdown or React
Stars: ✭ 1,527 (+1205.13%)
Mutual labels:  documentation
Overview
🎈 Start here for current projects, how to get involved, and joining community calls, a resource for new and veteran members
Stars: ✭ 117 (+0%)
Mutual labels:  documentation
Mobile Sdk
CARTO Mobile SDK core project
Stars: ✭ 116 (-0.85%)
Mutual labels:  offline
Tinysearch
πŸ” Tiny, full-text search engine for static websites built with Rust and Wasm
Stars: ✭ 1,705 (+1357.26%)
Mutual labels:  search-engine

About

Wikiman is an offline search engine for manual pages, Arch Wiki, Gentoo Wiki and other documentation.

Wikiman provides an easy interface for browsing documentation without the need to be exact and connected to the internet. This is achieved by utilizing full text search for wikis, partial name and description matching for man pages, and fuzzy filtering for search results.

By default, Wikiman only searches system's manual pages. Follow these instructions to enable optional sources.

Demonstration

Demo

Installation

Arch Linux / Manjaro (AUR)

yay -Syu wikiman

# Optional: Enable Arch Wiki
yay -Syu arch-wiki-docs

If you are running Manjaro, package arch-wiki-docs is not in official repositories. Follow these instructions to download it.

Or download latest .pkg.tar.zst package from Releases tab.

sudo pacman -U wikiman*.pkg.tar.zst

Ubuntu / Debian

Download latest .deb package from Releases tab.

sudo apt update
sudo apt install ./wikiman*.deb

Fedora / openSUSE

Download latest .rpm package from Releases tab.

# Fedora
sudo dnf install wikiman*.rpm

# openSUSE (skip signature verification)
sudo zypper in wikiman*.rpm

FreeBSD

Install textproc/wikiman from the Ports Collection:

portsnap auto
cd /usr/ports/textproc/wikiman
make install

Or download latest .txz package from Releases tab.

pkg install wikiman*.txz

Manual installation for Linux and BSD

Dependencies: man, fzf, ripgrep, awk, w3m, coreutils

# Clone from GitHub
git clone 'https://github.com/filiparag/wikiman'
cd ./wikiman

# Switch to latest stable release (optional)
git checkout $(git describe --tags | cut -d'-' -f1)

# Available targets: all, core, widgets, completions, config, docs
make all

# Only for BSD users: install to /usr/local instead of /usr
make local

# Install Wikiman
sudo make install

Wikiman uses GNU find and awk, so BSD users have to install findutils and gawk.

Additional documentation sources

Due to their large size, wikis don't come bundled with Wikiman. If you want to use them, you can download their snapshots using following commands.

User source modules are located in ~/.config/wikiman/sources/, and system-wide sources are in /usr/share/wikiman/sources/. If there is a name collision, user modules have priority over system-wide sources.

Available optional sources are:

  • Arch Wiki (arch)
  • Gentoo Wiki (gentoo)
  • FreeBSD Documentation (fbsd)
  • TLDR Pages (tldr)
# Download latest Makefile
curl -L 'https://raw.githubusercontent.com/filiparag/wikiman/master/Makefile' -o 'wikiman-makefile'

# Example for Linux: install Arch Wiki
make -f ./wikiman-makefile source-arch
sudo make -f ./wikiman-makefile source-install
sudo make -f ./wikiman-makefile clean

# Example for BSD: install FreeBSD Documentation
make -f ./wikiman-makefile source-fbsd local
sudo make -f ./wikiman-makefile source-install
sudo make -f ./wikiman-makefile clean

After installation, they should be enabled automatically if sources configuration variable is empty.

To verify active sources, run:

wikiman -S

Compiling a snapshot (database build scripts)

In build/ directory there are scripts for manual snapshot compilation. These scripts can have external dependencies and are not recommended to be run by end users, but by Wikiman maintainers. Your mileage may vary.

Usage

Usage: wikiman [OPTION]... [KEYWORD]...

If no keywords are provided, show all pages.

Options:

  • -l search language(s)

    Default: en

  • -s sources to use

    Default: (all available)

  • -f fuzzy finder to use

    Default: fzf

  • -q enable quick search mode

  • -a enable AND operator mode

  • -p disable quick result preview

  • -k keep open after viewing a result

  • -c show source column

  • -H viewer for HTML pages

    Default: w3m

  • -R print raw output

  • -S list available sources and exit

  • -W print widget code for specified shell and exit

  • -v print version and exit

  • -h display this help and exit

Shell keybind widgets

Wikiman can be launched using a shell key binding (default: Ctrl+F). Current command line buffer will be used as a search query.

Add appropriate line from below to your .bashrc-like configuration file to make the key binding permanent.

# bash
source /usr/share/wikiman/widgets/widget.bash

# fish
source /usr/share/wikiman/widgets/widget.fish

# zsh
source /usr/share/wikiman/widgets/widget.zsh

Configuration

User configuration file is located at ~/.config/wikiman/wikiman.conf, and fallback system-wide configuration is /etc/wikiman.conf.

If you have set the XDG_CONFIG_HOME environment variable, user configuration will be looked up from there instead.

Example configuration file:

# Sources (if empty, use all available)
sources = man, arch

# Fuzzy finder
fuzzy_finder = sk

# Quick search mode (only by title)
quick_search = true

# Raw output (for developers)
raw_output = false

# Manpages language(s)
man_lang = en, pt

# Wiki language(s)
wiki_lang = zh-CN

# Show previews in TUI
tui_preview = false

# Keep open after viewing a result
tui_keep_open = true

# Show source column
tui_source_column = true

# Viewer for HTML pages
tui_html = xdg-open

To list available languages, run these commands:

# Man pages (excluding English)
find '/usr/share/man' -maxdepth 1 -type d -not -name 'man*' -printf '%P '

# Arch Wiki
find '/usr/share/doc/arch-wiki/html' -maxdepth 1 -type d -printf '%P '

# FreeBSD Documentation
find '/usr/share/doc/freebsd-docs' -maxdepth 1 -type d -printf '%P '

# TLDR Pages
find '/usr/share/doc/tldr-pages' -maxdepth 1 -type d -printf '%P '

Custom sources

Wikiman is designed to be extensible: each source has it's module in sources/ directory.

Source modules are POSIX compliant shell scripts. Wikiman calls their search function whichs reads $query and configuration variables, and prints results to STDOUT. variable with rows formatted as NAME\tLANG\tSOURCE\tPATH.

  • NAME title of the page
  • LANG two letter language code (can include locale)
  • SOURCE source name
  • PATH path to HTML file

When listing available sources, Wikiman will call module's info funcion which prints name, state, number of pages and path of the source.

Contributions

If you create a source module useful to the general public, please share it using a pull request. Your pull request should contain:

  • module script file sources/your-source.sh
  • Makefile recipe your-source
  • installable snapshot of the source database your-source-TIMESTAMP.tar.xz
  • build script for the database snapshot build/your-source.sh
  • short description in the pull request's body

Other improvements are also welcome!

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].