A small script to show Zeal (https://zealdocs.org/) pages in terminal -- in the Lynx web browser.
- python3 with argparse, xdg==5.1.1, sqlite3, pathlib and BeautifulSoup (bs4)
- Zeal (install the desired documentation sets from its GUI)
- Lynx web browser
- Make it executable
chmod +x ./zeal-cli
- Copy the script to the /usr/local/bin/
- Maybe add an alias as
alias zeal-cli="python3.10 zeal-cli"
if you want it to be run by a specific version of python - To show a list of all available pages in a docset:
zeal-cli DOCSET_NAME
- To show a particular page in a docset:
zeal-cli DOCSET_NAME PAGE
See the documentation in the zeal-cli
file for more.
If you want to fuzzy search for documentation from shell, you can use FZF (https://github.com/junegunn/fzf/) with zeal-cli in a manner similar to this (though you should probably write a proper function that handles cancelling FZF):
zeal-cli cpp | fzf --height=50% --preview='zeal-cli --lynx-dump=true cpp {}' | xargs -d '\n' zeal-cli cpp
Copy zeal-cli
somewhere in your $PATH
and chmod +x
it.
When used in Neovim + Telescope:
GPL 2 or later