From 26c3610f7c2023db076d79d00dfcfdc7d11f6ac3 Mon Sep 17 00:00:00 2001 From: WovenCoast Date: Sun, 24 Jul 2022 13:06:11 +0500 Subject: [PATCH] added some documentation ig --- README.md | 39 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 38 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 8743c14..82fb45a 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,40 @@ # prayertimes-sh -Small script to get next prayer time \ No newline at end of file +Small script to get next prayer time + +## Prerequesites + +A linux machine, that's it lol. The only special commands being used are `date`, `wget` or `curl`, `grep`, `cut` + +## Usage + +- Download the script + +```sh +wget -O prayertime.sh https://git.shihaam.dev/flamexode/prayertimes-sh/raw/branch/master/prayertime.sh +# or +curl -o prayertime.sh https://git.shihaam.dev/flamexode/prayertimes-sh/raw/branch/master/prayertime.sh +``` + +- Just run the script, make sure that `prayertimes.csv` isn't a file being used + +```sh +chmod +x prayertime.sh +./prayertime.sh +# or specify your own file +./prayertime.sh -f "/home/flamexode/projects/prayertimes-db/out/102.csv" +``` + + +> Note: You'll need to use the [island mappings](https://github.com/WovenCoast/prayertimes-db/blob/main/island-mapping.md) to find the island ID for your island. +> Island ID for Male' is 102, this is selected by default if no input is given + +- (optional) Add a cronjob to store the output for other programs + +```cron +* * * * * /home/flamexode/scripts/prayertime.sh > /home/flamexode/.prayertime +``` + +> Note: Make sure you use your own username + +Now you can use ~/.prayertime to quickly read the next prayer time \ No newline at end of file