-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathweather_update.sh
executable file
·34 lines (32 loc) · 1.58 KB
/
weather_update.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
#--------------------------------------------------------------------------
# Weather finding function -
#--------------------------------------------------------------------------
if [ -z "$1" ]
then
# finding current weather based on IP
#--------------------------------------------------------------------------
espeak "Finding Current weather status Based on your I P ADDRESS" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
echo " "
echo " -------------------------------------------------------------------------------------------------------------"
curl wttr.in
echo " -------------------------------------------------------------------------------------------------------------"
#--------------------------------------------------------------------------
else
espeak "Type zipcode or name of the place " -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
echo " "
read -p "Type zipcode/place name ..:" m
# finding weather based on your prefered location
#--------------------------------------------------------------------------
espeak "Finding current weather status of $m" -w foo.wav
vlc --fullscreen --effect-list=spectrometer foo.wav
sleep 1
echo " "
echo " -------------------------------------------------------------------------------------------------------------"
curl wttr.in/$m
echo " -------------------------------------------------------------------------------------------------------------"
fi
#--------------------------------------------------------------------------