You are not logged in.

#621 2016-02-25 18:41:15

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

sad

Had a few "powercuts" and when the power comes back - the tension is fluctuating from 'lights barely visible' to 'overly bright' and down again ... caught me by surprise the first time and the computer went down.  All OK, but have had to unplug the fridge and other electronic equipment (stereo, TV etc) as there have been reports of them being "fried".  I've 'defrosted' my fridge at least three times the last 7 days.  mad mad mad mad

Anyway, I 'think' we're back as the heat-wave has been broken (crossing fingers) and it looks like I missed most of the fun.  Oh well, all's well that ends well.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#622 2016-03-02 06:53:56

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

sometimes i would like to know what the weather was like in the past hours (frosty night? did it rain?).
before starting to hack it myself, has this ever been done?

Offline

#623 2016-03-02 20:50:29

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

No, it's never been done.
Very interesting question though...
Do you have a specific site in mind?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#624 2016-03-03 04:06:27

KrunchTime
Member
Registered: 2015-09-29
Posts: 857

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

TeoBigusGeekus wrote:

No, it's never been done.
Very interesting question though...
Do you have a specific site in mind?

If you enter a zip code or city & state on the NWS site, the resulting page has a link near the top right for the 3-day history (hourly entries) for the location.

Last edited by KrunchTime (2016-03-03 04:08:19)

Offline

#625 2016-03-03 11:54:16

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

KrunchTime wrote:
TeoBigusGeekus wrote:

No, it's never been done.
Very interesting question though...
Do you have a specific site in mind?

If you enter a zip code or city & state on the NWS site, the resulting page has a link near the top right for the 3-day history (hourly entries) for the location.

Nice, but it's only for the US.

Take a look at this new version of the 1c script:

#!/bin/bash

#put your Accuweather address here
address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/en/us/chantilly-va/20151/weather-forecast/336309"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"

kill -STOP $(pidof conky)
killall wget
rm $HOME/1c_accuweather_images_hourly/*.png

wget --save-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw1 $addr1
 
#First 8hrs - hourly_raw1 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1 ]]; then
	sed -i -e '/"arrow-small-left">< Previous 8 hours/,/"chart chart-top"/!d' -e 's/°/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '61,68s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	for (( i=21; i<=42; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1).png $HOME/1c_accuweather_images_hourly/$i.png
	  done
	for (( i=22; i<=51; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			fi
	  done
fi

addr2=$(sed -n 2p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw2 $addr2

#Next 8hrs - hourly_raw2 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2).png $HOME/1c_accuweather_images_hourly/$(( $i+100 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			fi
	  done
fi

addr0=$(sed -n 1p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw0 $addr0

#Previous 8hrs - hourly_raw0 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw0 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0).png $HOME/1c_accuweather_images_hourly/$(( $i+200 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw0
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw0
				i=$((i+1))
			fi
	  done
fi

# Full info, next 16h - altogether file
rm $HOME/1c_accuweather_images_hourly/altogether
#TEMP
echo "\${color ffe595}\${goto 100}\${hr 1}" > $HOME/1c_accuweather_images_hourly/altogether
echo "TEMP.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=53; i<=60; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "2s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=52; i<=59; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "2s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#REALFEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "REALF.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=62; i<=69; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "4s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=61; i<=68; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "4s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "HUMIDITY\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=71; i<=78; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "6s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=70; i<=77; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "6s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "RAIN\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=80; i<=87; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=79; i<=86; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "SNOW\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=89; i<=96; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "10s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=88; i<=95; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "10s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "ICE\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=98; i<=105; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "12s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=97; i<=104; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "12s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "WIND(km/h)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=107; i<=114; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "14s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=106; i<=113; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "14s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "UV INDEX\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=116; i<=123; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "16s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=115; i<=122; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "16s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "CLOUD COV.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=125; i<=132; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "18s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=124; i<=131; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "18s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "DEW P.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
jump_to=100
for (( i=134; i<=141; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "20s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done
for (( i=133; i<=140; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
	sed -i "20s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
	jump_to=$(( jump_to+=60 ))
done

# Full info, previous 8h, next 8h - altogether1 file
rm $HOME/1c_accuweather_images_hourly/altogether1
#TEMP
echo "\${color ffe595}\${goto 100}\${hr 1}" > $HOME/1c_accuweather_images_hourly/altogether1
echo "TEMP.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=52; i<=59; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "2s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=53; i<=60; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "2s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#REALFEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "REALF.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=61; i<=68; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "4s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=62; i<=69; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "4s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "HUMIDITY\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=70; i<=77; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "6s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=71; i<=78; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "6s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "RAIN\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=79; i<=86; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=80; i<=87; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "SNOW\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=88; i<=95; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "10s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=89; i<=96; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "10s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "ICE\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=97; i<=104; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "12s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=98; i<=105; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "12s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "WIND(km/h)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=106; i<=113; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "14s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=107; i<=114; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "14s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "UV INDEX\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=115; i<=122; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "16s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=116; i<=123; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "16s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "CLOUD COV.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=124; i<=131; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "18s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=125; i<=132; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "18s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "DEW P.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
for (( i=133; i<=140; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
	sed -i "20s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done
for (( i=134; i<=141; i+=1 ))
do
	temp=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
	sed -i "20s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
	jump_to=$(( jump_to+=60 ))
done

kill -CONT $(pidof conky)

conkyrc for the next 16hours:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 1030 300
maximum_width 1030

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

imlib_cache_size 0
text_buffer_size 4096

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}

TIME${goto 100}${execpi 600 sed -n '3p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 160}${execpi 600 sed -n '4p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 220}${execpi 600 sed -n '5p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 280}${execpi 600 sed -n '6p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 340}${execpi 600 sed -n '7p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 400}${execpi 600 sed -n '8p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 460}${execpi 600 sed -n '9p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 520}${execpi 600 sed -n '10p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 580}${execpi 600 sed -n '2p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 640}${execpi 600 sed -n '3p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 700}${execpi 600 sed -n '4p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 760}${execpi 600 sed -n '5p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 820}${execpi 600 sed -n '6p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 880}${execpi 600 sed -n '7p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 940}${execpi 600 sed -n '8p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 1000}${execpi 600 sed -n '9p' $HOME/1c_accuweather_images_hourly/hourly_raw2}
${image $HOME/1c_accuweather_images_hourly/21.png -s 60x36 -p 70,49}${image $HOME/1c_accuweather_images_hourly/24.png -s 60x36 -p 130,49}${image $HOME/1c_accuweather_images_hourly/27.png -s 60x36 -p 190,49}${image $HOME/1c_accuweather_images_hourly/30.png -s 60x36 -p 250,49}${image $HOME/1c_accuweather_images_hourly/33.png -s 60x36 -p 310,49}${image $HOME/1c_accuweather_images_hourly/36.png -s 60x36 -p 370,49}${image $HOME/1c_accuweather_images_hourly/39.png -s 60x36 -p 430,49}${image $HOME/1c_accuweather_images_hourly/42.png -s 60x36 -p 490,49}${image $HOME/1c_accuweather_images_hourly/120.png -s 60x36 -p 550,49}${image $HOME/1c_accuweather_images_hourly/123.png -s 60x36 -p 610,49}${image $HOME/1c_accuweather_images_hourly/126.png -s 60x36 -p 670,49}${image $HOME/1c_accuweather_images_hourly/129.png -s 60x36 -p 730,49}${image $HOME/1c_accuweather_images_hourly/132.png -s 60x36 -p 790,49}${image $HOME/1c_accuweather_images_hourly/135.png -s 60x36 -p 850,49}${image $HOME/1c_accuweather_images_hourly/138.png -s 60x36 -p 910,49}${image $HOME/1c_accuweather_images_hourly/141.png -s 60x36 -p 970,49}

FORECAST${color}
${goto 100}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 160}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 220}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 280}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 340}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 400}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 460}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 520}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 580}${execpi 600 sed -n '21p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 640}${execpi 600 sed -n '25p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 700}${execpi 600 sed -n '29p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 760}${execpi 600 sed -n '33p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 820}${execpi 600 sed -n '37p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 880}${execpi 600 sed -n '41p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 940}${execpi 600 sed -n '45p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 1000}${execpi 600 sed -n '49p' $HOME/1c_accuweather_images_hourly/hourly_raw2}
${goto 100}${execpi 600 sed -n '23p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 160}${execpi 600 sed -n '27p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 220}${execpi 600 sed -n '31p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 280}${execpi 600 sed -n '35p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 340}${execpi 600 sed -n '39p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 400}${execpi 600 sed -n '43p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 460}${execpi 600 sed -n '47p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 520}${execpi 600 sed -n '51p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 580}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 640}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 700}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 760}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 820}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 880}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 940}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw2}${goto 1000}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw2}
${execpi 600 sed -n '1,21p' $HOME/1c_accuweather_images_hourly/altogether}

conkyrc for the previous 8 and the next 8 hours:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 1030 300
maximum_width 1030

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

imlib_cache_size 0
text_buffer_size 4096

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}

TIME${goto 100}${execpi 600 sed -n '2p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 160}${execpi 600 sed -n '3p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 220}${execpi 600 sed -n '4p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 280}${execpi 600 sed -n '5p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 340}${execpi 600 sed -n '6p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 400}${execpi 600 sed -n '7p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 460}${execpi 600 sed -n '8p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 520}${execpi 600 sed -n '9p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 580}${execpi 600 sed -n '3p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 640}${execpi 600 sed -n '4p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 700}${execpi 600 sed -n '5p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 760}${execpi 600 sed -n '6p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 820}${execpi 600 sed -n '7p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 880}${execpi 600 sed -n '8p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 940}${execpi 600 sed -n '9p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 1000}${execpi 600 sed -n '10p' $HOME/1c_accuweather_images_hourly/hourly_raw1}
${image $HOME/1c_accuweather_images_hourly/220.png -s 60x36 -p 70,49}${image $HOME/1c_accuweather_images_hourly/223.png -s 60x36 -p 130,49}${image $HOME/1c_accuweather_images_hourly/226.png -s 60x36 -p 190,49}${image $HOME/1c_accuweather_images_hourly/229.png -s 60x36 -p 250,49}${image $HOME/1c_accuweather_images_hourly/232.png -s 60x36 -p 310,49}${image $HOME/1c_accuweather_images_hourly/235.png -s 60x36 -p 370,49}${image $HOME/1c_accuweather_images_hourly/238.png -s 60x36 -p 430,49}${image $HOME/1c_accuweather_images_hourly/241.png -s 60x36 -p 490,49}${image $HOME/1c_accuweather_images_hourly/21.png -s 60x36 -p 550,49}${image $HOME/1c_accuweather_images_hourly/24.png -s 60x36 -p 610,49}${image $HOME/1c_accuweather_images_hourly/27.png -s 60x36 -p 670,49}${image $HOME/1c_accuweather_images_hourly/30.png -s 60x36 -p 730,49}${image $HOME/1c_accuweather_images_hourly/33.png -s 60x36 -p 790,49}${image $HOME/1c_accuweather_images_hourly/36.png -s 60x36 -p 850,49}${image $HOME/1c_accuweather_images_hourly/39.png -s 60x36 -p 910,49}${image $HOME/1c_accuweather_images_hourly/42.png -s 60x36 -p 970,49}

FORECAST${color}
${goto 100}${execpi 600 sed -n '21p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 160}${execpi 600 sed -n '25p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 220}${execpi 600 sed -n '29p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 280}${execpi 600 sed -n '33p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 340}${execpi 600 sed -n '37p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 400}${execpi 600 sed -n '41p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 460}${execpi 600 sed -n '45p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 520}${execpi 600 sed -n '49p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 580}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 640}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 700}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 760}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 820}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 880}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 940}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 1000}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw1}
${goto 100}${execpi 600 sed -n '22p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 160}${execpi 600 sed -n '26p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 220}${execpi 600 sed -n '30p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 280}${execpi 600 sed -n '34p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 340}${execpi 600 sed -n '38p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 400}${execpi 600 sed -n '42p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 460}${execpi 600 sed -n '46p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 520}${execpi 600 sed -n '50p' $HOME/1c_accuweather_images_hourly/hourly_raw0}${goto 580}${execpi 600 sed -n '23p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 640}${execpi 600 sed -n '27p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 700}${execpi 600 sed -n '31p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 760}${execpi 600 sed -n '35p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 820}${execpi 600 sed -n '39p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 880}${execpi 600 sed -n '43p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 940}${execpi 600 sed -n '47p' $HOME/1c_accuweather_images_hourly/hourly_raw1}${goto 1000}${execpi 600 sed -n '51p' $HOME/1c_accuweather_images_hourly/hourly_raw1}
${execpi 600 sed -n '1,21p' $HOME/1c_accuweather_images_hourly/altogether1}

Last edited by TeoBigusGeekus (2016-03-03 23:21:35)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#626 2016-03-03 14:51:18

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

@Teo   smile

perfect after second run.
I observe that today.   wink
grklrxb0

Thanks!

Offline

#627 2016-03-03 15:01:27

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

You're welcome, but now that I watch it closer it doesn't work too good for the US...


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#628 2016-03-03 17:00:25

ohnonot
...again
Registered: 2015-09-29
Posts: 5,592

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

TeoBigusGeekus wrote:

No, it's never been done.
Very interesting question though...
Do you have a specific site in mind?

yes, in the end i want to apply it to my weather conky + script.

i was thinking to reduce the back-in-time info to bare minimals.

thanks for the modded version, running it now, let's see what it does.

Last edited by ohnonot (2021-07-04 06:37:16)

Offline

#629 2016-03-03 18:45:10

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

For international stations it works well (as far as I've tested).

For US stations, the previous 8hours won't go beyond 00:00.
So, if it's 17:00, you have an hourly forecast from 17:00 up to 01:00 and the weather from 07:00 up to 17:00 (which is exactly want we want).
But... if it's, say 6:00, you have an hourly forecast from 6:00 up to 14:00 and the weather from 00:00 up to 06:00 (only 6 hours).


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#630 2016-03-03 21:06:26

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

For clarity, I have "Weather" placed at the intersection of 8 hours.
There is an error at the intersection of "UV index" line.
FAfoESUW

@Teo  cool
would be a 24 hour indicator better?

Offline

#631 2016-03-03 23:23:32

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Thanks unklar, I've corrected the post.

unklar wrote:

@Teo  cool
would be a 24 hour indicator better?

What do you mean?

I've just discovered that the problem described earlier about the US locations is present in the international ones as well... sad


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#632 2016-03-04 12:05:12

Sector11
Mod Squid Tpyo Knig
From: Upstairs
Registered: 2015-08-20
Posts: 8,011

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

OK, I'm playing with this.
2016_03_04_09_01_50_Scrot11.jpg
Will need to check for the timing restraints ${if_match ...} might be able to do something.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#633 2016-03-04 12:19:24

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Thanks.
Do you have any other site in mind?
About past weather I mean.


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#634 2016-03-04 20:02:09

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

TeoBigusGeekus wrote:

Thanks unklar, I've corrected the post.

perfect, Thanks! smile

TeoBigusGeekus wrote:
unklar wrote:

@Teo  cool
would be a 24 hour indicator better?

What do you mean?

I mean take
8am> 8:00
8pm> 20:00

or

8am> 8
8pm> 20 etc.

Offline

#635 2016-03-05 14:21:50

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

unklar wrote:

8am> 8:00
8pm> 20:00

or

8am> 8
8pm> 20 etc.

That's how Accuweather gives time, I can't interfere.

OK, new and enhanced versions:

1c script:

#!/bin/bash

#put your Accuweather address here
address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/en/us/los-angeles-ca/90012/weather-forecast/347625"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"

kill -STOP $(pidof conky)
killall wget
rm $HOME/1c_accuweather_images_hourly/*.png

wget --save-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw1 $addr1
 
#First 8hrs - hourly_raw1 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1 ]]; then
	sed -i -e '/"arrow-small-left">&lt; Previous 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/&amp;/and/g' -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '61,68s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	for (( i=21; i<=42; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1).png $HOME/1c_accuweather_images_hourly/$i.png
	  done
	for (( i=22; i<=51; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			fi
	  done
fi

addr2=$(sed -n 2p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw2 $addr2

#Next 8hrs - hourly_raw2 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/&amp;/and/g' -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2).png $HOME/1c_accuweather_images_hourly/$(( $i+100 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			fi
	  done
fi

addr0=$(sed -n 1p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw0 $addr0

#Previous 8hrs - hourly_raw0 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/&amp;/and/g' -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw0 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0).png $HOME/1c_accuweather_images_hourly/$(( $i+200 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw0
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw0
				i=$((i+1))
			fi
	  done
fi

# Full info, next 16h - altogether file
rm $HOME/1c_accuweather_images_hourly/altogether
#TIME
echo "\${color ffe595}TIME" > $HOME/1c_accuweather_images_hourly/altogether
start_line=3
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		time=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line++))
	done
start_line=2
for (( i=3; i<=10; i+=1 ))
	do
		time=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether
		jump_to=$(( jump_to+=60 ))
	done	
sed -i '1s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether
#IMAGES
start_image=21
jump_to=70
for (( i=1; i<9; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_image+=3))
	done
start_image=120
for (( i=1; i<9; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_image+=3))
	done
sed -i '2s/$/\n\n/' $HOME/1c_accuweather_images_hourly/altogether
#FORECAST - 1rst line
echo "FORECAST\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=22
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
start_line=21
for (( i=1; i<9; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
#FORECAST - 2nd line
sed -i '5s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether
start_line=23
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
start_line=22
for (( i=1; i<9; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
#TEMP
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "TEMP.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=53
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=52
for (( i=1; i<9; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#REALFEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "REALF.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=62
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=61
for (( i=1; i<9; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "HUMIDITY\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=71
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=70
for (( i=1; i<9; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "RAIN\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=80
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=79
for (( i=1; i<9; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "SNOW\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=89
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=88
for (( i=1; i<9; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "ICE\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=98
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=97
for (( i=1; i<9; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "WIND(km/h)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=107
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=106
for (( i=1; i<9; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "UV INDEX\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=116
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=115
for (( i=1; i<9; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "CLOUD COV.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=125
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=124
for (( i=1; i<9; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "DEW P.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=134
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=133
for (( i=1; i<9; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done



# Full info, previous 8h, next 8h - check forecast hours
current_time=$(sed -n 3p $HOME/1c_accuweather_images_hourly/hourly_raw1 | sed 's/^.*\://')
past_hours=0
i=2
test_hour=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0 | sed 's/^.*\://')
while [[ $current_time != $test_hour ]] && (( $i <= 9 ))
	do
		((past_hours++))
		((i++))
		test_hour=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0 | sed 's/^.*\://')
	done

# Full info, previous 8h, next 8h - altogether1 file
rm $HOME/1c_accuweather_images_hourly/altogether1

#TIME
echo "\${color ffe595}TIME" > $HOME/1c_accuweather_images_hourly/altogether1
start_line=2
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		time=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line++))
	done
for (( i=3; i<=10; i+=1 ))
	do
		time=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether1
		jump_to=$(( jump_to+=60 ))
	done	
sed -i '1s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether1
#IMAGES
start_image=220
jump_to=70
for (( i=0; i<$past_hours; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_image+=3))
	done
start_image=21
for (( i=1; i<9; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_image+=3))
	done
sed -i '2s/$/\n\n/' $HOME/1c_accuweather_images_hourly/altogether1
#FORECAST - 1rst line
echo "FORECAST\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=21
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=4))
	done
start_line=22
for (( i=1; i<9; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=4))
	done
#FORECAST - 2nd line
sed -i '5s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether1
start_line=22
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=4))
	done
start_line=23
for (( i=1; i<9; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=4))
	done
#TEMP
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "TEMP.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=52
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=53
for (( i=1; i<9; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#REALFEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "REALF.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=61
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=62
for (( i=1; i<9; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "HUMIDITY\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=70
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=71
for (( i=1; i<9; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "RAIN\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=79
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=80
for (( i=1; i<9; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "SNOW\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=88
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=89
for (( i=1; i<9; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "ICE\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=97
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=98
for (( i=1; i<9; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "WIND(km/h)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=106
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=107
for (( i=1; i<9; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "UV INDEX\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=115
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=116
for (( i=1; i<9; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "CLOUD COV.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=124
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=125
for (( i=1; i<9; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "DEW P.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
start_line=133
jump_to=100
for (( i=0; i<$past_hours; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
start_line=134
for (( i=1; i<9; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
	

kill -CONT $(pidof conky)

conkyrc for the next 16h:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 1030 300
maximum_width 1030

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

imlib_cache_size 0
text_buffer_size 4096

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}

${execpi 600 sed -n '1,26p' $HOME/1c_accuweather_images_hourly/altogether}

conkyrc for some past and the next 8 hours:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 500 300
maximum_width 1030

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

imlib_cache_size 0
text_buffer_size 4096

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}

${execpi 600 sed -n '1,26p' $HOME/1c_accuweather_images_hourly/altogether1}

Any feedback is welcome...


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#636 2016-03-05 19:47:38

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Hello @Teo,   smile

my test in the terminal results in two configuration files

snip]
$ conky -c ~/1c_accuweather_images_hourly/neu_8conky8_1c &
[1] 23940
Conky: use_spacer should have an argument of left, right, or none.  'yes' seems to be some form of 'true', so defaulting to right.
Conky: /home/unklar/1c_accuweather_images_hourly/neu_8conky8_1c: 37: no such configuration: 'border_margin'
[snip

after amendment on

use_spacer right
..
border_inner_margin

is that OK.

The script does not give the last line "DewPoint" and "CloudCov" shows:
UWCmrvpnThe terminal will continuously

Conky: unknown variable 
Conky: unknown variable 
...etc

I hope it helps.  wink

Offline

#637 2016-03-05 20:06:31

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Can you give me your location's address?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#638 2016-03-05 20:51:39

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

address="http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"

Offline

#639 2016-03-06 09:54:13

TeoBigusGeekus
BL DieHard
From: /Deutschland/Frankfurt_am_Main
Registered: 2015-10-04
Posts: 1,486

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

Another update.

1c script:

#!/bin/bash

#put your Accuweather address here
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="http://www.accuweather.com/en/us/anchorage-ak/99501/weather-forecast/346835"
address="http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
#address="http://www.accuweather.com/en/us/los-angeles-ca/90012/weather-forecast/347625"

loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')

curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"

kill -STOP $(pidof conky)
killall wget
rm $HOME/1c_accuweather_images_hourly/*.png

wget --save-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/curr_cond_raw $curr_addr
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw1 $addr1
 
#First 8hrs - hourly_raw1 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw1 ]]; then
	sed -i -e '/class="arrow-small-/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/&amp;/and/g' -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*bg-.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw1
	if (( $(grep http $HOME/1c_accuweather_images_hourly/hourly_raw1|wc -l)<2 )); then
		sed -i '1s/^/\n/' $HOME/1c_accuweather_images_hourly/hourly_raw1
	fi
	for (( i=21; i<=42; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1).png $HOME/1c_accuweather_images_hourly/$i.png
	  done
	for (( i=22; i<=51; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw1
				i=$((i+1))
			fi
	  done
fi

addr2=$(sed -n 2p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw2 $addr2

#Next 8hrs - hourly_raw2 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw2 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/&amp;/and/g' -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw2
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2).png $HOME/1c_accuweather_images_hourly/$(( $i+100 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw2|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw2
				i=$((i+1))
			fi
	  done
fi

addr0=$(sed -n 1p $HOME/1c_accuweather_images_hourly/hourly_raw1)
wget --load-cookies $HOME/1c_accuweather_images_hourly/cookie -O $HOME/1c_accuweather_images_hourly/hourly_raw0 $addr0

#Previous 8hrs - hourly_raw0 file
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	sed -i -e '/"arrow-small-right">Next 8 hours/,/"chart chart-top"/!d' -e 's/&#176;/°/g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i '/td style="border-right/d' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/&amp;/and/g' -e 's/^.*<th>//g' -e 's/^.*<td class="//g' -e 's/^.*<div class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw0 
	sed -i -e 's/ icon.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^">\|first-col">\|last-col">//g' -e 's/<\/td>.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e '60,67s/^.*>//g' -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*row">\|<\/th>//g' -e 's/&#174;\|&deg;//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<\/span><\/div>//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/">/\n/g' -e '/<tr\|<\/tr>/d' -e 's/" class="arrow-small-right.*$//g' -e 's/^.*<span>//g' -e 's/<\/span><br \/>/:/g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/<\/div>.*$//g' -e 's/^.*icon i-//g' -e '/<th class="first/d' -e 's/^.*<th class="//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/^.*<a href="//g' -e 's/" class=".*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e '/<\|;/d' -e 's/\r//g' -e '/^ *$/d' -e 's/^ *//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	sed -i -e 's/day.*$/day/g' -e 's/night.*$/night/g' -e 's/-h.*$//g' $HOME/1c_accuweather_images_hourly/hourly_raw0
	for (( i=20; i<=41; i+=3 ))
	  do
    	  cp $HOME/1c_accuweather_images_hourly/Forecast_Images/$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0).png $HOME/1c_accuweather_images_hourly/$(( $i+200 )).png
	  done
	for (( i=21; i<=50; i+=3 ))
	  do
		  no=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0|wc -c)
			if (( no<=7 )); then
				sed -i $i"s/$/\n/" $HOME/1c_accuweather_images_hourly/hourly_raw0
				i=$((i+1))
			elif (( no>7 )); then
				sed -i $i"s/^\(.\{7\}\)/\1\n/" $HOME/1c_accuweather_images_hourly/hourly_raw0
				i=$((i+1))
			fi
	  done
fi

# Full info, next 16h - altogether file
rm $HOME/1c_accuweather_images_hourly/altogether
#TIME
echo "\${color ffe595}TIME" > $HOME/1c_accuweather_images_hourly/altogether
start_line=3
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		time=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line++))
	done
start_line=2
for (( i=3; i<=10; i+=1 ))
	do
		time=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether
		jump_to=$(( jump_to+=60 ))
                ((start_line++))
	done	
sed -i '1s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether
#IMAGES
start_image=21
jump_to=70
for (( i=1; i<9; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_image+=3))
	done
start_image=120
for (( i=1; i<9; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_image+=3))
	done
sed -i '2s/$/\n\n/' $HOME/1c_accuweather_images_hourly/altogether
#FORECAST - 1rst line
echo "FORECAST\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=22
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
start_line=21
for (( i=1; i<9; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
#FORECAST - 2nd line
sed -i '5s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether
start_line=23
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
start_line=22
for (( i=1; i<9; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=4))
	done
#TEMP
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "TEMP.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=53
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=52
for (( i=1; i<9; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#REALFEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "REALF.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=62
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=61
for (( i=1; i<9; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "HUMIDITY\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=71
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=70
for (( i=1; i<9; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "RAIN\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=80
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=79
for (( i=1; i<9; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "SNOW\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=89
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=88
for (( i=1; i<9; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "ICE\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=98
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=97
for (( i=1; i<9; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "WIND(km/h)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=107
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=106
for (( i=1; i<9; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "UV INDEX\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=116
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=115
for (( i=1; i<9; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "CLOUD COV.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=125
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=124
for (( i=1; i<9; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether
echo "DEW P.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether
start_line=134
jump_to=100
for (( i=1; i<9; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done
start_line=133
for (( i=1; i<9; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw2)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether
		((jump_to+=60))
		((start_line+=1))
	done



# Full info, previous 8h, next 8h - check forecast hours
current_time=$(sed -n 3p $HOME/1c_accuweather_images_hourly/hourly_raw1 | sed 's/^.*\://')
past_hours=0
i=2
test_hour=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0 | sed 's/^.*\://')
while [[ $current_time != $test_hour ]] && (( $i <= 9 ))
	do
		((past_hours++))
		((i++))
		test_hour=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw0 | sed 's/^.*\://')
	done

# Full info, previous 8h, next 8h - altogether1 file
rm $HOME/1c_accuweather_images_hourly/altogether1

#TIME
echo "\${color ffe595}TIME" > $HOME/1c_accuweather_images_hourly/altogether1
start_line=2
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	for (( i=0; i<$past_hours; i+=1 ))
		do
			time=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line++))
		done
fi
for (( i=3; i<=10; i+=1 ))
	do
		time=$(sed -n ${i}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1c_accuweather_images_hourly/altogether1
		jump_to=$(( jump_to+=60 ))
	done	
sed -i '1s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether1
#IMAGES
jump_to=70
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_image=220
	for (( i=0; i<$past_hours; i+=1 ))
		do
			sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_image+=3))
		done
fi
start_image=21
for (( i=1; i<9; i+=1 ))
	do
		sed -i "2s/$/\${image \$HOME\/1c_accuweather_images_hourly\/$start_image.png -s 60x36 -p $jump_to,49}/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_image+=3))
	done
sed -i '2s/$/\n\n/' $HOME/1c_accuweather_images_hourly/altogether1
#FORECAST - 1rst line
echo "FORECAST\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=21
	for (( i=0; i<$past_hours; i+=1 ))
		do
			first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=4))
		done
fi
start_line=22
for (( i=1; i<9; i+=1 ))
	do
		first_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "5s/$/\${goto $jump_to}$first_line/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=4))
	done
#FORECAST - 2nd line
sed -i '5s/$/\n/' $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=22
	for (( i=0; i<$past_hours; i+=1 ))
		do
			second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=4))
		done
fi
start_line=23
for (( i=1; i<9; i+=1 ))
	do
		second_line=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "6s/$/\${goto $jump_to}$second_line/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=4))
	done
#TEMP
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "TEMP.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=52
	for (( i=0; i<$past_hours; i+=1 ))
		do
			temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=53
for (( i=1; i<9; i+=1 ))
	do
		temp=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "8s/$/\${goto $jump_to}$temp/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#REALFEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "REALF.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=61
	for (( i=0; i<$past_hours; i+=1 ))
		do
			rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=62
for (( i=1; i<9; i+=1 ))
	do
		rl_fl=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "10s/$/\${goto $jump_to}$rl_fl/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "HUMIDITY\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=70
	for (( i=0; i<$past_hours; i+=1 ))
		do
			hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=71
for (( i=1; i<9; i+=1 ))
	do
		hum=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "12s/$/\${goto $jump_to}$hum/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "RAIN\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=79
	for (( i=0; i<$past_hours; i+=1 ))
		do
			rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=80
for (( i=1; i<9; i+=1 ))
	do
		rain=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "14s/$/\${goto $jump_to}$rain/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "SNOW\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=88
	for (( i=0; i<$past_hours; i+=1 ))
		do
			snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=89
for (( i=1; i<9; i+=1 ))
	do
		snow=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "16s/$/\${goto $jump_to}$snow/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "ICE\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=97
	for (( i=0; i<$past_hours; i+=1 ))
		do
			ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=98
for (( i=1; i<9; i+=1 ))
	do
		ice=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "18s/$/\${goto $jump_to}$ice/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "WIND(km/h)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=106
	for (( i=0; i<$past_hours; i+=1 ))
		do
			wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=107
for (( i=1; i<9; i+=1 ))
	do
		wind=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "20s/$/\${goto $jump_to}$wind/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "UV INDEX\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=115
	for (( i=0; i<$past_hours; i+=1 ))
		do
			uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=116
for (( i=1; i<9; i+=1 ))
	do
		uv_index=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "22s/$/\${goto $jump_to}$uv_index/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "CLOUD COV.\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=124
	for (( i=0; i<$past_hours; i+=1 ))
		do
			cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=125
for (( i=1; i<9; i+=1 ))
	do
		cloud_cover=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "24s/$/\${goto $jump_to}$cloud_cover/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1c_accuweather_images_hourly/altogether1
echo "DEW P.(°C)\${color}" >> $HOME/1c_accuweather_images_hourly/altogether1
jump_to=100
if [[ -s $HOME/1c_accuweather_images_hourly/hourly_raw0 ]]; then
	start_line=133
	for (( i=0; i<$past_hours; i+=1 ))
		do
			dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw0)
			sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether1
			((jump_to+=60))
			((start_line+=1))
		done
fi
start_line=134
for (( i=1; i<9; i+=1 ))
	do
		dew_point=$(sed -n ${start_line}p $HOME/1c_accuweather_images_hourly/hourly_raw1)
		sed -i "26s/$/\${goto $jump_to}$dew_point/" $HOME/1c_accuweather_images_hourly/altogether1
		((jump_to+=60))
		((start_line+=1))
	done
	

kill -CONT $(pidof conky)

16h forecast conkyrc:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 1030 300
maximum_width 1030

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

imlib_cache_size 0
text_buffer_size 4096

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}

${execpi 600 sed -n '1,26p' $HOME/1c_accuweather_images_hourly/altogether}

8h past weather + 8h forecast conkyrc:

# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager

# Use double buffering (reduces flicker, may not work for everyone)
double_buffer yes

# fiddle with window
use_spacer yes
use_xft yes

# Update interval in seconds
update_interval 3

# Minimum size of text area
minimum_size 500 300
maximum_width 1030

override_utf8_locale yes

# Draw shades?
draw_shades yes

# Text stuff
draw_outline yes # amplifies text if yes
draw_borders no
#font freesans -12
xftfont Arial:size=9
uppercase no # set to yes if you want all text to be in uppercase

# Stippled borders?
stippled_borders 3

# border margins
border_margin 9

# border width
border_width 10

# Default colors and also border colors, grey90 == #e5e5e5
default_color cbcbcb

own_window_colour brown

# Text alignment, other possible values are commented
#alignment top_left
alignment top_right
#alignment bottom_left
#alignment bottom_right

# Gap between borders of screen and text
gap_x 10
gap_y 30

imlib_cache_size 0
text_buffer_size 4096

# stuff after 'TEXT' will be formatted on screen
TEXT
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1c_accuweather_images_hourly/1c}

${execpi 600 sed -n '1,26p' $HOME/1c_accuweather_images_hourly/altogether1}

It should now work 24h per day, even when there is no past weather info (12:00am).

Anchorage, Alaska - 12:00am:
4MyP1NQt.jpg

Los Angeles, California - 01:00am:
Ky2pDMet.jpg

Lichtenstein, Germany - 10:00am:
BCpfNjct.jpg

Last edited by TeoBigusGeekus (2016-03-07 13:06:12)


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#640 2016-03-06 22:12:02

unklar
Back to the roots 1.9
From: #! BL
Registered: 2015-10-31
Posts: 2,648

Re: Conky weather+moon scripts (Accuw/WUndergr/NWS/MoonGiant)

@Teo,

Unfortunately, I have both errors. hmm
fNzEeiVm EPuKB5dk

Offline

Board footer

Powered by FluxBB