commit 935c723eac7ed9b2a757a8b716ee084727c7ecc5
parent 2558e37fc5be4904a963cea119bb6c836217c27b
Author: Agastya <me@hanabi.in>
Date: Sat, 7 May 2022 22:32:24 +0000
Add mdoc and make options for copying man page and uninstalling the software.
Diffstat:
M | makefile | | | 8 | +++++++- |
A | man/quran.1 | | | 73 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
2 files changed, 80 insertions(+), 1 deletion(-)
diff --git a/makefile b/makefile
@@ -3,4 +3,10 @@ build:
clean:
rm -rf bin
install:
- make build && mv bin/quran /usr/local/bin && make clean
+ make build && mv bin/quran /usr/local/bin && make add-man && make clean
+add-man:
+ cp man/quran.1 /usr/local/man/man1 && makewhatis /usr/local/man
+rm-man:
+ rm -i /usr/local/man/man1/quran.1 && makewhatis /usr/local/man
+uninstall:
+ rm -i /usr/local/bin/quran ; make rm-man
diff --git a/man/quran.1 b/man/quran.1
@@ -0,0 +1,73 @@
+.Dd $Mdocdate: May 8 2022 $
+.Dt QURAN 1
+.Os
+.Sh NAME
+.Nm quran
+.Nd fetch various Qur'an translations right in the terminal.
+.Sh SYNOPSIS
+.Nm quran
+.Op Fl delay Ar delay-ms
+.Op Fl decorate
+.Op Fl trans Ar trans-id
+.Op Ar command|args
+.Sh DESCRIPTION
+.Nm quran
+fetches Qur'an chapter and verse translations right in the terminal.
+.Nm quran
+is not 'bug compatible' with
+.Nm quran.py ,
+as this software parses input differently.
+.Pp
+The options are as follows:
+.Bl -tag -width Ds
+.It Fl delay Ar delay-ms
+Specify
+.Ar delay-ms
+in milliseconds, the delay between fetching verses.
+I advice using at least 500.
+Default is 1000.
+.It Fl decorate
+Decorate the chapters and verses.
+.It Fl trans Ar trans-id
+Select which translation to use, for fetching the verses.
+Default trans-id is
+.Dv 131 ,
+corresponding to Dr. Mustafa Khattab, the Clear Quran.
+Use
+.Em
+quran ls-translations
+to see available translations.
+.Pp
+.Sh COMMANDS
+.Bl -tag -width Ds
+.It about
+Print basic description about
+.Nm quran .
+.It details
+Print basic information about the source of the verses.
+.It ls-translations
+Print available translations, which can be specified with the
+.Fl trans
+flag.
+.It version
+Print current version of
+.Nm quran .
+.Sh ARGUMENTS
+.Pp
+Without specifying any commands, argument is of the type <chapter:[verse1[-verse2]]>.
+.Sh LICENSE
+This software is licensed under the GNU Affero General Public License v3.
+Please see
+.Lk Aq https://www.gnu.org/licenses/agpl-3.0/txt
+for what you are allowed to do with this software's source code.
+.Sh AUTHORS
+Original implementation by
+.An acagastya Aq Mt me+git@hanabi.in .
+.Sh REPORTING ERRORS
+Please do NOT call errors as bugs.
+Any incorrect behaviour of the software is an ERROR.
+Report errors to
+.An acagastya Aq Mt me+git@hanabi.in .
+Additionally, if you wish to submit changes/error fixes, please send a
+.Nm git-format-patch(1)
+to the same email.