The hadith
cli contains the English translations taken from sunnah.com of the main 6 books of hadith;
-
Sahih Al-Bukhari (Consists of 97 sections)
-
Sahih Muslim (Consists of 56 sections)
-
Sunan an-Nasai (Consists of 51 sections)
-
Sunan Abu-Dawud (Consists of 43 sections)
-
Jami at-Tirmidhi (Consists of 49 sections)
-
Sunan Ibn Majah (Consists of 37 sections)
Here's a basic structure overview of the main-hadith.txt file
Sahih Al-Bukhari
|
| |------- Book 1 of Sahih Al-Bukhari
| |------ Chapter 1 from Book 1 of Sahih Al-Bukhari
| |------- Hadith 1 from chapter 1
|
Sahih Muslim
|
| |------- Book 1 of Sahih Muslim
| |------ Chapter 1 from Book 1 of Sahih Muslim
| |------- Hadith 1 from chapter 1
|
Sunan an-Nasai
|
| |------- Book 1 of Sunan an-Nasai
| |------ Chapter 1 from Book 1 of Sunan an-Nasai
| |------- Hadith 1 from chapter 1
---snip---
The usage is pretty basic and straightforward;
Usage
-l or --list Print out entire index of hadith's"
-s or --search Search for a keyword"
-h or --hadith Prints out specific section of hadith"
-b or --book Prints out an entire book section"
-H or --Hadith Print out an entire hadith"
-eg or --example Print out list of examples"
The Examples are also pretty straightforward;
Examples
hadith -s 'bird' Will print all the hadiths containing phrase 'bird'"
hadith -h 'bukhari 5' Will print out Sahih al-Bukhari 4th section"
hadith -b 'bukhari 5' Will print out the 5th book from Bukhari hadith"
hadith -H 'bukhari' Will print out the entire Bukhari hadith"
-
Linux/Gnu Environment, could potentially run on Unix Environments too
-
Gnu version of
awk
andsed
If $HOME/.local/bin/
is in your $PATH
variable and $HOME/.local/share/
exists, then just run make install
from your terminal. It will install the program for current the user.