prayertimes-sh/README.md

40 lines
1.2 KiB
Markdown

# prayertimes-sh
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