Wikiman是手动页面,Arch Wiki,Gentoo Wiki和其他文档的离线搜索引擎。
Wikiman为浏览文档提供了简单的界面,而无需精确并连接到Internet。这是通过利用全文搜索Wiki,人物页面匹配的部分名称和描述来实现的,以及用于搜索结果的模糊过滤。
默认情况下,Wikiman仅搜索系统的手册页。按照以下说明启用可选来源。

从Arch Linux的额外存储库中安装:
pacman -S wikiman
# Optional: Enable Arch Wiki
pacman -S arch-wiki-docs如果您正在运行Manjaro或其他基于Arch的发行版,请从发行选项卡中下载最新的.pkg.tar.zst软件包,并按照以下说明添加Arch Wiki作为来源。
sudo pacman -U wikiman * .pkg.tar.zst从版本选项卡中下载最新的.deb软件包。
sudo apt update
sudo apt install ./wikiman * .deb从发布选项卡中下载最新的.RPM软件包。
# Fedora
sudo dnf install wikiman * .rpm
# openSUSE (skip signature verification)
sudo zypper in wikiman * .rpm从端口集合中安装TextProc/Wikiman:
portsnap auto
cd /usr/ports/textproc/wikiman
make install或从发布选项卡中下载最新的.txz软件包。
pkg install wikiman * .txz依赖项: man , fzf , ripgrep , awk , w3m , coreutils , parallel
# 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使用GNU find and awk ,因此BSD用户必须安装findutils和gawk 。
当前可用的可选资源是:
arch )gentoo )fbsd )tldr )由于它们的尺寸较大,Wikis不会与Wikiman捆绑在一起。如果要使用它们,可以使用以下命令下载其最新快照。
# 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安装后,如果sources配置变量为空,则应自动启用它们。
要验证主动来源,请运行:
wikiman -S在build/目录中,有用于手动快照汇编的脚本。这些脚本可以具有外部依赖性,不建议由最终用户,而是由Wikiman Mainters运行。您的里程可能会有所不同。
用法: wikiman [OPTION]... [KEYWORD]...
如果没有提供关键字,请显示所有页面。
-l搜索语言
默认值: en
-s用于使用的来源
默认值:(所有可用)
-f模糊的发现器要使用
默认值: FZF
-q启用快速搜索模式
-a启用和操作员模式
-p禁用快速结果预览
-k在查看结果后保持打开状态
-c显示源列
-H html页面的查看器
默认值: W3M
-R打印原始输出
-S列表可用来源和退出
-W打印指定外壳和退出的小部件代码
-v打印版本和退出
-h显示此帮助和退出
可以使用Shell键绑定来启动Wikiman(默认: Ctrl+F )。当前命令行缓冲区将用作搜索查询。
将适当的行从下面添加到您的.bashrc -like配置文件,以使键绑定永久性。
# bash
source /usr/share/wikiman/widgets/widget.bash
# fish
source /usr/share/wikiman/widgets/widget.fish
# zsh
source /usr/share/wikiman/widgets/widget.zsh用户配置文件位于~/.config/wikiman/wikiman.conf ,而后备全系统配置为/etc/wikiman.conf 。
如果已设置XDG_Config_home环境变量,则将从那里查找用户配置。
示例配置文件:
# 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要列出可用语言,请运行以下命令:
# 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 ' Wikiman设计为可扩展的:每个源都有其模块在sources/目录中。
源模块是符合POSIX的外壳脚本。 Wikiman调用其search功能,该功能读取$query和配置变量,并将结果打印为stdout 。以行格式为NAMEtLANGtSOURCEtPATH变量。
NAMELANG两个字母语言代码(可以包括语言环境)SOURCE名称PATH列出可用来源时,Wikiman将调用模块的info funcion,该信息将打印名称,状态,页数和源路径。
如果创建对公众有用的源模块,请使用拉动请求分享。您的拉请求应包含:
sources/your-source.shyour-sourceyour-source-TIMESTAMP.tar.xzbuild/your-source.sh构建脚本欢迎其他改进!