quran

English translation of the Quran from the command line
git clone https://riazj.com/git/quran
Log | Files | Refs | README | LICENSE

commit 4a0670f5b982c1879e2585a47b9c425c1e24f264
parent 0ffc29f1c73a562170889188c751cb82b543eaaf
Author: Riaz <riaz@riazj.com>
Date:   Wed, 25 Jun 2025 14:20:27 -0700

Update the stats on the number of lines

Diffstat:
MREADME | 19++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)

diff --git a/README b/README @@ -29,14 +29,14 @@ Examples: Improvements ------------ -This was forked from Samiul Ahmed's repository[1]. The following is a summary -of the improvements made: +This was forked from Samiul Ahmed's repository (https://github.com/samiuljoy/quran). +The following is a summary of the improvements made: - Added error messages - Added portability with BSD grep by simplifying the search patterns -- Decreased the number of lines in quran.txt from 7137 to 6680 by removing +- Decreased the number of lines in quran.txt from ~7140 to ~6700 by removing unnecessary blank lines and splitting the list of surahs into a separate file -- Decreased the number of lines of code from 126 to 83 (calculated by cloc[2]) +- Decreased the number of SLOC from ~130 to ~80 - Increased performance by removing unnecessary cut, sed, and xargs commands - Improved readability by dividing the code into functions - For flexibility with text operations, the output is in standard output @@ -45,21 +45,20 @@ of the improvements made: To open the output in a pager, use a function like this: quran() { - "/usr/local/bin/quran" "$@" | fold -s | "${PAGER:-less}" + /usr/local/bin/quran "$@" | fold -s | "${PAGER:-less}" } or a script like this: #!/bin/sh - "/usr/local/bin/quran" "$@" | fold -s | "${PAGER:-less}" + /usr/local/bin/quran "$@" | fold -s | "${PAGER:-less}" Note: Use less with -R so that if grep returns an output with color, it can be viewed. Adding Other Translations ------------------------- - This script should work with other translations in the same format as the quran.txt file with the following conditions: @@ -71,9 +70,3 @@ quran.txt file with the following conditions: 2. The ayat start with [surah number:ayah number]. 3. There is at least one blank line at the end of a surah (not required for the last surah). - - -References ----------- -[1] https://github.com/samiuljoy/quran -[2] https://github.com/AlDanial/cloc