You are not logged in.
Alright (deep breath)...
Create a folder in your home directory and name it
1_accuweather
Create another folder inside it and name it
Forecast_Images_2016
Go into that folder and run the following script:
#!/bin/bash
for (( i=1; i<=9; i++ ))
do
wget -O $i.svg http://vortex.accuweather.com/adc2010/images/slate/icons/0$i.svg
done
for (( i=10; i<=44; i++ ))
do
wget -O $i.svg http://vortex.accuweather.com/adc2010/images/slate/icons/$i.svg
done
This will download all the new images into that folder.
Provided you have imagemagick installed, run the following script
#!/bin/bash
for i in *.svg
do
fn=$(basename "$i")
echo $i
n=${fn%.*}
convert -background none "$n".svg "$n".png
done
inside the folder to convert all svg images to png format (conky doesn't support svg unfortunately).
The good news is that the new images are gorgeous and also that they are the same with the old ones (ie. 1.png from the old images describes the same weather as 1.png from the new images). Therefore, in the new script, you can either use the old or the new images, it makes no difference.
You just change the folder name to wherever you have saved the old images and you're good to go.
Now go into the 1_accuweather folder.
The new script is the following:
#!/bin/bash
if (( $# < 1 )); then
exit
fi
#put your Accuweather address here
#address="http://www.accuweather.com/en/us/new-york-ny/10017/weather-forecast/349727"
address="http://www.accuweather.com/en/us/los-angeles-ca/90012/weather-forecast/347625"
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')
###################################################
#NORMAL FORECAST: -f passed as 1rst or 2nd argument
###################################################
if [[ $1 == -f || $2 == -f ]]; then
#function: test_image
test_image () {
case $1 in
1)
echo a
;;
2|3)
echo b
;;
4|5)
echo c
;;
6)
echo d
;;
7)
echo e
;;
8)
echo f
;;
11)
echo 0
;;
12)
echo h
;;
13|14)
echo g
;;
15)
echo m
;;
16|17)
echo k
;;
18)
echo i
;;
19)
echo q
;;
20|21|23)
echo o
;;
22)
echo r
;;
24|31)
echo E
;;
25)
echo v
;;
26)
echo x
;;
29)
echo y
;;
30)
echo 5
;;
32)
echo 6
;;
33)
echo A
;;
34|35)
echo B
;;
36|37)
echo C
;;
38)
echo D
;;
39|40)
echo G
;;
41|42)
echo K
;;
43|44)
echo O
;;
*)
echo -
;;
esac
}
kill -STOP $(pidof conky)
killall wget
curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
wget -O $HOME/1_accuweather/curr_cond_raw "$curr_addr"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
wget -O $HOME/1_accuweather/first_days_raw "$addr1"
addr2="$addr1"?day=6
wget -O $HOME/1_accuweather/last_days_raw "$addr2"
rm $HOME/1_accuweather/*.png
#current conditions
if [[ -s $HOME/1_accuweather/curr_cond_raw ]]; then
sed -i '/detail-now/,/Astronomy <span class/!d' $HOME/1_accuweather/curr_cond_raw
egrep -i '"cond"|icon i-|large-temp|small-temp|wind-point|"wind"|Humidity|Pressure|UV Index|Cloud Cover|Ceiling|Dew Point|Visibility|Duration|Sunrise:|Sunset:|Moonrise:|Moonset:' $HOME/1_accuweather/curr_cond_raw > $HOME/1_accuweather/curr_cond
sed -i -e 's/^.*<strong>//g' -e 's/^.*<span>//g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*<\/em> //g' -e 's/^.*"cond">//g' -e 's/^.*wind-point //g' $HOME/1_accuweather/curr_cond
sed -i -e 's/">.*$//g' -e 's/°.*$//g' -e 's/<\/span>.*$//g' -e 's/&#.*$//g' -e 's/ &darr.*$//g' -e 's/ &uarr.*$//g' -e 's/<\/strong>.*$//g' $HOME/1_accuweather/curr_cond
sed -i '1s/-.*$//' $HOME/1_accuweather/curr_cond
image=$(sed -n 1p $HOME/1_accuweather/curr_cond)
echo $(test_image $image) >> $HOME/1_accuweather/curr_cond
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/0.png
fi
#First 5 days
if [[ -s $HOME/1_accuweather/first_days_raw ]]; then
sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/first_days_raw
egrep -i 'href="#"|icon i-|"large-temp"|"small-temp"|temp-label|"cond"' $HOME/1_accuweather/first_days_raw > $HOME/1_accuweather/first_days
sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' -e 's/^.*"temp-label tonight selected">//g' $HOME/1_accuweather/first_days
sed -i -e 's/°.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/first_days
sed -i -e 's/Mon/Monday/' -e 's/Tue/Tuesday/' -e 's/Wed/Wednesday/' -e 's/Thu/Thursday/' -e 's/Fri/Friday/' -e 's/Sat/Saturday/' -e 's/Sun/Sunday/' $HOME/1_accuweather/first_days
for (( i=2; i<=22; i+=5 ))
do
image=$(sed -n "${i}"p $HOME/1_accuweather/first_days)
echo $(test_image $image) >> $HOME/1_accuweather/first_days
done
j=1
for (( i=2; i<=22; i+=5 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/$j.png
((j++))
done
fi
#Next 5 days
if [[ -s $HOME/1_accuweather/last_days_raw ]]; then
sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/last_days_raw
egrep -i 'href="#"|icon i-|large-temp|small-temp|temp-label|"cond"' $HOME/1_accuweather/last_days_raw > $HOME/1_accuweather/last_days
sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' $HOME/1_accuweather/last_days
sed -i -e 's/°.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/last_days
sed -i -e 's/Mon/Monday/' -e 's/Tue/Tuesday/' -e 's/Wed/Wednesday/' -e 's/Thu/Thursday/' -e 's/Fri/Friday/' -e 's/Sat/Saturday/' -e 's/Sun/Sunday/' $HOME/1_accuweather/last_days
for (( i=2; i<=22; i+=5 ))
do
image=$(sed -n "${i}"p $HOME/1_accuweather/last_days)
echo $(test_image $image) >> $HOME/1_accuweather/last_days
done
j=6
for (( i=2; i<=22; i+=5 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/$j.png
((j++))
done
fi
if [[ $1 != -h && $2 != -h ]]; then
kill -CONT $(pidof conky)
fi
fi
###################################################
#HOURLY FORECAST: -h passed as 1rst or 2nd argument
###################################################
if [[ $1 == -h || $2 == -h ]]; then
#Hourly: First 8h
if [[ $1 != -f && $2 != -f ]]; then
kill -STOP $(pidof conky)
fi
killall wget
rm $HOME/1_accuweather/hourly_*.png
hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
wget -O $HOME/1_accuweather/hourly_raw1 "$hourly_addr1"
if [[ -s $HOME/1_accuweather/hourly_raw1 ]]; then
sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw1
egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw1 > $HOME/1_accuweather/hourly1
sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly1
sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly1
j=1
for (( i=4; i<=18; i+=2 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_$j.png
((j++))
done
fi
#Hourly: Next 8h
hourly_addr2=$(sed -n 1p $HOME/1_accuweather/hourly1)
wget -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr2"
if [[ -s $HOME/1_accuweather/hourly_raw2 ]]; then
sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw2
egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw2 > $HOME/1_accuweather/hourly2
sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly2
sed -i 1d $HOME/1_accuweather/hourly2
sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly2
j=9
for (( i=4; i<=18; i+=2 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_$j.png
((j++))
done
fi
# Full info, next 16h - altogether16 file
rm $HOME/1_accuweather/altogether16
#TIME
echo "\${color ffe595}TIME\${goto 100}" > $HOME/1_accuweather/altogether16
sed -i "1s/$/$(sed -n 2p $HOME/1_accuweather/hourly1):$(sed -n 3p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
jump_to=160
for (( i=5; i<=17; i+=2 ))
do
time=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i "1s/$/\${goto 580}$(sed -n 2p $HOME/1_accuweather/hourly2):$(sed -n 3p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
jump_to=640
for (( i=5; i<=17; i+=2 ))
do
time=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i '1s/$/\n/' $HOME/1_accuweather/altogether16
#IMAGES
jump_to=85
for (( i=1; i<=16; i+=1 ))
do
sed -i "2s/$/\${image \$HOME\/1_accuweather\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i '1s/$/\n\n/' $HOME/1_accuweather/altogether16
#FORECAST
echo "FORECAST\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i '5s/$/\n/' $HOME/1_accuweather/altogether16
jump_to=100
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#TEMPERATURE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "TEMPER.\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=29; i<=36; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=29; i<=36; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#REAL FEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "REAL FEEL\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=38; i<=45; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=38; i<=45; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "WIND\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=47; i<=54; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=47; i<=54; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "RAIN\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=64; i<=71; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=64; i<=71; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "SNOW\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=73; i<=80; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=73; i<=80; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "ICE\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=82; i<=89; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=82; i<=89; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "UV INDEX\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=99; i<=106; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=99; i<=106; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "CLOUD COV.\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=108; i<=115; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=108; i<=115; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "HUMIDITY\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=117; i<=124; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=117; i<=124; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "DEW POINT\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=126; i<=133; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=126; i<=133; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
kill -CONT $(pidof conky)
fi
I have merged the 1a, 1b and 1c scripts.
Name the new script 1_accuweather and use it with the argument -f, -h, or both.
-f downloads info about current conditions and a 10 days forecast, what the 1a and 1b scripts used to do
-h downloads hourly weather for the next 16 hours (unfortunately I can't find the previous 8 hours), i.e. the old 1c script
namely:
./1_accuweather -f -h
or
./1_accuweather -h -a
Download everything, 10days' and 16hours' forecast
./1_accuweather -f
Download only the 10days' forecast
./1_accuweather -h
Download only the 16hours' forecast
If you pass no arguments to the script, it will exit without doing anything.
The hourly forecast will create a file called altogether16, ready to be called by a single execpi command.
Conky for the hourly forecast:
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
-- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
-- fiddle with window
use_spacer = 'yes',
use_xft = true,
-- Update interval in seconds
update_interval = 3,
-- Minimum size of text area
minimum_width = 1030, minimum_height = 300,
maximum_width = 1030,
override_utf8_locale = true,
-- Draw shades?
draw_shades = true,
-- Text stuff
draw_outline = true,-- amplifies text if yes
draw_borders = false,
--font freesans -12
font = 'Arial:size=9',
uppercase = false,-- 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
};
conky.text = [[
${font Arial:size=11}${color ffe595}HOURLY WEATHER ${font}${hr 2}${texeci 600 bash $HOME/1_accuweather/1_accuweather -h}
${execpi 600 sed -n '1,26p' $HOME/1_accuweather/altogether16}
]];
I tried to keep most of the things of the previous scripts. However, in some cases it hasn't been possible.
For example, what in the 1b scripts used to be the TODAY and TONIGHT forecasts are now gone, to be replaced by the next two
days' forecast (or TONIGHT and the day after, you get the idea).
Sorry for that, it was extremely difficult to keep it as it was.
Later, or tomorrow, I'll post some conkyrcs for the former 1a and 1b scripts.
Enjoy...
EDIT: I'll probably abandon the C version. 1a_C_version was OK, but all the Accuweather scripts combined,... er... no.
EDIT2: I didn't mention it, but it goes without saying: any kind of testing is appreciated TIA
Last edited by TeoBigusGeekus (2017-07-23 07:04:48)
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
@Teo - Looking forward to doing a 'conky-companion' for the new script.
How are you doing my friend, long time no post.
I really hope you're well!
Help keep Teo on his toes. I did not say that I did not, someone hi-jacked my keyboard. ]:D
As if I don't want it
Besides, I had started to get a bit rusty...
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
I saw this in an email announcement and immediately lost internet connection because my wife was on the phone having WiFi activated here. Our old dumb phone died - now a paperweight in the desk. She has a new smartphone that needs WiFi. Damn company doesn't have a single dumb phone for sale, they have to squeeze every ¢ they can out of a customer. {sigh}
Doing fine here my friend... looking forward to doing a 'few'' companion conkys for the new script.
What don't you want? My keyboard ... you hi-jacked my keyboard. Bet if it was a list script (as in AutoCAD) You could write it in your sleep.
Starting now ...
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
What don't you want? My keyboard ... you hi-jacked my keyboard. Bet if it was a list script (as in AutoCAD) You could write it in your sleep.
Sorry S11, sometimes my English betray me and I just speak... Greeklish
I meant to say that I was asking for it.
As for the smartphones, just give it some time and you'll soon be a fanboy yourself...
Anyway...
What used to be the 1a conkyrc:
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
own_window_colour = 'brown',
-- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
-- fiddle with window
use_spacer = 'right',
use_xft = true,
-- Update interval in seconds
update_interval = 3.0,
-- Minimum size of text area
minimum_width = 280, minimum_height = 500,
maximum_width = 230,
override_utf8_locale = true,
-- Draw shades?
draw_shades = true,
-- Text stuff
draw_outline = true,-- amplifies text if yes
draw_borders = false,
--font freesans -12
font = 'Arial:size=9',
uppercase = false,-- set to yes if you want all text to be in uppercase
-- Stippled borders?
stippled_borders = 3,
-- border margins
border_inner_margin = 9,
border_outer_margin = 0,
-- border width
border_width = 10,
-- Default colors and also border colors, grey90 == #e5e5e5
default_color = '#cbcbcb',
-- 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,
-- stuff after 'TEXT' will be formatted on screen
};
conky.text = [[
${color 8e8e8e}WEATHER ${hr 2}$color${execi 600 bash $HOME/1_accuweather/1_accuweather -f}
${font conkyweather:size=40}${execi 600 sed -n '22p' ~/1_accuweather/curr_cond}${font}${goto 75}${voffset -40}CURRENTLY: ${execpi 600 sed -n '2p' $HOME/1_accuweather/curr_cond}°
${goto 75}${execpi 600 sed -n '4p' $HOME/1_accuweather/curr_cond|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '26p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '1p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '3p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '4p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '27p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '6p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '8p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '9p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '28p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '11p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '13p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '14p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '29p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '16p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '18p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '19p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '30p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '21p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '23p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '24p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '26p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '1p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '3p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '4p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '5p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '27p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '6p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '8p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '9p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '10p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '28p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '11p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '13p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '14p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '15p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '29p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '16p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '18p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '19p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '20p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=40}${execi 600 sed -n '30p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '21p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '23p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '24p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '25p' $HOME/1_accuweather/last_days|fold -w30}
]];
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
Sector11 wrote:What don't you want? My keyboard ... you hi-jacked my keyboard. Bet if it was a list script (as in AutoCAD) You could write it in your sleep.
Sorry S11, sometimes my English betray me and I just speak... Greeklish
Greeklish
I love it! Kinda like me with Spanglish, in a conversation I slipped one day and said, "Yo too!" for "Yo tambien!" (Me too!)
go figure. Now everyone in the family says "Yo too!" if I'm within earshot.
I was actually making a joke with you, I knew what you meant, it backfired - so it's my fault.
Besides what's an OOPS! between friends.
I meant to say that I was asking for it.
And Accuweather heard you and said "Teo needs practice - change things."
As for the smartphones, just give it some time and you'll soon be a fanboy yourself...
Anyway...
What used to be the 1a conkyrc:
http://i.imgur.com/FWb2oW0t.jpg
I won't use it enough to like / dislike it. I only ever 'carry' the phone if I'm out and my wife is at home in case of emergencies, rarely use it. It's hers. It was so confusing when she got home with it she had tears in her eyes ... had to give the "Calm down, it's new it will get better." talk and sure enough a few hours have passed, she's learned how to do a few things and is happier.
Got the code .. I'll be working with conky v1.9 though.
Debian 12 Beardog, SoxDog and still a Conky 1.9er
Offline
I was actually making a joke with you, I knew what you meant, it backfired - so it's my fault.
![]()
Besides what's an OOPS! between friends.
No worries mate, you don't have to apologize
Just download Angry Birds on your wife's phone: she's gonna change her mind completely about smart phones...
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
Offline
Kein Angst unklar, am Morgen werde ich es sehen.
What do you know, the Frankenconky works.
What used to be known as 1b1:
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
-- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
-- fiddle with window
use_spacer = 'yes',
use_xft = true,
-- Update interval in seconds
update_interval = 3,
-- Minimum size of text area
minimum_width = 360, minimum_height = 500,
maximum_width = 360,
override_utf8_locale = true,
-- Draw shades?
draw_shades = true,
-- Text stuff
draw_outline = true,-- amplifies text if yes
draw_borders = false,
--font freesans -12
font = 'Arial:size=9',
uppercase = false,-- 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',
own_window_transparent = true,
-- 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,
-- stuff after 'TEXT' will be formatted on screen
};
conky.text = [[
${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texeci 500 bash $HOME/1_accuweather/1_accuweather -f}
${image $HOME/1_accuweather/0.png -p 0,40 -s 170x170}
${font Arial:size=10}${execpi 600 sed -n '4p' $HOME/1_accuweather/curr_cond}${font}${goto 200}${color ffe595}TEMPERATURE: $color${alignr}${execpi 600 sed -n '2p' $HOME/1_accuweather/curr_cond}° (${execpi 600 sed -n '3p' $HOME/1_accuweather/curr_cond}°)
${goto 200}${color ffe595}WIND SPEED: $color${alignr}${execpi 600 sed -n '5p' $HOME/1_accuweather/curr_cond} ${execpi 600 sed -n '6p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}HUMIDITY: $color${alignr}${execpi 600 sed -n '7p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}PRESSURE: $color${alignr}${execpi 600 sed -n '8p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}UV INDEX: $color${alignr}${execpi 600 sed -n '9p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}CLOUC COVER: $color${alignr}${execpi 600 sed -n '10p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}CEILING: $color${alignr}${execpi 600 sed -n '11p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}DEW POINT: $color${alignr}${execpi 600 sed -n '12p' $HOME/1_accuweather/curr_cond}°
${goto 200}${color ffe595}VISIBILITY: $color${alignr}${execpi 600 sed -n '13p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}SUN R/S: $color${alignr}${execpi 600 sed -n '14p' $HOME/1_accuweather/curr_cond}/${execpi 600 sed -n '15p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}SUN DUR: $color${alignr}${execpi 600 sed -n '16p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}MOON R/S: $color${alignr}${execpi 600 sed -n '18p' $HOME/1_accuweather/curr_cond}/${execpi 600 sed -n '19p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}MOON DUR: $color${alignr}${execpi 600 sed -n '20p' $HOME/1_accuweather/curr_cond}
${hr 1}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '1p' $HOME/1_accuweather/first_days}${goto 145}${execpi 600 sed -n '6p' $HOME/1_accuweather/first_days}${goto 270}${execpi 600 sed -n '11p' $HOME/1_accuweather/first_days}$color$font${image $HOME/1_accuweather/1.png -p 0,245 -s 80x80}${image $HOME/1_accuweather/2.png -p 110,245 -s 80x80}${image $HOME/1_accuweather/3.png -p 230,245 -s 80x80}
${goto 100}${execpi 600 sed -n '3p' $HOME/1_accuweather/first_days}°${goto 210}${execpi 600 sed -n '8p' $HOME/1_accuweather/first_days}°${goto 330}${execpi 600 sed -n '13p' $HOME/1_accuweather/first_days}°
${goto 100}/${execpi 600 sed -n '4p' $HOME/1_accuweather/first_days}°${goto 210}/${execpi 600 sed -n '9p' $HOME/1_accuweather/first_days}°${goto 330}/${execpi 600 sed -n '14p' $HOME/1_accuweather/first_days}°
${font Arial:size=8}${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 135}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 255}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c1-20}
${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 135}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 255}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c21-40}$font
${hr 1}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '16p' $HOME/1_accuweather/first_days}${goto 145}${execpi 600 sed -n '21p' $HOME/1_accuweather/first_days}${goto 270}${execpi 600 sed -n '1p' $HOME/1_accuweather/last_days}$color$font${image $HOME/1_accuweather/4.png -p 0,385 -s 80x80}${image $HOME/1_accuweather/5.png -p 110,385 -s 80x80}${image $HOME/1_accuweather/6.png -p 230,385 -s 80x80}
${goto 100}${execpi 600 sed -n '18p' $HOME/1_accuweather/first_days}°${goto 210}${execpi 600 sed -n '23p' $HOME/1_accuweather/first_days}°${goto 330}${execpi 600 sed -n '3p' $HOME/1_accuweather/last_days}°
${goto 100}/${execpi 600 sed -n '19p' $HOME/1_accuweather/first_days}°${goto 210}/${execpi 600 sed -n '24p' $HOME/1_accuweather/first_days}°${goto 330}/${execpi 600 sed -n '4p' $HOME/1_accuweather/last_days}°
${font Arial:size=8}${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 135}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 255}${execpi 600 sed -n '5p' $HOME/1_accuweather/last_days|cut -c1-20}
${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 135}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 255}${execpi 600 sed -n '5p' $HOME/1_accuweather/last_days|cut -c21-40}$font
${hr 1}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '6p' $HOME/1_accuweather/last_days}${goto 145}${execpi 600 sed -n '11p' $HOME/1_accuweather/last_days}${goto 270}${execpi 600 sed -n '16p' $HOME/1_accuweather/last_days}$color$font${image $HOME/1_accuweather/7.png -p 0,525 -s 80x80}${image $HOME/1_accuweather/8.png -p 110,525 -s 80x80}${image $HOME/1_accuweather/9.png -p 230,525 -s 80x80}
${goto 100}${execpi 600 sed -n '8p' $HOME/1_accuweather/last_days}°${goto 210}${execpi 600 sed -n '13p' $HOME/1_accuweather/last_days}°${goto 330}${execpi 600 sed -n '18p' $HOME/1_accuweather/last_days}°
${goto 100}/${execpi 600 sed -n '9p' $HOME/1_accuweather/last_days}°${goto 210}/${execpi 600 sed -n '14p' $HOME/1_accuweather/last_days}°${goto 330}/${execpi 600 sed -n '19p' $HOME/1_accuweather/last_days}°
${font Arial:size=8}${execpi 600 sed -n '10p' $HOME/1_accuweather/last_days|cut -c1-20}${goto 135}${execpi 600 sed -n '15p' $HOME/1_accuweather/last_days|cut -c1-20}${goto 255}${execpi 600 sed -n '20p' $HOME/1_accuweather/last_days|cut -c1-20}
${execpi 600 sed -n '10p' $HOME/1_accuweather/last_days|cut -c21-40}${goto 135}${execpi 600 sed -n '15p' $HOME/1_accuweather/last_days|cut -c21-40}${goto 255}${execpi 600 sed -n '20p' $HOME/1_accuweather/last_days|cut -c21-40}$font
]];
Also, some minor corrections to the script:
#!/bin/bash
if (( $# < 1 )); then
exit
fi
#put your Accuweather address here
address="http://www.accuweather.com/en/us/new-york-ny/10017/weather-forecast/349727"
#address="http://www.accuweather.com/en/in/kolkata/206690/weather-forecast/206690"
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
loc_id=$(echo $address|sed 's/\/weather-forecast.*$//'|sed 's/^.*\///')
last_number=$(echo $address|sed 's/^.*\///')
###################################################
#NORMAL FORECAST: -f passed as 1rst or 2nd argument
###################################################
if [[ $1 == -f || $2 == -f ]]; then
#function: test_image
test_image () {
case $1 in
1)
echo a
;;
2|3)
echo b
;;
4|5)
echo c
;;
6)
echo d
;;
7)
echo e
;;
8)
echo f
;;
11)
echo 0
;;
12)
echo h
;;
13|14)
echo g
;;
15)
echo m
;;
16|17)
echo k
;;
18)
echo i
;;
19)
echo q
;;
20|21|23)
echo o
;;
22)
echo r
;;
24|31)
echo E
;;
25)
echo v
;;
26)
echo x
;;
29)
echo y
;;
30)
echo 5
;;
32)
echo 6
;;
33)
echo A
;;
34|35)
echo B
;;
36|37)
echo C
;;
38)
echo D
;;
39|40)
echo G
;;
41|42)
echo K
;;
43|44)
echo O
;;
*)
echo -
;;
esac
}
kill -STOP $(pidof conky)
killall wget
curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
wget -O $HOME/1_accuweather/curr_cond_raw "$curr_addr"
addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
wget -O $HOME/1_accuweather/first_days_raw "$addr1"
addr2="$addr1"?day=6
wget -O $HOME/1_accuweather/last_days_raw "$addr2"
rm $HOME/1_accuweather/*.png
#current conditions
if [[ -s $HOME/1_accuweather/curr_cond_raw ]]; then
sed -i '/detail-now/,/Astronomy <span class/!d' $HOME/1_accuweather/curr_cond_raw
egrep -i '"cond"|icon i-|large-temp|small-temp|wind-point|"wind"|Humidity|Pressure|UV Index|Cloud Cover|Ceiling|Dew Point|Visibility|Duration|Sunrise:|Sunset:|Moonrise:|Moonset:' $HOME/1_accuweather/curr_cond_raw > $HOME/1_accuweather/curr_cond
sed -i -e 's/^.*<strong>//g' -e 's/^.*<span>//g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*<\/em> //g' -e 's/^.*"cond">//g' -e 's/^.*wind-point //g' $HOME/1_accuweather/curr_cond
sed -i -e 's/">.*$//g' -e 's/°.*$//g' -e 's/<\/span>.*$//g' -e 's/&#.*$//g' -e 's/ &darr.*$//g' -e 's/ &uarr.*$//g' -e 's/<\/strong>.*$//g' $HOME/1_accuweather/curr_cond
sed -i '1s/-.*$//' $HOME/1_accuweather/curr_cond
image=$(sed -n 1p $HOME/1_accuweather/curr_cond)
echo $(test_image $image) >> $HOME/1_accuweather/curr_cond
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/0.png
fi
#First 5 days
if [[ -s $HOME/1_accuweather/first_days_raw ]]; then
sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/first_days_raw
egrep -i 'href="#"|icon i-|"large-temp"|"small-temp"|temp-label|"cond"' $HOME/1_accuweather/first_days_raw > $HOME/1_accuweather/first_days
sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' -e 's/^.*"temp-label tonight selected">//g' $HOME/1_accuweather/first_days
sed -i -e 's/°.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/first_days
sed -i -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' -e 's/Today$/TODAY/' -e 's/Tonight$/TONIGHT/' -e 's/Early AM/EARLY AM/' $HOME/1_accuweather/first_days
for (( i=2; i<=22; i+=5 ))
do
image=$(sed -n "${i}"p $HOME/1_accuweather/first_days)
echo $(test_image $image) >> $HOME/1_accuweather/first_days
done
j=1
for (( i=2; i<=22; i+=5 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/$j.png
((j++))
done
fi
#Next 5 days
if [[ -s $HOME/1_accuweather/last_days_raw ]]; then
sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/last_days_raw
egrep -i 'href="#"|icon i-|large-temp|small-temp|temp-label|"cond"' $HOME/1_accuweather/last_days_raw > $HOME/1_accuweather/last_days
sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' $HOME/1_accuweather/last_days
sed -i -e 's/°.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/last_days
sed -i -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' $HOME/1_accuweather/last_days
for (( i=2; i<=22; i+=5 ))
do
image=$(sed -n "${i}"p $HOME/1_accuweather/last_days)
echo $(test_image $image) >> $HOME/1_accuweather/last_days
done
j=6
for (( i=2; i<=22; i+=5 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/$j.png
((j++))
done
fi
if [[ $1 != -h && $2 != -h ]]; then
kill -CONT $(pidof conky)
fi
fi
###################################################
#HOURLY FORECAST: -h passed as 1rst or 2nd argument
###################################################
if [[ $1 == -h || $2 == -h ]]; then
#Hourly: First 8h
if [[ $1 != -f && $2 != -f ]]; then
kill -STOP $(pidof conky)
fi
killall wget
rm $HOME/1_accuweather/hourly_*.png
hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
wget -O $HOME/1_accuweather/hourly_raw1 "$hourly_addr1"
if [[ -s $HOME/1_accuweather/hourly_raw1 ]]; then
sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw1
egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw1 > $HOME/1_accuweather/hourly1
sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly1
sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly1
j=1
for (( i=4; i<=18; i+=2 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_$j.png
((j++))
done
fi
#Hourly: Next 8h
hourly_addr2=$(sed -n 1p $HOME/1_accuweather/hourly1)
wget -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr2"
if [[ -s $HOME/1_accuweather/hourly_raw2 ]]; then
sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw2
egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw2 > $HOME/1_accuweather/hourly2
sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly2
sed -i 1d $HOME/1_accuweather/hourly2
sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly2
j=9
for (( i=4; i<=18; i+=2 ))
do
cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_$j.png
((j++))
done
fi
# Full info, next 16h - altogether16 file
rm $HOME/1_accuweather/altogether16
#TIME
echo "\${color ffe595}TIME\${goto 100}" > $HOME/1_accuweather/altogether16
sed -i "1s/$/$(sed -n 2p $HOME/1_accuweather/hourly1):$(sed -n 3p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
jump_to=160
for (( i=5; i<=17; i+=2 ))
do
time=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i "1s/$/\${goto 580}$(sed -n 2p $HOME/1_accuweather/hourly2):$(sed -n 3p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
jump_to=640
for (( i=5; i<=17; i+=2 ))
do
time=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i '1s/$/\n/' $HOME/1_accuweather/altogether16
#IMAGES
jump_to=85
for (( i=1; i<=16; i+=1 ))
do
sed -i "2s/$/\${image \$HOME\/1_accuweather\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i '1s/$/\n\n/' $HOME/1_accuweather/altogether16
#FORECAST
echo "FORECAST\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $1}'|cut -c1-8)
sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
sed -i '5s/$/\n/' $HOME/1_accuweather/altogether16
jump_to=100
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=20; i<=27; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $2}'|cut -c1-8)
sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#TEMPERATURE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "TEMPER.\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=29; i<=36; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=29; i<=36; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#REAL FEEL
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "REAL FEEL\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=38; i<=45; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=38; i<=45; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#WIND
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "WIND\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=47; i<=54; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=47; i<=54; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#RAIN
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "RAIN\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=64; i<=71; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=64; i<=71; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#SNOW
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "SNOW\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=73; i<=80; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=73; i<=80; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#ICE
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "ICE\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=82; i<=89; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=82; i<=89; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#UV INDEX
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "UV INDEX\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=99; i<=106; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=99; i<=106; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#CLOUD COVER
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "CLOUD COV.\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=108; i<=115; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=108; i<=115; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#HUMIDITY
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "HUMIDITY\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=117; i<=124; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=117; i<=124; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
#DEW POINT
echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
echo "DEW POINT\${color}" >> $HOME/1_accuweather/altogether16
jump_to=100
for (( i=126; i<=133; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
for (( i=126; i<=133; i+=1 ))
do
messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
((jump_to+=60))
done
kill -CONT $(pidof conky)
fi
Goodnight...
Last edited by TeoBigusGeekus (2016-09-07 22:34:32)
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
@TeoBigusGeekus- Should we follow the procedure you outline here https://forums.bunsenlabs.org/viewtopic … 1003#p1003 regardless of which script we're running and then modify our .conkyrc to incorporate the changes outlined here https://forums.bunsenlabs.org/viewtopic … 1006#p1006? Thanks.
Offline
@TeoBigusGeekus- Should we follow the procedure you outline here https://forums.bunsenlabs.org/viewtopic … 1003#p1003 regardless of which script we're running and then modify our .conkyrc to incorporate the changes outlined here https://forums.bunsenlabs.org/viewtopic … 1006#p1006? Thanks.
Your links might be broken WaltH, if you could please correct them, thanks.
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
What was formerly known as 1b2:
conky.config = {
-- Create own window instead of using desktop (required in nautilus)
own_window = true,
own_window_type = 'override',
own_window_transparent = true,
own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
-- Use double buffering (reduces flicker, may not work for everyone)
double_buffer = true,
-- fiddle with window
use_spacer = 'yes',
use_xft = true,
-- Update interval in seconds
update_interval = 3,
-- Minimum size of text area
minimum_width = 360, minimum_height = 500,
maximum_width = 360,
override_utf8_locale = true,
-- Draw shades?
draw_shades = true,
-- Text stuff
draw_outline = true,-- amplifies text if yes
draw_borders = false,
--font freesans -12
font = 'Arial:size=9',
uppercase = false,-- 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',
own_window_transparent = true,
-- 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,
-- stuff after 'TEXT' will be formatted on screen
};
conky.text = [[
${font Arial:size=12}${color ffe595}WEATHER ${font}${hr 2}$color${texeci 500 bash $HOME/1_accuweather/1_accuweather -f}
${font Arial:size=10}${execpi 600 sed -n '4p' $HOME/1_accuweather/curr_cond}
${font conkyweather:size=130}${execi 600 sed -n '22p' $HOME/1_accuweather/curr_cond}${font}
${voffset -170}${font}${goto 200}${color ffe595}TEMPERATURE: $color${alignr}${execpi 600 sed -n '2p' $HOME/1_accuweather/curr_cond}° (${execpi 600 sed -n '3p' $HOME/1_accuweather/curr_cond}°)
${goto 200}${color ffe595}WIND SPEED: $color${alignr}${execpi 600 sed -n '5p' $HOME/1_accuweather/curr_cond} ${execpi 600 sed -n '6p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}HUMIDITY: $color${alignr}${execpi 600 sed -n '7p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}PRESSURE: $color${alignr}${execpi 600 sed -n '8p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}UV INDEX: $color${alignr}${execpi 600 sed -n '9p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}CLOUC COVER: $color${alignr}${execpi 600 sed -n '10p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}CEILING: $color${alignr}${execpi 600 sed -n '11p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}DEW POINT: $color${alignr}${execpi 600 sed -n '12p' $HOME/1_accuweather/curr_cond}°
${goto 200}${color ffe595}VISIBILITY: $color${alignr}${execpi 600 sed -n '13p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}SUN R/S: $color${alignr}${execpi 600 sed -n '14p' $HOME/1_accuweather/curr_cond}/${execpi 600 sed -n '15p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}SUN DUR: $color${alignr}${execpi 600 sed -n '16p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}MOON R/S: $color${alignr}${execpi 600 sed -n '18p' $HOME/1_accuweather/curr_cond}/${execpi 600 sed -n '19p' $HOME/1_accuweather/curr_cond}
${goto 200}${color ffe595}MOON DUR: $color${alignr}${execpi 600 sed -n '20p' $HOME/1_accuweather/curr_cond}
${hr 1}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '1p' $HOME/1_accuweather/first_days}${goto 145}${execpi 600 sed -n '6p' $HOME/1_accuweather/first_days}${goto 270}${execpi 600 sed -n '11p' $HOME/1_accuweather/first_days}$color$font
${font conkyweather:size=50}${execi 600 sed -n '26p' $HOME/1_accuweather/first_days}${goto 135}${execi 600 sed -n '27p' $HOME/1_accuweather/first_days}${goto 255}${execi 600 sed -n '28p' $HOME/1_accuweather/first_days}${font}
${voffset -45}${goto 100}${execpi 600 sed -n '3p' $HOME/1_accuweather/first_days}°${goto 210}${execpi 600 sed -n '8p' $HOME/1_accuweather/first_days}°${goto 330}${execpi 600 sed -n '13p' $HOME/1_accuweather/first_days}°
${goto 100}/${execpi 600 sed -n '4p' $HOME/1_accuweather/first_days}°${goto 210}/${execpi 600 sed -n '9p' $HOME/1_accuweather/first_days}°${goto 330}/${execpi 600 sed -n '14p' $HOME/1_accuweather/first_days}°
${font Arial:size=8}${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 135}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 255}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c1-20}
${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 135}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 255}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|cut -c21-40}$font
${hr 1}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '16p' $HOME/1_accuweather/first_days}${goto 145}${execpi 600 sed -n '21p' $HOME/1_accuweather/first_days}${goto 270}${execpi 600 sed -n '1p' $HOME/1_accuweather/last_days}$color$font
${font conkyweather:size=50}${execi 600 sed -n '29p' $HOME/1_accuweather/first_days}${goto 135}${execi 600 sed -n '30p' $HOME/1_accuweather/first_days}${goto 255}${execi 600 sed -n '26p' $HOME/1_accuweather/last_days}${font}
${voffset -45}${goto 100}${execpi 600 sed -n '18p' $HOME/1_accuweather/first_days}°${goto 210}${execpi 600 sed -n '23p' $HOME/1_accuweather/first_days}°${goto 330}${execpi 600 sed -n '3p' $HOME/1_accuweather/last_days}°
${goto 100}/${execpi 600 sed -n '19p' $HOME/1_accuweather/first_days}°${goto 210}/${execpi 600 sed -n '24p' $HOME/1_accuweather/first_days}°${goto 330}/${execpi 600 sed -n '4p' $HOME/1_accuweather/last_days}°
${font Arial:size=8}${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 135}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|cut -c1-20}${goto 255}${execpi 600 sed -n '5p' $HOME/1_accuweather/last_days|cut -c1-20}
${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 135}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|cut -c21-40}${goto 255}${execpi 600 sed -n '5p' $HOME/1_accuweather/last_days|cut -c21-40}$font
${hr 1}
${goto 40}${font Arial:size=10}${color ffe595}${execpi 600 sed -n '6p' $HOME/1_accuweather/last_days}${goto 145}${execpi 600 sed -n '11p' $HOME/1_accuweather/last_days}${goto 270}${execpi 600 sed -n '16p' $HOME/1_accuweather/last_days}$color$font
${font conkyweather:size=50}${execi 600 sed -n '27p' $HOME/1_accuweather/last_days}${goto 135}${execi 600 sed -n '28p' $HOME/1_accuweather/last_days}${goto 255}${execi 600 sed -n '29p' $HOME/1_accuweather/last_days}${font}
${voffset -45}${goto 100}${execpi 600 sed -n '8p' $HOME/1_accuweather/last_days}°${goto 210}${execpi 600 sed -n '13p' $HOME/1_accuweather/last_days}°${goto 330}${execpi 600 sed -n '18p' $HOME/1_accuweather/last_days}°
${goto 100}/${execpi 600 sed -n '9p' $HOME/1_accuweather/last_days}°${goto 210}/${execpi 600 sed -n '14p' $HOME/1_accuweather/last_days}°${goto 330}/${execpi 600 sed -n '19p' $HOME/1_accuweather/last_days}°
${font Arial:size=8}${execpi 600 sed -n '10p' $HOME/1_accuweather/last_days|cut -c1-20}${goto 135}${execpi 600 sed -n '15p' $HOME/1_accuweather/last_days|cut -c1-20}${goto 255}${execpi 600 sed -n '20p' $HOME/1_accuweather/last_days|cut -c1-20}
${execpi 600 sed -n '10p' $HOME/1_accuweather/last_days|cut -c21-40}${goto 135}${execpi 600 sed -n '15p' $HOME/1_accuweather/last_days|cut -c21-40}${goto 255}${execpi 600 sed -n '20p' $HOME/1_accuweather/last_days|cut -c21-40}$font
]];
DISCUSSION
Do we really need such a thing, now that the Accuweather images have become minimal?
Discuss.
Last edited by TeoBigusGeekus (2016-09-08 06:35:48)
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
hello guys
I haven't icons number
9 10 27 28
where can i found they ?
@+
Last edited by loutch (2016-09-08 08:15:56)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Don't worry, some icons are missing (9, 10, etc.) as with the old images.
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
Ok Théo
GREAT WORK
@+
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline
Kein Angst unklar, am Morgen werde ich es sehen.
Thank you for your humor. This builds on me.
I forgot my conkyrc
# pkill -xf "conky -q -c ~/1_accuweather/1a_DE_int_2.conky" &
## works perfect 2016
## Begin Window Settings
## Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager #,sticky
#own_window_colour 000000
own_window_class Conky
own_window_title conkyrc_1a_int_2
## ARGB can be used for real transparency
## NOTE that a composite manager is required for real transparency.
## This option will not work as desired (in most cases) in conjunction with
## own_window_type normal
own_window_argb_visual yes
## When ARGB visuals are enabled, this use this to modify the alpha value
## Use: own_window_type normal
## Use: own_window_transparent no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
own_window_argb_value 80
minimum_size 300 450 ## w|h
#maximum_width 250
gap_x 20 ## l|r
gap_y 45 ## u|d
alignment tr
## End Window Settings
## Font Settings
use_xft yes
xftfont Liberation Mono:bold:size=9
## Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 1.0
## Force UTF8? requires XFT
override_utf8_locale yes
uppercase no
## End Font Settings
## Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000
default_color DCDCDC ## 220 220 220 Gainsboro
color0 8FBC8F ## DarkSeaGreen
color1 778899 ## LightSlateGray
color2 F5F5DC ## Beige
color3 87CEFA ## LightSkyBlue
color4 48D1CC ## MediumTurquoise
color5 FFDEAD ## NavajoWhite
color6 00BFFF ## DeepSkyBlue
color7 B0E0E6 ## PowderBlue
color8 FFD700 ## Gold
color9 CD5C5C ## IndianRed
## End Color Settings
## Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 5
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders no
## default_graph_size 15 40
## End Borders Secton
## Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background yes
## Adds spaces around certain objects to stop them from moving other things
## around, this only helps if you are using a mono font
## Options: right, left or none
use_spacer none
## Default and Minimum is 256 - needs more for single commands that
## "call" a lot of text IE: bash scripts <<-- Teos scripts
## Increase if necessary
## text_buffer_size 256
## Subtract (file slystem) buffers from used memory?
no_buffers yes
## Use the Xdbe extension? (eliminates flicker)
## It is highly recommended to use own window with this one
## so double buffer won't be so big.
double_buffer yes
## End Miscellaneous Section
update_interval 1
#--Lua--#
lua_load ~/Lua/draw-bg.lua
# lua_draw_hook_post main
# lua_draw_hook_pre draw_bg 10 0 0 0 0 0x000000 0.2
TEXT
${lua conky_draw_bg 10 0 0 0 0 0x000000 0.2}
${execi 1600 bash $HOME/1_accuweather/1_accuweather -f}\
Wetter @ ${execpi 600 sed -n '2p' $HOME/1_accuweather/aktualisiert}\
${hr}
${font conkyweather:size=20}${execi 600 sed -n '22p' ~/1_accuweather/curr_cond}${font}${goto 75}${voffset -40}AKTUELL: ${execpi 600 sed -n '2p' $HOME/1_accuweather/curr_cond}°
${goto 75}${execpi 600 sed -n '4p' $HOME/1_accuweather/curr_cond|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '26p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '1p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '3p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '4p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '5p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '27p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '6p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '8p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '9p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '10p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '28p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '11p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '13p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '14p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '15p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '29p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '16p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '18p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '19p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '20p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '30p' ~/1_accuweather/first_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '21p' $HOME/1_accuweather/first_days}: ${execpi 600 sed -n '23p' $HOME/1_accuweather/first_days}°/${execpi 600 sed -n '24p' $HOME/1_accuweather/first_days}°
${goto 75}${execpi 600 sed -n '25p' $HOME/1_accuweather/first_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '26p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '1p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '3p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '4p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '5p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '27p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '6p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '8p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '9p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '10p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '28p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '11p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '13p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '14p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '15p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '29p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '16p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '18p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '19p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '20p' $HOME/1_accuweather/last_days|fold -w30}
${font conkyweather:size=20}${execi 600 sed -n '30p' ~/1_accuweather/last_days}${font}${goto 75}${voffset -40}${execpi 600 sed -n '21p' $HOME/1_accuweather/last_days}: ${execpi 600 sed -n '23p' $HOME/1_accuweather/last_days}°/${execpi 600 sed -n '24p' $HOME/1_accuweather/last_days}°
${goto 75}${execpi 600 sed -n '25p' $HOME/1_accuweather/last_days|fold -w30}
Offline
Do we really need such a thing, now that the Accuweather images have become minimal?
I do not understand...
Do you think these pictures? https://forums.mageia.org/de/viewtopic. … 100#p30058
Both look great with, the new images look crunchy on me.
Offline
No, I meant the old 1b1 and 1b2 scripts: they now look quite similar.
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
Ah, ok
Offline
@TeoBigusGeekus
A big, hearty THANK YOU! I used the previous version of your script + .conkyrc lines once they were posted on original Crunchbang forums and after Accuweather introduced changes few days ago I was super happy to see that you fixed the scripts already. You're a great guy!
Offline
hello guys
Théo great work my conky donne this
i try to ad mine french translation from 1b1_accuweather_images
## English to French
cp $HOME/1_accuweather/curr_cond $HOME/1_accuweather/curr_cond-fr
if [[ -s $HOME/1_accuweather/curr_cond-fr ]]; then
sed -i -e 's/Sunny/Ensoleillé/' $HOME/1_accuweather/curr_cond-fr
fi
sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' /$HOME/1_accuweather/curr_cond
after the dew point section & before
kill -CONT $(pidof conky)
fi
curr_cond-fr is not created & wind direction not in french .
i forget something but what ?
@+
Last edited by loutch (2016-09-08 13:00:06)
Linuxmint 22.1 Xia xfce & mageia 9 XFCE on ssd hp pavilion g7
Xubuntu 18.04 lts & 24.04 lts on ASUS Rog STRIX
Offline