Skip to content

escrevebastante/tongue

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

About the project:

This is a local documentation search engine based on official documentation releases of multiple linux projects.

The idea is to make a local offline copy of all available documentation and after use grep to search for what you are looking for. Some sort of "offline documentation search engine running on CLI".

The tongue-update.sh script will take care of downloading the pages for you while tongue.sh will prompt you with what is needed to perform the search you want. Note that the search is performed through html and pdf files

Installation and usage:

1 - Download the tongue-update.sh and tongue.sh scripts
2 - Set execution permissions to both scripts: sudo chmod a+x tongue-update.sh ; sudo chmod a+x tongue.sh
You will also have to set your username for "GERRITUSER" variable on tongue-update script. Its also necessary to change variable "CALIBREPATH" on tongue script, pointing to a place in your machine where you keep pdf files
3 - Copy the scripts to /usr/bin with: sudo cp tongue-update.sh /usr/bin/tongue-update ; sudo cp tongue.sh /usr/bin/tongue
4 - By default, these files are saved in "$HOME/Downloads/tongue". You can change that also by editing the variable "DOCUMENTPATH" on tongue-update script. Once you have all set, run tongue-update command to download the documentation.
5 - After the download is done, run tongue to start searching. Run tongue -h for a list of options
6 - A list of html files will be displayed with the terms you searched for. These are paged with "less" command. Do Ctrl+Click on the links to open them in your webrowser. Once you find what you need, open the page you downloaded with your browser (i suggest using w3m if you want to open that from the terminal
7 - Enjoy

Option list:

-a, --calibre = Search on Calibre library
-b, --rabbitmq = Search on rabbitmq official documentation
-c, --ceph = Search on Ceph official documentation
-d, --docker-enterprise = Search on docker enterprise documentation
-e, --openstack = Search on openstack official documentation
-f, --prometheus = Search on prometheus documentation
-h, --help = Display a list of options to chose from
-i, --case-sensitive = Searches are case sensitive.
-j, --calico = Search on Calico documentation
-k, --kubernetes = Search on kubernetes official documentation
-l, --list = Display a list of documentations that you can select
-m, --mirantis = Search on mirantis documentation
-n, --kernel = Search on kernel official documentation
-o, --helm = Search on helm official documentation
-p, --mariadb = Search on mariadb documentation
-q, --tungsten = Search on Tungsten Fabric documentation
-s, --search = Search string. If you are searching for more then one word, put all into quotes ''
-t, --cloud-init = Search on cloud-init documentation
-u, --ubuntu = Search on ubuntu official documentation
-y, --systemd = Search on systemd official documentation

Practical examples:

Search for multiple e-books/authors:

tongue -a '*Sebastian*' -s 'system wide trusted certificate'

Search only on ubuntu 16.x documentation pages:

tongue -u '*16*' -s 'system wide trusted certificate'

Search for nova on all openstack documentation:

tongue -e '*' -s 'nova'

Search for 'ocfs2' or 'nfs' on systemd documentation:

tongue -y '*' -s ocfs2|nfs<br>

About

An offline documentation search engine running on CLI

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages