You are not logged in.
Hello guys
Have anyone the latest accuweather script who work
many tanks
@+
First:
Here's a link to the repo folks. CHanges have been committed and push:
https://github.com/TeamFahQ/1_accuweather
Then:
Open accuweather file in Accuweather_conky_script folder with text editor.
Find this line and add '#' before sed command:
#sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/°.*$//g' -e 's/.*RealFeel® //g' -e '/RealFeel Shade™/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/curr_cond_temp
Add this line:
sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/°.*$//g' -e '/RealFeel®/d' -e '/RealFeel Shade™/,+1d' -e '/RealFeel Shade/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/curr_cond_temp
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Tank's marens but don't work
curr_cond
daily_forecast
hourly_forecast
are empty.
#!/usr/bin/env bash
#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="conky -b"
#####################################
# Put your Accuweather address here #
#####################################
#address="https://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
address="https://www.accuweather.com/en/us/hutto/78634/weather-forecast/2110192"
#address="https://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="https://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
#address="https://www.accuweather.com/en/aq/casey-station/2273690/weather-forecast/2273690"
#Pause weather conky
pkill -STOP -xf "$weather_conky_launch_command"
# Make the temp directories as needed
[ -d $HOME/Accuweather_conky_script/temp ] || mkdir $HOME/Accuweather_conky_script/temp
[ -d $HOME/Accuweather_conky_script/temp/images ] || mkdir $HOME/Accuweather_conky_script/temp/images
[ -d $HOME/Accuweather_conky_script/temp/images_hourly ] || mkdir $HOME/Accuweather_conky_script/temp/images_hourly
#function: test_image
test_image () {
case $1 in
1)
echo a
;;
2|3)
echo b
;;
4|5)
echo c
;;
6)
echo d
;;
7)
echo e
;;
8)
echo f
;;
11)
echo 0
;;
12)
echo h
;;
13|14)
echo g
;;
15)
echo m
;;
16|17)
echo k
;;
18)
echo i
;;
19)
echo q
;;
20|21|23)
echo o
;;
22)
echo r
;;
24|31)
echo E
;;
25)
echo v
;;
26)
echo x
;;
29)
echo y
;;
30)
echo 5
;;
32)
echo 6
;;
33)
echo A
;;
34|35)
echo B
;;
36|37)
echo C
;;
38)
echo D
;;
39|40)
echo G
;;
41|42)
echo K
;;
43|44)
echo O
;;
*)
echo -
;;
esac
}
#function: test_wind
test_wind () {
case $1 in
CLM)
echo \-
;;
S)
echo 1
;;
SSW)
echo 2
;;
SW)
echo 3
;;
WSW)
echo 4
;;
W)
echo 5
;;
WNW)
echo 6
;;
NW)
echo 7
;;
NNW)
echo 8
;;
N)
echo 9
;;
NNE)
echo \:
;;
NE)
echo \;
;;
ENE)
echo \<
;;
E)
echo \=
;;
ESE)
echo \>
;;
SE)
echo \?
;;
SSE)
echo \@
;;
esac
}
############################
# Check the user arguments #
############################
if (( $# < 1 || $# > 18 )); then
echo "Invalid arguments!"
exit
fi
forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0
h_24hours=1
h_real=1
h_uv=1
h_wind=1
h_wind_g=1
h_hum=1
h_ind_hum=1
h_dew=1
h_cl_cov=1
h_prec_am=1
h_visib=1
h_cl_ceil=1
for i in $*
do
if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 && $i != -h_12h && $i != -h_no_real && $i != -h_no_uv && $i != -h_no_wind && $i != -h_no_wind_g && $i != -h_no_hum && $i != -h_no_ind_hum && $i != -h_no_dew && $i != -h_no_cl_cov && $i != -h_no_prec_am && $i != -h_no_visib && $i != -h_no_cl_ceil ]]; then
echo "Invalid arguments!"
exit
fi
case $i in
-f)
forecast0=1
;;
-f2015)
forecast2015=1
;;
-f2016)
forecast2016=1
;;
-h)
hourly0=1
;;
-h2015)
hourly2015=1
;;
-h2016)
hourly2016=1
;;
-h_12h)
h_24hours=0
;;
-h_no_real)
h_real=0
;;
-h_no_uv)
h_uv=0
;;
-h_no_wind)
h_wind=0
;;
-h_no_wind_g)
h_wind_g=0
;;
-h_no_hum)
h_hum=0
;;
-h_no_ind_hum)
h_ind_hum=0
;;
-h_no_dew)
h_dew=0
;;
-h_no_cl_cov)
h_cl_cov=0
;;
-h_no_prec_am)
h_prec_am=0
;;
-h_no_visib)
h_visib=0
;;
-h_no_cl_ceil)
h_cl_ceil=0
;;
esac
done
if [[ $forecast0 == 1 ]]; then
forecast2015=0
forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
hourly2015=0
hourly2016=0
fi
last_number=$(echo $address|sed 's/^.*\///')
#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then
#function: convert_time
convert_time ()
{
hours=$(echo $1|awk -F ":| " '{print $1}')
minutes=$(echo $1|awk -F ":| " '{print $2}')
am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
if [[ $am_or_pm == "" ]]; then
echo $1
return 0
elif [[ $am_or_pm == AM ]]; then
if (( $hours < 10 )); then
hours_24=0$hours
fi
if (( $hours == 10 || $hours == 11 )); then
hours_24=$hours
fi
if (( $hours == 12 )); then
hours_24=00
fi
elif [[ $am_or_pm == PM ]]; then
if (( $hours != 12 )); then
hours_24=$((hours+12))
fi
if (( $hours == 12 )); then
hours_24=12
fi
fi
time_24=$hours_24:$minutes
if [[ $1 != "N/A" ]]; then
echo $time_24
elif [[ $1 == "N/A" ]]; then
echo "N/A"
fi
}
sleep 0.2
curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/curr_cond_raw "$curr_addr"
daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/daily_forecast_raw "$daily_addr"
##### del image forecast
if [[ $forecast2015 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/temp/images/forecast_*.png ]]; then
rm $HOME/Accuweather_conky_script/temp/images/forecast_*.png
fi
fi
if [[ $forecast2016 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/temp/images/forecast_*.png ]]; then
rm $HOME/Accuweather_conky_script/temp/images/forecast_*.png
fi
fi
sleep 0.2
#current conditions
if [[ -s $HOME/Accuweather_conky_script/temp/curr_cond_raw ]]; then
sed '/current-weather-card/,/glacier-ad /!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/curr_cond_temp
sed -i '/div class=\"label-tooltip\" data-js/,/div class=\"current-weather-details/d' $HOME/Accuweather_conky_script/temp/curr_cond_temp
sed -i -e 's/\.svg.*$//g' -e 's/<\/div>//g' -e 's/<div>//g' -e 's/<\/span>//g' -e 's/<span class.*$//g' -e 's/^[\t]*//g' $HOME/Accuweather_conky_script/temp/curr_cond_temp
#sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/°.*$//g' -e 's/.*RealFeel® //g' -e '/RealFeel Shade™/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/temp/curr_cond_temp
sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/°.*$//g' -e '/RealFeel®/d' -e '/RealFeel Shade™/,+1d' -e '/RealFeel Shade/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/curr_cond_temp
#
sed -i '1s/^0//' $HOME/Accuweather_conky_script/temp/curr_cond_temp
# temporary file to control
#
cp $HOME/Accuweather_conky_script/temp/curr_cond_temp $HOME/Accuweather_conky_script/temp/curr_cond_control_point
if [[ $(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond_temp) != 'Max UV Index' ]]; then
sed -i "5s/^/Max UV\n0\n/" $HOME/Accuweather_conky_script/temp/curr_cond_temp
fi
wind_dir=$(sed -n 8p $HOME/Accuweather_conky_script/temp/curr_cond_temp|head -c 1)
if [[ $wind_dir == 0 ]]; then
sed -i '8s/^/CLM /' $HOME/Accuweather_conky_script/temp/curr_cond_temp
fi
sed -i '8s/ /\n/1' $HOME/Accuweather_conky_script/temp/curr_cond_temp
sed '/sunrise-sunset card-module content-module/,/temp-history content-module/!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/curr_cond_temp1
sed -i -e 's/.*"text-value">//g' -e 's/<\/span>$//g' -e '/</d' $HOME/Accuweather_conky_script/temp/curr_cond_temp1
#
sed -i -e '1d;4d' -e 's/^[\t]*//g' -e 's/ AM/:AM/g' -e 's/ PM/:PM/g' -e 's/ .*$//g' -e '/^$/d' -e 's/:AM/ AM/g' -e 's/:PM/ PM/g' $HOME/Accuweather_conky_script/temp/curr_cond_temp1
sed -i -e '1N;s/\n/:/' $HOME/Accuweather_conky_script/temp/curr_cond_temp1
if [[ $(sed -n 4p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" && $(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" && $(sed -n 6p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" && $(sed -n 7p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" ]]; then
sed -i '4N;s/\n/:/' $HOME/Accuweather_conky_script/temp/curr_cond_temp1
fi
# sorting сортировка
# curr_cond line 1,2 номер изобр. облака и температуры сейчас , number icon and Temperature now
sed -n 1,2p $HOME/Accuweather_conky_script/temp/curr_cond_temp > $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 3 температура ощущение Real Feel
sed -n 4p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 4 облачность Forecast
sed -n 3p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 5 направление ветра Wind Direction
sed -n 8p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 6 скорость ветра Wind Speed
#
sed -n 9p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 7 влажность Humidity
sed -n 13p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 8 давление Pressure
sed -n 17p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 9 УФ индекс UV Index
sed -n 6p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 10 облачность Cloud Cover
sed -n 19p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 11 влажность Indoor Humidity (for compatibility with old config file)
sed -n 13p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 12 точка росы Dew Point
sed -n 15p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 13 видимость Visibility
sed -n 21p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 14,15 солнце рассвет, закат Sun Rise Sun Set
sed -n 2,3p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 16 солнце длит. Sunlight Duration
sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 17 порывы ветра Wind Gusts
sed -n 11p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 18,19 луна восход, заход Moon Rise Moon Set
sed -n 5,6p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 20 Moonlight Duration
sed -n 4p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 21 высота облаков Cloud Ceiling
sed -n 23p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 22 #convert Image Number curr. cond. to Weather font letter curr. cond.
image=$(sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond)
echo $(test_image $image) >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 23 Sun Rise-24h
sunrise_time=$(sed -n 14p $HOME/Accuweather_conky_script/temp/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 24 Sun Set-24h
sunrise_time=$(sed -n 15p $HOME/Accuweather_conky_script/temp/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 25 Moon Rise-24h
sunrise_time=$(sed -n 18p $HOME/Accuweather_conky_script/temp/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 26 Moon Set-24h
sunrise_time=$(sed -n 19p $HOME/Accuweather_conky_script/temp/curr_cond)
echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond
## curr_cond line 27 convert Wind Direction curr. cond. to Wind font letter curr. cond.
wind=$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond)
echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/temp/curr_cond
if (( $(sed -n 14p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
sed -i '14s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
fi
if (( $(sed -n 15p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
sed -i '15s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
fi
if (( $(sed -n 18p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
sed -i '18s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
fi
if (( $(sed -n 19p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
sed -i '19s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
fi
sleep 0.2
# Copy image clouds
if [[ $forecast2015 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/forecast_0.png
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/wind_0.png
fi
if [[ $forecast2016 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/forecast_0.png
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/wind_0.png
fi
fi
## delete tendency pressure
# sed -i '8s/^.*; //' $HOME/Accuweather_conky_script/temp/curr_cond
## tendency pressure
#
sed -i -e '8s/↔/↔/g' -e '8s/↑/↑/g' -e '8s/↓/↓/g' -e '8s/↗/↗/g' -e '8s/↘/↘/g' -e '8s/↝/↝/g' $HOME/Accuweather_conky_script/temp/curr_cond
########## location, time update
sed '/header-loc-weather">\|<p class="sub">/!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/location
sed -i -e 's/^.*">//g' -e 's/<\/div>.*$//g' -e 's/<\/p>.*$//g' -e 's/,/ /' $HOME/Accuweather_conky_script/temp/location
############
#Daily forecast
if [[ -s $HOME/Accuweather_conky_script/temp/daily_forecast_raw ]]; then
sed '/<div class="daily-wrapper" data-qa="dailyCard0">/,/Further Ahead/!d' $HOME/Accuweather_conky_script/temp/daily_forecast_raw > $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i '/<div class="daily-wintercast-cta">/,/div class="daily-wrapper"/d' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i -e 's/\.svg.*$//g' -e 's/°<\/span>//g' -e 's/<\/span>//g' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i -e 's/^.*">\///' -e 's/^.*">//' -e 's/.*weathericons\///g' -e 's/^[\t]*//g' -e '/^$/d' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i -e '/<\|>\|fill=\|^[ ]*$\|Further Ahead/d' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i '/WinterCast/,+1d' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i '/connatixEl/,+2d' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i '/}/,+1d' $HOME/Accuweather_conky_script/temp/daily_forecast
sed -i '85,$d' $HOME/Accuweather_conky_script/temp/daily_forecast
#
# Change a short name to a long one or translate into another language
# sed -i -e 's/^Sun$/Sunday/g' -e 's/^Mon$/Monday/g' -e 's/^Tue$/Tuesday/g' -e 's/^Wed$/Wednesday/g' -e 's/^Thu$/Thursday/g' -e 's/^Fri$/Friday/g' -e 's/^Sat$/Saturday/g' $HOME/Accuweather_conky_script/temp/daily_forecast
sleep 0.2
# Copy image clouds
for (( i=1; i<=21; i+=1 ))
do
echo >> $HOME/Accuweather_conky_script/temp/daily_forecast
done
for (( i=3; i<=80; i+=7 ))
do
image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/temp/daily_forecast)
echo $(test_image $image) >> $HOME/Accuweather_conky_script/temp/daily_forecast
done
if [[ $forecast0 == 0 ]]; then
j=1
for (( i=3; i<=80; i+=7 ))
do
if [[ $forecast2015 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/daily_forecast).png $HOME/Accuweather_conky_script/temp/images/forecast_$j.png
fi
if [[ $forecast2016 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/daily_forecast).png $HOME/Accuweather_conky_script/temp/images/forecast_$j.png
fi
((j++))
done
fi
fi
fi
sleep 0.2
#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################
#function: convert_time_h
convert_time_h ()
{
hours=$(echo $1|awk -F ":| " '{print $1}')
am_or_pm=$(echo $1|awk -F ":| " '{print $2}')
if [[ $am_or_pm == "" ]]; then
echo $1
return 0
elif [[ $am_or_pm == AM ]]; then
if (( $hours < 10 )); then
hours_24=0$hours
fi
if (( $hours == 10 || $hours == 11 )); then
hours_24=$hours
fi
if (( $hours == 12 )); then
hours_24=00
fi
elif [[ $am_or_pm == PM ]]; then
if (( $hours != 12 )); then
hours_24=$((hours+12))
fi
if (( $hours == 12 )); then
hours_24=12
fi
fi
time_24=$hours_24:00
echo $time_24
}
if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then
#Hourly: 24h
hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=2
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/hourly_raw1 "$hourly_addr1"
curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/hourly_raw2 "$hourly_addr2"
if [[ -s $HOME/Accuweather_conky_script/temp/hourly_raw1 && -s $HOME/Accuweather_conky_script/temp/hourly_raw2 ]]; then
cat $HOME/Accuweather_conky_script/temp/hourly_raw1 $HOME/Accuweather_conky_script/temp/hourly_raw2 > $HOME/Accuweather_conky_script/temp/hourly_raw_temp
sed '/<div class=\"hourly-wrapper content-module\">/,/day=/!d' $HOME/Accuweather_conky_script/temp/hourly_raw_temp > $HOME/Accuweather_conky_script/temp/hourly
# #Hourly file
#
sed -i '/div class=\"label-tooltip\" data-js=/,/div class=\"hourly-content-container/d' $HOME/Accuweather_conky_script/temp/hourly
#remove spaces and tabs in lines
# sed -i -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/temp/hourly
sed -i '/div class=\"real-feel-mobile/,/<\/div>/d' $HOME/Accuweather_conky_script/temp/hourly
#Поменять ® на <span class="value">space
sed -i -e 's/®/<span class="value">space/g' $HOME/Accuweather_conky_script/temp/hourly
# и к space присоединить следующую строку(удалив space и \n- новая строка)
sed -i -z 's/space\n//g' $HOME/Accuweather_conky_script/temp/hourly
sed -i '/Indoor Humidity\|Air Quality\|RealFeel Shade\|RealFeel Guide\|Ice/d' $HOME/Accuweather_conky_script/temp/hourly
#
sed -i '/class="date"\|weathericons\/\|temp metric\|RealFeel<span\|"phrase"\|Max UV Index\|Wind\|Wind Gusts\|Humidity\|Dew Point\|Cloud Cover\|Visibility\|Cloud Ceiling/!d' $HOME/Accuweather_conky_script/temp/hourly
##adding empty lines for compatibility with the old config. file
#date
sed -i -e 's/<\/span><\/h2>/\n--/g' $HOME/Accuweather_conky_script/temp/hourly
sed -i -e 's/<\/span>.*$//g' -e 's/\.svg.*$//g' -e 's/<\/div>.*$//g' -e 's/<span class="value">/\n/g' $HOME/Accuweather_conky_script/temp/hourly
sed -i -e 's/.*weathericons\///g' -e 's/^.*>//g' -e 's/°.*$//g' -e 's/®//g' -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/temp/hourly
#Populate Max UV and Prec. Amount values where needed
i=1
while IFS= read -r line;
do
if [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly) == Wind ]]; then
j=$((i-2))
if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/temp/hourly) != 'Max UV Index' ]]; then
sed -i "${i}s/^/Max UV Index\n0\n/" $HOME/Accuweather_conky_script/temp/hourly
((i+=3))
fi
elif [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly) == Visibility ]]; then
j=$((i-2))
if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/temp/hourly) != 'Rain' && $(sed -n ${j}p $HOME/Accuweather_conky_script/temp/hourly) != 'Snow' ]]; then
sed -i "${i}s/^/Prec. Amount\n-\n/" $HOME/Accuweather_conky_script/temp/hourly
((i+=3))
fi
fi
((i+=1))
done < $HOME/Accuweather_conky_script/temp/hourly
sed -i '/^$/d' $HOME/Accuweather_conky_script/temp/hourly
##adding empty lines for compatibility with the old config. file
sed -i '/Dew Point/i Indoor Hum.\n0' $HOME/Accuweather_conky_script/temp/hourly
sed -i '/Max UV Index/i precip\n-\nNot' $HOME/Accuweather_conky_script/temp/hourly
sed -i '/^Further Ahead$/d' $HOME/Accuweather_conky_script/temp/hourly
sed -i '721,$d' $HOME/Accuweather_conky_script/temp/hourly
sed -i -e 's/ mph$\| km\/h$//g' -e 's/°.*$//g' $HOME/Accuweather_conky_script/temp/hourly
##### del image hourly
if [[ $hourly2015 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png ]]; then
rm $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png
fi
fi
if [[ $hourly2016 == 1 ]]; then
if [[ -f $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png ]]; then
rm $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png
fi
fi
# # Convert number image hourly to Weather font letter. Copy image clouds
for (( i=3; i<=720; i+=30 ))
do
image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/temp/hourly)
echo $(test_image $image) >> $HOME/Accuweather_conky_script/temp/hourly
sed -i "$(( i+9 ))s/ .*$//" $HOME/Accuweather_conky_script/temp/hourly
sed -i "$(( i+17 ))s/ .*$//" $HOME/Accuweather_conky_script/temp/hourly
done
if [[ $hourly0 == 0 ]]; then
j=1
for (( i=3; i<=720; i+=30 ))
do
if [[ $hourly2015 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly).png $HOME/Accuweather_conky_script/temp/images_hourly/hourly_$j.png
fi
if [[ $hourly2016 == 1 ]]; then
cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly).png $HOME/Accuweather_conky_script/temp/images_hourly/hourly_$j.png
fi
((j++))
done
fi
fi
# Convert times in hourly from am/pm to freedom times
for (( i=1; i<=720; i+=30 ))
do
h=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i ${i}s/^.*$/$(convert_time_h "$h")/ $HOME/Accuweather_conky_script/temp/hourly
# # Add times in hourly :0 ru version
# sed -i ${i}s/^.*$/"$h":00/ $HOME/Accuweather_conky_script/temp/hourly
done
sleep 0.2
##convert Wind Direction hourly to Wind font letter hourly
echo 'Font letter wind hourly ' >> $HOME/Accuweather_conky_script/temp/hourly
j=1
for (( i=14; i<=720; i+=30 ))
do
wind=$(sed -n "${i}"p $HOME/Accuweather_conky_script/temp/hourly | awk '{print $1}')
echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/temp/hourly
((j++))
done
##############################################################
# Full info, next 24h - altogether24 file
#
if [[ -f $HOME/Accuweather_conky_script/temp/altogether24 ]]; then
#
rm $HOME/Accuweather_conky_script/temp/altogether24
#
fi
#
if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2015 ]]; then
#
rm $HOME/Accuweather_conky_script/temp/altogether24_2015
#
fi
#
if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2016 ]]; then
#
rm $HOME/Accuweather_conky_script/temp/altogether24_2016
#
fi
#TIME
echo "\${color1}TIME\${goto 100}$(sed -n 1p $HOME/Accuweather_conky_script/temp/hourly)" > $HOME/Accuweather_conky_script/temp/altogether24
jump_to=160
for (( i=31; i<=360; i+=30 ))
do
time=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=361; i<=720; i+=30 ))
do
time=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
sed -i '1s/$/\n\n\n/' $HOME/Accuweather_conky_script/temp/altogether24
#FORECAST
echo "\${color1}FORECAST\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=7; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=367; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
sed -i '5s/$/\n/' $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=7; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=367; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#TEMPERATURE
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "TEMPER.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=4; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=364; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#REAL FEEL
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "REAL FEEL\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=6; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=366; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#CHANCE OF PRECIPITATION
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "PRECIP. %\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=9; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=369; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#MAX UV INDEX
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "UV INDEX\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=12; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=372; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#WIND
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "WIND\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=14; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=374; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#WIND GUSTS
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "WIND GUSTS\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=16; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=376; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#HUMIDITY
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "HUMIDITY\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=18; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=378; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#INDOOR HUMIDITY
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "IND. HUMID.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=20; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=380; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#DEW POINT
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "DEW POINT\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=22; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "24s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=382; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "24s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#CLOUD COVER
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "CLOUD CVR\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=24; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "26s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=384; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "26s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#PRECIPITATION AMOUNT
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "PREC. AM.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=26; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=386; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#VISIBILITY
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "VISIBILITY\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=28; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "30s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=388; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "30s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#CLOUD CEILING
echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
echo "CLOUD CEIL.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
jump_to=100
for (( i=30; i<=360; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "32s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=390; i<=720; i+=30 ))
do
messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
sed -i "32s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
#IMAGES
if [[ $hourly0 == 0 ]]; then
if [[ $hourly2015 == 1 ]]; then
jump_to=75
cp $HOME/Accuweather_conky_script/temp/altogether24 $HOME/Accuweather_conky_script/temp/altogether24_2015
fi
if [[ $hourly2016 == 1 ]]; then
jump_to=85
cp $HOME/Accuweather_conky_script/temp/altogether24 $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
# if [[ -f $HOME/Accuweather_conky_script/temp/altogether24 ]]; then
# rm $HOME/Accuweather_conky_script/temp/altogether24
# fi
hours=$((12+$h_24hours*12))
for (( i=1; i<=$hours; i+=1 ))
do
if [[ $hourly2015 == 1 ]]; then
sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/temp/altogether24_2015
fi
if [[ $hourly2016 == 1 ]]; then
sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
((jump_to+=60))
done
fi
#CONKYFONT
if [[ $hourly0 == 1 ]]; then
sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/Accuweather_conky_script/temp/altogether24
jump_to=95
for (( i=721; i<=732; i+=1 ))
do
sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
if [[ $h_24hours == 1 ]]; then
for (( i=733; i<=744; i+=1 ))
do
sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)/" $HOME/Accuweather_conky_script/temp/altogether24
((jump_to+=60))
done
fi
sed -i '4s/$/\${font}/' $HOME/Accuweather_conky_script/temp/altogether24
sed -i '2,3d' $HOME/Accuweather_conky_script/temp/altogether24
fi
#DELETE UNWANTED VARIABLES
if [[ $h_real == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '7,8s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_uv == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '11,12s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_wind == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_wind_g == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_hum == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_ind_hum == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_dew == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_cl_cov == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_prec_am == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_visib == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ $h_cl_ceil == 0 ]]; then
if [[ $hourly0 == 1 ]]; then
sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
elif [[ $hourly2015 == 1 ]]; then
sed -i '31,32s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
elif [[ $hourly2016 == 1 ]]; then
sed -i '31,32s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
if [[ -f $HOME/Accuweather_conky_script/temp/altogether24 ]]; then
sed -i '/VOID/d' $HOME/Accuweather_conky_script/temp/altogether24
fi
if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2015 ]]; then
sed -i '/VOID/d' $HOME/Accuweather_conky_script/temp/altogether24_2015
fi
if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2016 ]]; then
sed -i '/VOID/d' $HOME/Accuweather_conky_script/temp/altogether24_2016
fi
fi
sleep 0.5
##################################################################
#del. temp files
#
if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_temp ]]; then
#
rm $HOME/Accuweather_conky_script/temp/curr_cond_temp
#
fi
#
if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_temp1 ]]; then
#
rm $HOME/Accuweather_conky_script/temp/curr_cond_temp1
#
fi
# if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_control_point ]]; then
# rm $HOME/Accuweather_conky_script/temp/curr_cond_control_point
# fi
#
if [[ -f $HOME/Accuweather_conky_script/temp/hourly_raw_temp ]]; then
#
rm $HOME/Accuweather_conky_script/temp/hourly_raw_temp
#
fi
###############################################################
#del. raw files
# if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_raw ]]; then
# rm $HOME/Accuweather_conky_script/temp/curr_cond_raw
# fi
# if [[ -f $HOME/Accuweather_conky_script/temp/daily_forecast_raw ]]; then
# rm $HOME/Accuweather_conky_script/temp/daily_forecast_raw
# fi
# if [[ -f $HOME/Accuweather_conky_script/temp/hourly_raw1 ]]; then
# rm $HOME/Accuweather_conky_script/temp/hourly_raw1
# fi
# if [[ -f $HOME/Accuweather_conky_script/temp/hourly_raw2 ]]; then
# rm $HOME/Accuweather_conky_script/temp/hourly_raw2
# fi
#
##################################################################
#Resume weather conky
pkill -CONT -xf "$weather_conky_launch_command"
console
omuald@RogStrix:~$ conky -c ~/Accuweather_conky_script/didiert2
conky: desktop window (e00052) is subwindow of root window (19d)
conky: window type - normal
conky: drawing to created window (0x5e00002)
conky: drawing to double buffer
conky: forked to background, pid is 170545
romuald@RogStrix:~$
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32205 100 32205 0 0 60039 0 --:--:-- --:--:-- --:--:-- 60083
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33119 0 33119 0 0 59622 0 --:--:-- --:--:-- --:--:-- 59673
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images/forecast_0.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/.png': Aucun fichier ou dossier de ce type
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 34072 0 34072 0 0 56600 0 --:--:-- --:--:-- --:--:-- 56598
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 34912 0 34912 0 0 76448 0 --:--:-- --:--:-- --:--:-- 76561
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_2.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/Visibility.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/76%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_5.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/30%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_7.png' n'est pas un répertoire
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_8.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/-.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/space.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_13.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/Visibility.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/99%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_16.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/60%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_18.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/0.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/-.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/space.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2016/9.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_24.png' n'est pas un répertoire
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
curr_cond
daily_forecast
hourly_forecast
are empty.
This means that the script is not running.
What is the reason?
Check 1:
Open Accuweather_conky_script folder.
Right click on accuweather file > Properties > Permissions
Allow executing file as program - checked?
Check 2:
conky -c ~/Accuweather_conky_script/didiert2
Your conky name is didiert2 in Accuweather_conky_script folder,OK?
The first line must contain the start accuweather script command:
Example(my command):
${texeci 500 bash $HOME/Accuweather_conky_script/accuweather -f2015}
Check 3:
Path.
Accuweather_conky_script folder in HOME folder?
Check 4:
address="https://www.accuweather.com/en/us/hutto/78634/weather-forecast/2110192"
You must enter your address instead of this one.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Sorry, I see now:
weather_conky_launch_command="conky -b"
Replace with:
weather_conky_launch_command=conky -c "$HOME/Accuweather_conky_script/didiert2"
EDIT command to full path.
Last edited by marens (2023-02-23 17:09:34)
If people would know how little brain is ruling the world, they would die of fear.
Offline
hello
Tank's marens it look's better but the curr_cond & hourly & daily file are not in acuweather_conky_scritp, they are in
accuweather_conky_script/temp/
So I have to modify my conky, I'll let you know when I'm finish.
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Re
I have it & in french .
just these errors in console
$ conky -c ~/Accuweather_conky_script/didiert2
conky: desktop window (e00052) is subwindow of root window (19d)
conky: window type - normal
conky: drawing to created window (0x5a00002)
conky: drawing to double buffer
conky: forked to background, pid is 82984
romuald@RogStrix:~$
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28402 100 28402 0 0 78417 0 --:--:-- --:--:-- --:--:-- 78242
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 27803 100 27803 0 0 97850 0 --:--:-- --:--:-- --:--:-- 98243
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 25663 100 25663 0 0 90479 0 --:--:-- --:--:-- --:--:-- 90681
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30040 100 30040 0 0 66576 0 --:--:-- --:--:-- --:--:-- 66460
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/C.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
many tanks &
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
@loutch
I'm glad there is progress.
I never used hourly weather.
Disable conky.
Open terminal and run accuweather script:
$ bash $HOME/Accuweather_conky_script/accuweather -f2015 -h2015
Now check curr_cond & hourly & daily file.
If OK,change conky command to:
${texeci 500 bash $HOME/Accuweather_conky_script/accuweather -f2015 -h2015}
Enable conky.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
@ marens
Same errors in console .
here this morning curr_cond not the same
here with /en-FR/ version .
bash $HOME/Accuweather_conky_script/accuweather -f2015 -h2015
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 31611 100 31611 0 0 83817 0 --:--:-- --:--:-- --:--:-- 83848
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 32199 100 32199 0 0 110k 0 --:--:-- --:--:-- --:--:-- 111k
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/CLM.png': Aucun fichier ou dossier de ce type
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 33605 100 33605 0 0 130k 0 --:--:-- --:--:-- --:--:-- 130k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 35527 100 35527 0 0 98k 0 --:--:-- --:--:-- --:--:-- 98k
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_2.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/Visibility.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/90%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_5.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/75%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_7.png' n'est pas un répertoire
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_8.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/space.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_13.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/Visibility.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/90%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_16.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/83%.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_18.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/0.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/space.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/-1.png': Aucun fichier ou dossier de ce type
cp: la cible '/home/romuald/Accuweather_conky_script/temp/images_hourly/hourly_24.png' n'est pas un répertoire
here without hourly in fr-fr
bash $HOME/Accuweather_conky_script/accuweather -f2015
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28511 100 28511 0 0 101k 0 --:--:-- --:--:-- --:--:-- 101k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 29175 100 29175 0 0 108k 0 --:--:-- --:--:-- --:--:-- 108k
here with hourly
bash $HOME/Accuweather_conky_script/accuweather -f2015 -h2015
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28518 100 28518 0 0 98228 0 --:--:-- --:--:-- --:--:-- 98000
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 27208 100 27208 0 0 79667 0 --:--:-- --:--:-- --:--:-- 79788
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 28586 100 28586 0 0 116k 0 --:--:-- --:--:-- --:--:-- 116k
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
100 30177 100 30177 0 0 98k 0 --:--:-- --:--:-- --:--:-- 98k
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
cp: impossible d'évaluer '/home/romuald/Accuweather_conky_script/Forecast_Images_2015/.png': Aucun fichier ou dossier de ce type
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
So, I'll just leave that out until those 'game weather idiots' break that too:
I did not see this, I did not see this, I did not see this ... {peeking}
OH MY! I did see it!
CANNOT UNSEE
LOVE IT!!!!!
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
@ marens
Don't break your head, the script is not working
Error: sunrise-sunset block in curr_cond_temp1;
Error: sed -i '/div class=\"label-tooltip\" data-js=/,/div class=\"hourly-content-container/d' in Hourly file
For you, a working script on Google Drive
Offline
Re
@ marens
i have it , i create a second folder Accuweather_conky_script_fr with the french adresse & modifier didiert2 to search the /temp/curr_cond in english & the rest in the french file.
now we have to wait for tonight to see if there is no change in the curr_cond file.
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
@ marens
Don't break your head, the script is not working
Error: sunrise-sunset block in curr_cond_temp1;
Error: sed -i '/div class=\"label-tooltip\" data-js=/,/div class=\"hourly-content-container/d' in Hourly file
For you, a working script on Google Drive
@il.harun
Thanks.
I have never used hourly weather.
I will do it, just because I want to help @loutch.
Big respect for you.
In my country people say:
If you can't help, don't bother.
Some people don't understand that.
If people would know how little brain is ruling the world, they would die of fear.
Offline
@loutch
I'm glad you found a solution.
From il.harun's script:
Find this line and add '#' before sed command:
#sed -i '/div class=\"label-tooltip\" data-js=/,/div class=\"hourly-content-container/d' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/hourly
Add line:
sed -i '/div class=\"label-tooltip\" data-js=/,/-content-container/d' $HOME/Accuweather_conky_script/hourly
Test it.
Nice conky.
If people would know how little brain is ruling the world, they would die of fear.
Offline
Well, I've moved on to:
Openweather, AccuWeather RSS Feed and Remind all in one.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
Weather Alerts in AcuWeather_conky_script
My colors:
color1 0098FF
color2 FEDF08
color8 magenta
color9 FF4040
Blink effect if Wind Gusts >= 40 km/h
Blink effect if UV Index Very High OR Extreme
Note:
Image alert.png is dialog-warnning.png icon from icon theme.
First line after WEATHER (or anywhere, just change the image position and goto XXX):
WEATHER${font Ubuntu:size=10:italic}${goto 188}\
${if_match ${texeci 600 sed -n '17p' $HOME/Accuweather_conky_script/curr_cond|awk '{print $1}'}>=40}${blink ${color1}Wind Gusts: ${color9}${texeci 600 sed -n '17p' $HOME/Accuweather_conky_script/curr_cond}}\
${image $HOME/Accuweather_conky_script/alert.png -p 165,9 -s 14x14}\
${else}${endif}\
${if_match "${texeci 600 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | sed 's/^[^ ]* //'}" == "Very High"}${blink ${color1}UV Index:${color9} ${texeci 600 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | sed 's/^[^ ]* //'}}\
${image $HOME/.conky/SM*AccuWeather*Icons/alert.png -p 165,9 -s 14x14}\
${else}${if_match "${texeci 600 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | sed 's/^[^ ]* //'}" == "Extreme"}${blink ${color1}UV Index:${color8} ${texeci 600 sed -n '9p' $HOME/Accuweather_conky_script/curr_cond | sed 's/^[^ ]* //'}}\
${image $HOME/Accuweather_conky_script/alert.png -p 165,9 -s 14x14}\
${else}${endif}${endif}
Simple colored current temperature
Normal values <=29° - light yellow
High Values (30°-34°) - orange
Very High >= 35° - light red
Find line:
${texeci 600 sed -n '2p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond}°
and add before (as below):
${color2}${if_match ${texeci 600 sed -n '2p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond}>=30}${color orange}\
${if_match ${texeci 600 sed -n '2p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond}>=35}${color9}\
${else}${endif}${endif}\
${texeci 600 sed -n '2p' $HOME/.conky/SM*AccuWeather*Icons/Accuweather_conky_script/curr_cond}°
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
I have a little problem with my accuweather conky
These are the images provided for the time part de /temp/hourly
Here we see that at 23 h (11 pm) it is a bad icon (hourly_6.png).
Yet in the hourly file is the right code, 33.png which corresponds to the moon icon.
The six other icons are not good too (hourly_7.png -8-9-11 -13-14).
Here /temp/hourly file
:00
--
3
1
RealFeel
-8
Partiellement ensoleillé
RealFeel
space
-8
19 h
--
33
0
RealFeel
-8
Ciel dégagé
RealFeel
space
-8
20 h
--
33 icon number
-1
RealFeel
-9
Ciel dégagé
RealFeel
space
-9
:00
--
33 icon number
-1
RealFeel
-9
Ciel dégagé
RealFeel
space
-9
22 h
--
33
-1
RealFeel
-9
Ciel dégagé
RealFeel
space
-9
23 h
--
33 icon number
-2
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
:00
--
33 icon number
-2
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
01 h
--
33
-2
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
02 h
--
33 icon number
-2
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
:00
--
33
-2
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
04 h
--
33 icon number
-3
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
05 h
--
33
-3
RealFeel
-10
Ciel dégagé
RealFeel
space
-10
:00
--
33 icon number
-3
RealFeel
-11
Ciel dégagé
RealFeel
space
-11
07 h
--
34
-4
RealFeel
-12
Plutôt dégagé
RealFeel
space
-12
08 h
--
2
-3
RealFeel
-10
Plutôt ensoleillé
RealFeel
space
-10
:00
--
2
-2
RealFeel
-8
Plutôt ensoleillé
RealFeel
space
-8
10 h
--
2
-1
RealFeel
-7
Plutôt ensoleillé
RealFeel
space
-7
11 h
--
2
0
RealFeel
-5
Plutôt ensoleillé
RealFeel
space
-5
:00
--
2
2
RealFeel
-4
Plutôt ensoleillé
RealFeel
space
-4
13 h
--
2
3
RealFeel
-3
Plutôt ensoleillé
RealFeel
space
-3
14 h
--
2
3
RealFeel
-2
Plutôt ensoleillé
RealFeel
space
-2
:00
--
2
4
RealFeel
-1
Plutôt ensoleillé
RealFeel
space
-1
16 h
--
2
4
RealFeel
-2
Plutôt ensoleillé
RealFeel
space
-2
17 h
--
2
3
RealFeel
-3
Plutôt ensoleillé
RealFeel
space
-3
:00
--
2
2
RealFeel
-5
Plutôt ensoleillé
RealFeel
space
-5
19 h
--
33
1
RealFeel
-5
Ciel dégagé
RealFeel
space
-5
20 h
--
33
0
RealFeel
-6
Ciel dégagé
RealFeel
space
-6
:00
--
33
-1
RealFeel
-7
Ciel dégagé
RealFeel
space
-7
22 h
--
33
-1
RealFeel
-7
Ciel dégagé
RealFeel
space
-7
23 h
--
33
-2
RealFeel
-8
the icon code is good 33.png is that
An idea of the problem.
many tanks
@+
Last edited by loutch (2023-02-26 16:57:39)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
@loutch
Did you see this post:
https://forums.bunsenlabs.org/viewtopic … 59#p126259 ?
Last:
Find this line and add '#' before sed command:
#sed '/sunrise-sunset card-module content-module/,/temp-history content-module/!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/curr_cond_temp1
Add line:
sed '/sunrise-sunset card-module content-module/,/temp-history content-module/!d' $HOME/Accuweather_conky_script/curr_cond_raw > $HOME/Accuweather_conky_script/curr_cond_temp1
Good luck!
If people would know how little brain is ruling the world, they would die of fear.
Offline
Hello
Tanks for helping
Done but doesn't work .
The problem is that in /temp/hourly the code icon is wright , it's folder /temp/images_hourly who do not display the right icon.
i made the same conky with conky dark_sky & there is no problem.
The big problem is that "Support for the Dark Sky API will end on March 31, 2023. ".
At worst i could remove the hourly part of the conky if we can't solve the problem.
@+
Last edited by loutch (2023-02-27 07:56:14)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
@loutch,
malheureusement je ne peux pas t'aider car je n'ai pas ta configuration de la lune. De plus, je n'ai jamais vu cela dans Accuweather. Je ne le connais que par le biais de Wunderground qui ne fonctionne pas.
...
The big problem is that "Support for the Dark Sky API will end on March 31, 2023. ".
...
Il existe une solution à ce problème
Il existe un fournisseur européen qui le fait gratuitement et sans enregistrement API. Nous n'avons plus besoin des Américains.
Si je 'copie' suffisamment, je devrais y arriver. En fait, j'espère obtenir des données plus précises, car openweather est toujours à des kilomètres de ma position.
@loutch,
unfortunately I can't help you, because I don't have your configuration of the moon. Also, this is new to me from Accuweather. I know this only from the broken Wunderground.
There is a workaround for this
There is a European provider that does this for free and without an API registration. We don't need the Americans anymore.
If I 'copy' enough, I should be able to get it there. Actually, I'm hoping for more accurate data because openweather to my location is always 'miles' off.
Offline
@loutch,
There is a workaround for this
![]()
There is a European provider that does this for free and without an API registration. We don't need the Americans anymore.
If I 'copy' enough, I should be able to get it there. Actually, I'm hoping for more accurate data because openweather to my location is always 'miles' off.
Oh super!
Ce sera intéressant à voir.
Aller d'abord au petit-déjeuner.
Oh gut!
Das wird interessant zu sehen sein.
Erstmal frühstücken gehen.
Oh good!
This will be interesting to see.
Going for breakfast first.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline