Skip to content

Commit a35cf39

Browse files
committed
update read
1 parent 718af55 commit a35cf39

File tree

1 file changed

+17
-23
lines changed

1 file changed

+17
-23
lines changed

README.md

+17-23
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
This projects uses a python script which automatically calculates [adhan](https://en.wikipedia.org/wiki/Adhan) times every day and plays all five adhans at their scheduled time using cron.
33

44
## Diclaimer
5-
I can't take much credit for this at all. Most of the code I've used here is written by other developers (methoned below). I've only cleaned up some pieces and have put plumming in place so that people can get this up and running with minimal effort.
5+
I can't take much credit for this. A lot of the code I've used here is written by other developers (methoned below). I've only cleaned up some pieces and have put plumming in place so that people can get this up and running with minimal effort.
66

77
### Credits
88
I have made minor modifications / bug fixes but I've used the following as starting point:
@@ -33,40 +33,34 @@ The original python script is super configurable. Please see the [manual](http:/
3333
```
3434
#Set latitude and longitude here
3535
#--------------------
36-
lat = 42.288788
37-
long = -71.551678
36+
lat = 42.3601
37+
long = -71.0589
3838
```
3939
* Set adhan time [calculation method](http://praytimes.org/manual#Set_Calculation_Method). Modify the following line:
4040
```
4141
PT.setMethod('ISNA')
4242
```
43-
* And finally, set the time-zone. In the following example it's set to Eastern time hence the `-5`. The `1` after `-5` is for daylight saving.
44-
```
45-
times = PT.getTimes((now.year,now.month,now.day), (lat, long), -5, 1)
46-
```
47-
4843
Save your changes by pressing `Control X` and then `Y`.
4944

5045
## Run it for the first time
5146
Run this command `$ python /home/pi/adhan/updateAzaanTimers.py`. If everythig worked, your output will look something like this:
5247
```
53-
03:56
54-
12:53
55-
16:52
56-
20:13
57-
21:49
58-
<generator object find_command at 0x76a714e0>
59-
56 3 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah-Fajr.mp3 > /dev/null 2>&1 # fajr
60-
53 12 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # dhuhr
61-
52 16 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # asr
62-
13 20 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # maghrib
63-
49 21 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # isha
64-
0 1 * * * python /home/pi/adhan/updateAzaanTimers.py >> /home/pi/adhan/adhan.log 2>&1
65-
@monthly truncate -s 0 /home/pi/adhan/adhan.log 2>&1
66-
Script execution finished at: 2016-07-24 14:59:16.021888
48+
05:51
49+
11:52
50+
14:11
51+
16:30
52+
17:53
53+
51 5 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah-Fajr.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
54+
52 11 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
55+
11 14 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
56+
30 16 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
57+
53 17 * * * omxplayer -o local /home/pi/adhan/Adhan-Makkah.mp3 > /dev/null 2>&1 # rpiAdhanClockJob
58+
0 1 * * * python /home/pi/adhan/updateAzaanTimers.py >> /home/pi/adhan/adhan.log 2>&1 # rpiAdhanClockJob
59+
@monthly truncate -s 0 /home/pi/adhan/adhan.log 2>&1 # rpiAdhanClockJob
60+
Script execution finished at: 2017-01-06 21:22:31.512667
6761
```
6862

69-
If you look at the last 8 lines, you'll see that 5 adhan times have been scheduled. Then there is another line at the end which makes sure that at 1am every day the same script will run and calculate adhan times for that day. And lastly, there is a line to clear logs on a monthly basis so that your log file doesn't grow too big.
63+
If you look at the last few lines, you'll see that 5 adhan times have been scheduled. Then there is another line at the end which makes sure that at 1am every day the same script will run and calculate adhan times for that day. And lastly, there is a line to clear logs on a monthly basis so that your log file doesn't grow too big.
7064

7165
VOILA! You're done!! Plug in your speakers and enjoy!
7266

0 commit comments

Comments
 (0)