forked from achaudhry/adhan
-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge github.com:achaudhry/adhan into fridaySurahBaqarah
Accepted both changes in .gitignore
- Loading branch information
Showing
6 changed files
with
105 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,4 +3,7 @@ | |
*.pyc | ||
adhan.log | ||
settings.ini | ||
__pycache__ | ||
__pycache__ | ||
.settings | ||
before-hooks.d/*.sh | ||
after-hooks.d/*.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# This file must be executable, to make it as such, run the following: | ||
# chmod u+x <this-file> | ||
# It can also be written in any language so long as a valid shebang (#!) is used as above | ||
echo "Placeholder for an after hook" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/usr/bin/env bash | ||
# This file must be executable, to make it as such, run the following: | ||
# chmod u+x <this-file> | ||
# It can also be written in any language so long as a valid shebang (#!) is used as above | ||
echo "Placeholder for a before hook" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env bash | ||
if [ $# -lt 1 ]; then | ||
echo "USAGE: $0 <azaan-audio-path> [<volume>]" | ||
exit 1 | ||
fi | ||
|
||
audio_path="$1" | ||
vol=${2:-0} | ||
root_dir=`dirname $0` | ||
|
||
# Run before hooks | ||
for hook in $root_dir/before-hooks.d/*; do | ||
echo "Running before hook: $hook" | ||
$hook | ||
done | ||
|
||
# Play Azaan audio | ||
omxplayer --vol $vol -o local $audio_path | ||
|
||
# Run after hooks | ||
for hook in $root_dir/after-hooks.d/*; do | ||
echo "Running after hook: $hook" | ||
$hook | ||
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters