You are not logged in.

#1261 2016-10-21 17:51:21

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)

@ragamatrix

${execi 600 bash /home/raphix/1_accuweather/1_accuweather -f2016}\

Must be sufficient   wink

Offline

#1262 2016-10-21 18:24:35

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

I am currently playing with S11 accu_cfl_companion.conky
The command is

${texeci 500 bash $HOME/1_accuweather/1_accuweather -f2015 -f2016 -h2015 -h2016}\

There are always two errors in the terminal:

...
2016-10-21 19:13:43 (1,12 MB/s) - »/home/unklar/1_accuweather/last_days_raw« gespeichert [113805]

rm: das Entfernen von „/home/unklar/1_accuweather/hourly_2015/forecast_*.png“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von „/home/unklar/1_accuweather/hourly_2016/forecast_*.png“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
--2016-10-21 19:13:43--  http://www.accuweather.com/en/de/lichtenstein/09350/hourly-weather-forecast/171261
...

However, the directory hourly_2015 and hourly_2016 does not include any forecast_ *.png
but hourly_ *.png

Do I see this right, that in your script the lines 384 and 387 are responsible?

The second error:

...
2016-10-21 19:13:44 (1,13 MB/s) - »/home/unklar/1_accuweather/hourly_raw2« gespeichert [128325]

rm: das Entfernen von „/home/unklar/1_accuweather/altogether16“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von „altogether16_2015“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von „altogether16_2016“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Conky: received SIGINT or SIGTERM to terminate. bye!

altogehter16 is not available, but altogether16_2015 and altogether16_2016 already

I can not find the cause.
The script is from 25-9-16

Last edited by unklar (2016-10-21 18:26:46)

Offline

#1263 2016-10-21 18:43:15

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

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

ragamatrix wrote:

^Sure but I mix things and the code is a bit messy...  :8
conkyHTC:

## pkill -xf "conky -q -c /media/5/conky/aaa-TEST/ConkyHTCSpill/conkyrc" &

But that line tells me exactly where it is on my system and how to kill it or start it.  smile

So I must bring it in line with the new script and will have it here very shortly - I too use conky v1.9

BRB


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1264 2016-10-21 18:48: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)

@unklar
Can you post your whole script?


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

#1265 2016-10-21 18:53:52

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

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

unklar wrote:

The script is from 25-9-16

Please NOT that this conky does NOT use any call to the internet.  It uses existing data, IF you want it to call the data you must include the call to gather the information:

TEXT
${texeci 500 bash $HOME/1_accuweather/1_accuweather -f2015 -f2016 -h2015 -h2016}\

... since I use that line in and actual conky it's not included here.

Hope that help.

Works perfect here, mine is dated: Edited Tue 27 Sep 2016 11:12:49

# pkill -xf "conky -q -c ~/1_accuweather/accu_cfl_companion.conky" &
# Edited Tue 27 Sep 2016 11:12:49
###  Begin Window Settings  ##################################################
own_window yes
own_window_type normal
own_window_transparent no #yes
own_window_hints skip_taskbar,skip_pager,above
own_window_colour 000000
own_window_class Conky
own_window_title 1 AccuWeather current first and last days
### ARGB can be used for real transparency
#  own_window_argb_visual yes # Options: yes or no
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#  own_window_argb_value 150

minimum_size 710 00
#maximum_width 0

gap_x 20	# l|r
gap_y 20	# u|d

alignment tr
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes

xftfont DejaVu Sans Mono:bold:size=8
xftalpha 1.0
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 # Gainsboro
color0 8FBC8F #DarkSeaGreen
color1 778899 #LightSlateGray
color2 FFA07A #LightSalmon
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 CD5C5C #IndianRed
#####################################################  End Color Settings  ###
border_inner_margin 5
border_outer_margin 0
background yes
use_spacer none
no_buffers yes
imlib_cache_size 0
double_buffer yes

update_interval 1


## ${texeci 500 bash $HOME/1_accuweather/1_accuweather -f2015 -f2016 -h2015 -h2016}\

TEXT
 ${time %T}${alignr}${time %x}
${alignc}UTC ${tztime UTC  %T}
${alignc}${time %z}

${alignc}1 Accuweather Current First and Last Days
${alignc}Edited: Mon 26 Sep 2016 19:57:31

Line numbers are equal to the 'p' values  ie: Line 14 as in: sed -n '14p'


curr_cond${goto 210}first_days${goto 475}last_days

↓↓ ←← Line Numbers${goto 210}↓↓ ←← Line Numbers${goto 475}↓↓ ←← Line Numbers
↓↓ - ↓Descrip↓     ↓Results↓${goto 210}↓↓ - ↓Descrip↓     ↓Results↓${goto 475}↓↓ - ↓Descrip↓     ↓Results↓
${membar 0,100}${goto 210}${membar 0,100}${goto 475}${membar 0,100}

01 - image number  ${pre_exec sed -n '1p' ~/1_accuweather/curr_cond}\
  ${goto 210}01 - Today/Tonight ${pre_exec sed -n '1p' ~/1_accuweather/first_days}\
    ${goto 475}01 - dayName       ${pre_exec sed -n '1p' ~/1_accuweather/last_days}
${color6}02 - temperature   ${pre_exec sed -n '2p' ~/1_accuweather/curr_cond}\
  ${goto 210}02 - Image number  ${pre_exec sed -n '2p' ~/1_accuweather/first_days}\
    ${goto 475}02 - Image Number  ${pre_exec sed -n '2p' ~/1_accuweather/last_days}${color}
03 - real feel     ${pre_exec sed -n '3p' ~/1_accuweather/curr_cond}\
  ${goto 210}03 - High          ${pre_exec sed -n '3p' ~/1_accuweather/first_days}\
    ${goto 475}03 - High          ${pre_exec sed -n '3p' ~/1_accuweather/last_days}
${color6}04 - forecast txt  ${pre_exec sed -n '4p' ~/1_accuweather/curr_cond | cut -c-20}\
  ${goto 210}04 - Low           ${pre_exec sed -n '4p' ~/1_accuweather/first_days}\
    ${goto 475}04 - Low           ${pre_exec sed -n '4p' ~/1_accuweather/last_days}${color}
05 - wind dir      ${pre_exec sed -n '5p' ~/1_accuweather/curr_cond}\
  ${goto 210}05 - Forecast txt  ${pre_exec sed -n '5p' ~/1_accuweather/first_days | cut -c-20}\
    ${goto 475}05 - Forecast txt  ${pre_exec sed -n '5p' ~/1_accuweather/last_days | cut -c-20}
${color6}06 - wind speed    ${pre_exec sed -n '6p' ~/1_accuweather/curr_cond}\
  ${goto 210}06 - dayName       ${pre_exec sed -n '6p' ~/1_accuweather/first_days}\
    ${goto 475}06 - dayName       ${pre_exec sed -n '6p' ~/1_accuweather/last_days}${color}
07 - humidity      ${pre_exec sed -n '7p' ~/1_accuweather/curr_cond}\
  ${goto 210}07 - Image Number  ${pre_exec sed -n '7p' ~/1_accuweather/first_days}\
    ${goto 475}07 - Image number  ${pre_exec sed -n '7p' ~/1_accuweather/last_days}
${color6}08 - Pressure      ${pre_exec sed -n '8p' ~/1_accuweather/curr_cond}\
  ${goto 210}08 - High          ${pre_exec sed -n '8p' ~/1_accuweather/first_days}\
    ${goto 475}08 - High          ${pre_exec sed -n '8p' ~/1_accuweather/last_days}${color}
09 - UV Index      ${pre_exec sed -n '9p' ~/1_accuweather/curr_cond}\
  ${goto 210}09 - Low           ${pre_exec sed -n '9p' ~/1_accuweather/first_days}\
    ${goto 475}09 - Low           ${pre_exec sed -n '9p' ~/1_accuweather/last_days}
${color6}10 - Cloud Cover   ${pre_exec sed -n '10p' ~/1_accuweather/curr_cond}\
  ${goto 210}10 - Forecast txt  ${pre_exec sed -n '10p' ~/1_accuweather/first_days | cut -c-20}\
    ${goto 475}10 - Forecast txt  ${pre_exec sed -n '10p' ~/1_accuweather/last_days | cut -c-20}${color}
11 - Ceiling       ${pre_exec sed -n '11p' ~/1_accuweather/curr_cond}\
  ${goto 210}11 - dayName       ${pre_exec sed -n '11p' ~/1_accuweather/first_days}\
    ${goto 475}11 - dayName       ${pre_exec sed -n '11p' ~/1_accuweather/last_days}
${color6}12 - Dew Point     ${pre_exec sed -n '12p' ~/1_accuweather/curr_cond}\
  ${goto 210}12 - image Number  ${pre_exec sed -n '12p' ~/1_accuweather/first_days}\
    ${goto 475}12 - image number  ${pre_exec sed -n '12p' ~/1_accuweather/last_days}${color}
13 - Visibility    ${pre_exec sed -n '13p' ~/1_accuweather/curr_cond}\
  ${goto 210}13 - High          ${pre_exec sed -n '13p' ~/1_accuweather/first_days}\
    ${goto 475}13 - High          ${pre_exec sed -n '13p' ~/1_accuweather/last_days}
${color6}14 - Sunrise AM    ${pre_exec sed -n '14p' ~/1_accuweather/curr_cond}\
  ${goto 210}14 - Low           ${pre_exec sed -n '14p' ~/1_accuweather/first_days}\
    ${goto 475}14 - Low           ${pre_exec sed -n '14p' ~/1_accuweather/last_days}${color}
15 - Sunset PM     ${pre_exec sed -n '15p' ~/1_accuweather/curr_cond}\
  ${goto 210}15 - Forecast txt  ${pre_exec sed -n '15p' ~/1_accuweather/first_days | cut -c-20}\
    ${goto 475}15 - Forecast txt  ${pre_exec sed -n '15p' ~/1_accuweather/last_days | cut -c-20}
${color6}16 - Sun Duration  ${pre_exec sed -n '16p' ~/1_accuweather/curr_cond}\
  ${goto 210}16 - dayName       ${pre_exec sed -n '16p' ~/1_accuweather/first_days}\
    ${goto 475}16 - dayName       ${pre_exec sed -n '16p' ~/1_accuweather/last_days}${color}
17 - NOT USED\
  ${goto 210}17 - Image number  ${pre_exec sed -n '17p' ~/1_accuweather/first_days}\
    ${goto 475}17 - Image number  ${pre_exec sed -n '17p' ~/1_accuweather/last_days}
${color6}18 - Moonrise A/PM ${pre_exec sed -n '18p' ~/1_accuweather/curr_cond}\
  ${goto 210}18 - High          ${pre_exec sed -n '18p' ~/1_accuweather/first_days}\
    ${goto 475}18 - High          ${pre_exec sed -n '18p' ~/1_accuweather/last_days}${color}
19 - Moonset A/PM  ${pre_exec sed -n '19p' ~/1_accuweather/curr_cond}\
  ${goto 210}19 - Low           ${pre_exec sed -n '19p' ~/1_accuweather/first_days}\
    ${goto 475}19 - Low           ${pre_exec sed -n '19p' ~/1_accuweather/last_days}
${color6}20 - Moon Duration ${pre_exec sed -n '20p' ~/1_accuweather/curr_cond}\
  ${goto 210}20 - Forecast txt  ${pre_exec sed -n '20p' ~/1_accuweather/first_days | cut -c-20}\
    ${goto 475}20 - Forecast txt  ${pre_exec sed -n '20p' ~/1_accuweather/last_days | cut -c-20}${color}
21 - NOT USED\
  ${goto 210}21 - dayName       ${pre_exec sed -n '21p' ~/1_accuweather/first_days}\
    ${goto 475}21 - dayName       ${pre_exec sed -n '21p' ~/1_accuweather/last_days}
${color6}22 - font image    ${pre_exec sed -n '22p' ~/1_accuweather/curr_cond}\
  ${goto 210}22 - Image number  ${pre_exec sed -n '22p' ~/1_accuweather/first_days}\
    ${goto 475}22 - Image number  ${pre_exec sed -n '22p' ~/1_accuweather/last_days}${color}
23 - Sunrise 24hr  ${pre_exec sed -n '23p' ~/1_accuweather/curr_cond}\
  ${goto 210}23 - High          ${pre_exec sed -n '23p' ~/1_accuweather/first_days}\
    ${goto 475}23 - High          ${pre_exec sed -n '23p' ~/1_accuweather/last_days}
${color6}24 - Sunset 24hr   ${pre_exec sed -n '24p' ~/1_accuweather/curr_cond}\
  ${goto 210}24 - Low           ${pre_exec sed -n '24p' ~/1_accuweather/first_days}\
    ${goto 475}24 - Low           ${pre_exec sed -n '24p' ~/1_accuweather/last_days}${color}
25 - Moonrise 24hr ${pre_exec sed -n '25p' ~/1_accuweather/curr_cond}\
  ${goto 210}25 - Forecast txt  ${pre_exec sed -n '25p' ~/1_accuweather/first_days | cut -c-20}\
    ${goto 475}25 - Forecast txt  ${pre_exec sed -n '25p' ~/1_accuweather/last_days | cut -c-20}
${color6}26 - Moonset 24hr  ${pre_exec sed -n '26p' ~/1_accuweather/curr_cond}\
  ${goto 210}26 - wFont Day 1   ${pre_exec sed -n '26p' ~/1_accuweather/first_days}\
    ${goto 475}26 - wFont Day 6   ${pre_exec sed -n '26p' ~/1_accuweather/last_days}${color}
27 - Font WinfDir  ${pre_exec sed -n '27p' ~/1_accuweather/curr_cond}\
  ${goto 210}27 - wFont Day 2   ${pre_exec sed -n '27p' ~/1_accuweather/first_days}\
    ${goto 475}27 - wFont Day 7   ${pre_exec sed -n '27p' ~/1_accuweather/last_days}
2015 Wind Rose${color6}  ${goto 210}28 - wFont Day 3   ${pre_exec sed -n '28p' ~/1_accuweather/first_days}\
    ${goto 475}28 - wFont Day 8   ${pre_exec sed -n '28p' ~/1_accuweather/last_days}${color}
  ${goto 210}29 - wFont Day 4   ${pre_exec sed -n '29p' ~/1_accuweather/first_days}\
    ${goto 475}29 - wFont Day 9   ${pre_exec sed -n '29p' ~/1_accuweather/last_days}
${color6}  ${goto 210}30 - wFont Day 5   ${pre_exec sed -n '30p' ~/1_accuweather/first_days}\
    ${goto 475}30 - wFont Day 10  ${pre_exec sed -n '30p' ~/1_accuweather/last_days}${color}${color}
${voffset -40}                        ${font ConkyWindNESW:size=40}${pre_exec sed -n '27p' ~/1_accuweather/curr_cond}${font}
${image /home/sector11/1_accuweather/forecast_2015/wind_0.png -p -5,470 -s 80x80}
${image /home/sector11/1_accuweather/forecast_2016/wind_0.png -p 80,490 -s 45x45}
                   2016 Windrose

If running with conky v1.10
Find: "${pre_exec sed"
Replace with: "${execi 86400 sed"


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1266 2016-10-21 19:10:27

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

#!/bin/bash


#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
} 


############################
# Check the user arguments #
############################

if (( $# < 1 || $# > 4 )); then
	echo "Invalid arguments!"
	exit
fi

forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0

for i in $*
	do 
		if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 ]]; then
			echo "Invalid arguments!"
			exit
		fi
		case $i in
			-f)
				forecast0=1
			;;
			-f2015)
				forecast2015=1
			;;
			-f2016)
				forecast2016=1
			;;
			-h)
				hourly0=1
			;;
			-h2015)
				hourly2015=1
			;;
			-h2016)
				hourly2016=1
			;;
		esac
	done
	
if [[ $forecast0 == 1 ]]; then
	forecast2015=0
	forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
	hourly2015=0
	hourly2016=0
fi


#Put your Accuweather address here
address="http://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
#address="http://www.accuweather.com/en/us/new-york-ny/10017/weather-forecast/349727"
#address="http://www.accuweather.com/en/jp/tokyo/226396/weather-forecast/226396"
#address="http://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"

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


#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then
	
	#function: convert_time
	convert_time () 
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		minutes=$(echo $1|awk -F ":| " '{print $2}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
		if [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:$minutes
		echo $time_24
	}
	
	#function: test_wind
	test_wind () {
	    case $1 in
	         CLM)
	           echo -
	         ;;
	         S)
	           echo 1 
	         ;;
	         SSW)
	           echo 2 
	         ;;
	         SW)
	           echo 3 
	         ;;
	         WSW)
	           echo 4 
	         ;;
	         W)
	           echo 5 
	         ;;
	         WNW)
	           echo 6 
	         ;;
	         NW)
	           echo 7 
	         ;;
	         NNW)
	           echo 8 
	         ;;
	         N)
	           echo 9 
	         ;;
	         NNE)
	           echo : 
	         ;;
	         NE)
	           echo ; 
	         ;;
	         ENE)
	           echo \< 
	         ;;
	         E)
	           echo = 
	         ;;
	         ESE)
	           echo \> 
	         ;;
	         SE)
	           echo ? 
	         ;;
	         SSE)
	           echo @ 
	         ;;
	    esac
	}
	
	kill -STOP $(pidof conky)
	
	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"
	
	if [[ $forecast2015 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2015/forecast_*.png
	fi
	if [[ $forecast2016 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2016/forecast_*.png
	fi
	
	#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/&deg.*$//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
		sunrise_time=$(sed -n 14p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 15p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 18p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 19p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		wind=$(sed -n 5p $HOME/1_accuweather/curr_cond)
		echo $(test_wind $wind) >> $HOME/1_accuweather/curr_cond
        if (( $(sed -n 14p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '14s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 15p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '15s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 18p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '18s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 19p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '19s/^/0/' $HOME/1_accuweather/curr_cond
		fi
	    if [[ $forecast2015 == 1 ]]; then
			cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/forecast_0.png
			cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/wind_0.png
		fi
		if [[ $forecast2016 == 1 ]]; then
			cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/forecast_0.png
			cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/wind_0.png
		fi
	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/&deg.*$//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
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=2; i<=22; i+=5 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	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/&deg.*$//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
		if [[ $forecast0 == 0 ]]; then
			j=6
			for (( i=2; i<=22; i+=5 ))
			  do
			    if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
	
	if [[ $hourly0 != 1 && $hourly2015 != 1 && $hourly2016 != 1 ]]; then
	date +%T > $HOME/1_accuweather/aktualisiert
		kill -CONT $(pidof conky)
	fi

fi


#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################
if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then

	#Hourly: First 8h
	
	if [[ $forecast0 != 1 && $forecast2015 != 1 && $forecast2016 != 1 ]]; then
		kill -STOP $(pidof conky)
	fi
	
	if [[ $hourly2015 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2015/forecast_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2016/forecast_*.png
	fi	
	
	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
		echo "ConkyWeather Font Icons" >> $HOME/1_accuweather/hourly1
		for (( i=4; i<=18; i+=2 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly1)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly1
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=4; i<=18; i+=2 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi	    	
		    	((j++))
			  done
		fi
	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
		echo "ConkyWeather Font Icons" >> $HOME/1_accuweather/hourly2
		for (( i=4; i<=18; i+=2 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly2)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly2
		  done
		if [[ $hourly0 == 0 ]]; then
			j=9
			for (( i=4; i<=18; i+=2 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi	    	
		    	((j++))
			  done
		fi
	fi
	
	
	# Full info, next 16h - altogether16 file
	rm $HOME/1_accuweather/altogether16 altogether16_2015 altogether16_2016
	
	#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\n\n/' $HOME/1_accuweather/altogether16
	
	#FORECAST
	echo "\${color ffe595}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
		
	#IMAGES
	if [[ $hourly0 == 0 ]]; then
		if [[ $hourly2015 == 1 ]]; then
					jump_to=75
					cp $HOME/1_accuweather/altogether16 $HOME/1_accuweather/altogether16_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
					jump_to=85
					cp $HOME/1_accuweather/altogether16 $HOME/1_accuweather/altogether16_2016
		fi
		rm $HOME/1_accuweather/altogether16
		for (( i=1; i<=16; i+=1 ))
			do
				if [[ $hourly2015 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16_2015
				fi
				if [[ $hourly2016 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16_2016
				fi			
				((jump_to+=60))
			done
	fi
	
	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/1_accuweather/altogether16
		jump_to=95
		for (( i=135; i<=142; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
				((jump_to+=60))
			done
		for (( i=135; i<=142; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
				((jump_to+=60))
			done
		sed -i '4s/$/\${font}/' $HOME/1_accuweather/altogether16
		sed -i '2,3d' $HOME/1_accuweather/altogether16
	fi
	
	kill -CONT $(pidof conky)
fi	

@Sector11   smile

that is correct conky_V1.9  wink
accu_cfl1-9companion.th.jpg

Offline

#1267 2016-10-21 19:30:17

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:

The second error:

...
2016-10-21 19:13:44 (1,13 MB/s) - »/home/unklar/1_accuweather/hourly_raw2« gespeichert [128325]

rm: das Entfernen von „/home/unklar/1_accuweather/altogether16“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von „altogether16_2015“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von „altogether16_2016“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
Conky: received SIGINT or SIGTERM to terminate. bye!

altogehter16 is not available, but altogether16_2015 and altogether16_2016 already

I can not find the cause.
The script is from 25-9-16

Not an error, the script, when it enters its HOURLY part, deletes all altogether files, existing or not.

But...

unklar wrote:

I am currently playing with S11 accu_cfl_companion.conky
The command is

${texeci 500 bash $HOME/1_accuweather/1_accuweather -f2015 -f2016 -h2015 -h2016}\

There are always two errors in the terminal:

...
2016-10-21 19:13:43 (1,12 MB/s) - »/home/unklar/1_accuweather/last_days_raw« gespeichert [113805]

rm: das Entfernen von „/home/unklar/1_accuweather/hourly_2015/forecast_*.png“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
rm: das Entfernen von „/home/unklar/1_accuweather/hourly_2016/forecast_*.png“ ist nicht möglich: Datei oder Verzeichnis nicht gefunden
--2016-10-21 19:13:43--  http://www.accuweather.com/en/de/lichtenstein/09350/hourly-weather-forecast/171261
...

However, the directory hourly_2015 and hourly_2016 does not include any forecast_ *.png
but hourly_ *.png

Do I see this right, that in your script the lines 384 and 387 are responsible?

That's definitely my mistake; the if commands should be

if [[ $hourly2015 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2015/hourly_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2016/hourly_*.png
	fi

Brilliant catch, wait for it...


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

#1268 2016-10-21 19:37:05

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

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

ANNOUNCEMENT

Tiny bug discovered by unklar (read from this onwards) in the 1_accuweather script.
Script corrected and rebundled. Those of you too lazy to download the whole thing, just replace lines 383-388 with the code from this post. Vielen Dank unklar for the sharp eyes.

Last edited by TeoBigusGeekus (2016-10-21 19:41:23)


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

#1269 2016-10-21 19:40:03

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

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

NICE Catch unklar!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1270 2016-10-21 19:48:25

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

These thanks I am happy to pass on Sector11.
It was due to his companion.conky...   wink

Last edited by unklar (2016-10-21 19:53:41)

Offline

#1271 2016-10-21 20:00:24

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

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

@ ragamatrix

OK, Here's the new one, redone and tweaked a little, I always tweak things, and made to work in $HOME/1_accuweather/ I  also put the four HTCSpill images in $HOME/1_accuweather/HTCimages/
2016_10_21_16_45_59_Scrot11.jpg
HTC Images: 1 2 3 & 4 for anyone that needs them.
NOTE: Images shows /home/sector11/ while the code below uses $HOME/ - Except for the pkill line!

$HOME/1_accuweather/HTCSpill.conky

## pkill -xf "conky -q -c /home/sector11/1_accuweather/HTCSpill.conky" &

## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title HTCSpill
## ARGB can be used for real transparency
# own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 100

# fold -sw36 requires this as a minimum:
#minimum_size 245 0
#maximum_width 245

minimum_size 235 240
maximum_width 235

gap_x 5	## l|r
gap_y 5	## u|d
alignment tr
## ---------- End Window Settings
## ---------- Font Settings
## Force UTF8? requires XFT
override_utf8_locale yes

## Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Liberation Mono:bold:size=8
#xftfont Fantasque Sans Mono:bold:size=9
#xftfont Monofur:bold:size=9
#xftfont DejaVu Sans Mono:bold:size=9

## Alpha of Xft font. Must be a value at or between 1 and 0
xftalpha 1.0

## --------- End Font Settings
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
## ---------- Begin Borders Section
#draw_borders yes
## Stippled borders?
#stippled_borders 5
## border margins
border_inner_margin 0
border_outer_margin 0
## border width
#border_width 2
## graph borders
#draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin 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

## Subtract (file slystem) buffers from used memory?
no_buffers yes

# Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value if
# you use $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0

# Interval (in seconds) to flush Imlib2 cache.
#imlib_cache_flush_interval 900

## Use the Xdbe extension? (eliminates flicker)
## It is highly reco${color}mmended to use own window with this one
## so double buffer won't be so big.
double_buffer yes

## ---------- End Miscellaneous Section

update_interval 1

#${execi 500 bash $HOME/1_accuweather/1_accuweather}\
TEXT
${execi 500 bash $HOME/1_accuweather/1_accuweather}\
${image $HOME/1_accuweather/HTCimages/base2.png -p -12,30 -s 260x145}\
${image $HOME/1_accuweather/HTCimages/base2.png -p -12,168 -s 260x70}\
${image $HOME/1_accuweather/HTCimages/flip_bg.png -p 18,7 -s 100x110}\
${image $HOME/1_accuweather/HTCimages/flip_bg.png -p 118,7 -s 100x110}\


${font LED_Mono:size=60}${color1}${goto 26}${time %H}${goto 126}${time %M}${font}
${goto 28}${execi 600 sed -n '28p' $HOME/1_accuweather/curr_cond|cut -c-13}\
${goto 130}${time %a} ${time %e} ${time %b} ${time %y}${color}

 Wind ${execi 600 sed -n '05p' $HOME/1_accuweather/curr_cond}\
${alignr 5}${execi 600 sed -n '02p' $HOME/1_accuweather/curr_cond}° \
${color2}±${execi 600 sed -n '03p' $HOME/1_accuweather/curr_cond}°${color}
${alignr 10}Hum ${execi 600 sed -n '07p' $HOME/1_accuweather/curr_cond}
 ${execi 600 sed -n '33p' $HOME/1_accuweather/curr_cond}\
${alignr 5}${color9}${execi 600 sed -n '03p' $HOME/1_accuweather/first_days}°  \
${color7}${execi 600 sed -n '04p' $HOME/1_accuweather/first_days}°${color}

${image $HOME/1_accuweather/forecast_2015/wind_0.png -p 12,110 -s 50x50}\
 @ ${execi 600 sed -n '06p' $HOME/1_accuweather/curr_cond}\
  ${alignr 5}${execi 600 sed -n '04p' $HOME/1_accuweather/curr_cond}\


${goto 12}${execi 600 sed -n '01p' $HOME/1_accuweather/first_days}\
${goto 58}${execi 600 sed -n '06p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 105}${execi 600 sed -n '11p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 150}${execi 600 sed -n '16p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 196}${execi 600 sed -n '21p' $HOME/1_accuweather/first_days|cut -c-3}
${image $HOME/1_accuweather/forecast_2015/forecast_0.png -p 55,103 -s 125x75}
${image $HOME/1_accuweather/forecast_2015/forecast_1.png -p 5,185 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_2.png -p 51,185 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_3.png -p 97,185 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_4.png -p 143,185 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_5.png -p 188,185 -s 50x30}

${goto 6}${execi 600 sed -n '03p' $HOME/1_accuweather/first_days}°/\
${execi 600 sed -n '04p' $HOME/1_accuweather/first_days}°\
${goto 52}${execi 600 sed -n '08p' $HOME/1_accuweather/first_days}°/\
${execi 600 sed -n '09p' $HOME/1_accuweather/first_days}°\
${goto 99}${execi 600 sed -n '13p' $HOME/1_accuweather/first_days}°/\
${execi 600 sed -n '14p' $HOME/1_accuweather/first_days}°\
${goto 144}${execi 600 sed -n '18p' $HOME/1_accuweather/first_days}°/\
${execi 600 sed -n '18p' $HOME/1_accuweather/first_days}°\
${goto 190}${execi 600 sed -n '23p' $HOME/1_accuweather/first_days}°/\
${execi 600 sed -n '24p' $HOME/1_accuweather/first_days}°

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1272 2016-10-21 20:05:44

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

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

Interesting - base3.png for the HTCSpill Clock - I like it!
2016_10_21_17_03_39_Scrot11.jpg


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1273 2016-10-21 20:15:05

ragamatrix
Member
Registered: 2015-10-04
Posts: 427

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

^Thanks a lot I'll play with it when I'll get more time... And for unklar advices too wink

Offline

#1274 2016-10-21 20:35:41

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)

ragamatrix wrote:

^Thanks a lot I'll play with it when I'll get more time... And for unklar advices too

We had already spoken of this.  cool

Offline

#1275 2016-10-21 20:36:41

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

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

unklar wrote:

@Teo

These thanks I am happy to pass on Sector11.
It was due to his companion.conky...   wink

You had it right the first time.   Sektor11 it is!

smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1276 2016-10-21 20:40:06

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

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

unklar wrote:
ragamatrix wrote:

^Thanks a lot I'll play with it when I'll get more time... And for unklar advices too

We had already spoken of this.  cool

You are better than my memory  smile  And I see I am missing "Pressure" in the new one ... time to tweak again.

Finally a good day of conky!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1277 2016-10-21 20:46:52

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)

Sektor11 wrote:

You had it right the first time.   Sektor11 it is!

lol lol

crook! ]:D (I've been looking for the word)

Offline

#1278 2016-10-21 21:28:48

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

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

ME!  A thief!  Naaaa you gave it to me.   O:)


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1279 2016-10-22 00:52:11

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

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

OK a new one - or a slight remake of the last one ... but I like this version best.

2016_10_21_21_42_36_Scrot11.jpg

The conky:

## pkill -xf "conky -q -c /home/sector11/1_accuweather/HTCSpill.conky" &
## Created: Fri 21 Oct 2016 21:51:02
## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints skip_taskbar,skip_pager,undecorated,below #,sticky
own_window_colour 000000
own_window_class Conky
own_window_title HTCSpill
## ARGB can be used for real transparency
# own_window_argb_visual yes ## Options: yes or no
## Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
# own_window_argb_value 100

# fold -sw36 requires this as a minimum:
#minimum_size 245 0
#maximum_width 245

minimum_size 235 240
maximum_width 235

gap_x 5	## l|r
gap_y 5	## u|d
alignment tr
## ---------- End Window Settings
## ---------- Font Settings
## Force UTF8? requires XFT
override_utf8_locale yes

## Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Liberation Mono:bold:size=9
#xftfont Fantasque Sans Mono:bold:size=9
#xftfont Monofur:bold:size=9
#xftfont DejaVu Sans Mono:bold:size=9

## Alpha of Xft font. Must be a value at or between 1 and 0
xftalpha 1.0

## --------- End Font Settings
## --------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 98FB98 #PaleGreen
color1 778899 #LightSlateGray
color2 FFD700 #Gold
color3 B0E0E6 #PowderBlue
color4 F4A460 #SandyBrown
color5 DEB887 #BurlyWood
color6 00BFFF #DeepSkyBlue
color7 5F9EA0 #CadetBlue
color8 FFA500 #Orange
color9 FF4500 #OrangeRed
## ---------- End Color Settings
## ---------- Begin Borders Section
#draw_borders yes
## Stippled borders?
#stippled_borders 5
## border margins
border_inner_margin 0
border_outer_margin 0
## border width
#border_width 2
## graph borders
#draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin 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

## Subtract (file slystem) buffers from used memory?
no_buffers yes

# Imlib2 image cache size, in bytes. Defaults to 4MiB. Increase this value if
# you use $image lots. Set to 0 to disable the image cache.
imlib_cache_size 0

# Interval (in seconds) to flush Imlib2 cache.
#imlib_cache_flush_interval 900

## Use the Xdbe extension? (eliminates flicker)
## It is highly reco${color}mmended to use own window with this one
## so double buffer won't be so big.
double_buffer yes

## ---------- End Miscellaneous Section

update_interval 1

#${execi 600 bash $HOME/1_accuweather/1_accuweather}\
TEXT
${execi 600 bash $HOME/1_accuweather/1_accuweather}\
${image $HOME/1_accuweather/HTCimages/base3.png -p -12,30 -s 260x145}\
${image $HOME/1_accuweather/HTCimages/base3.png -p -12,168 -s 260x70}
${image $HOME/1_accuweather/HTCimages/flip_bg.png -p 18,9 -s 100x110}\
${image $HOME/1_accuweather/HTCimages/flip_bg.png -p 118,9 -s 100x110}\
${image $HOME/1_accuweather/forecast_2015/forecast_0.png -p 55,98 -s 125x75}
${font LED_Mono:size=60}${color1}${goto 26}${time %H}${goto 126}${time %M}${font}
 ${goto 28}${execi 600 sed -n '02p' $HOME/1_accuweather/curr_cond}°${goto 80}±${execi 600 sed -n '03p' $HOME/1_accuweather/curr_cond}°${color1}\
${goto 130}${time %a %e %b}${color}
 Wind ${execi 600 sed -n '05p' $HOME/1_accuweather/curr_cond}\
${alignr 7}${execi 600 sed -n '04p' $HOME/1_accuweather/curr_cond|cut -c-13}
 ${execi 600 sed -n '06p' $HOME/1_accuweather/curr_cond}\
${alignr 7}${execi 600 sed -n '07p' $HOME/1_accuweather/curr_cond} Hum
 UVI ${execi 600 sed -n '09p' $HOME/1_accuweather/curr_cond}\
${alignr 7}${execi 600 sed -n '10p' $HOME/1_accuweather/curr_cond} Cld
 ${execi 600 sed -n '08p' $HOME/1_accuweather/curr_cond}\
${alignr 7}${execi 600 sed -n '13p' $HOME/1_accuweather/curr_cond} Vis${color}

${goto 12}${execi 600 sed -n '06p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 58}${execi 600 sed -n '11p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 105}${execi 600 sed -n '16p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 150}${execi 600 sed -n '21p' $HOME/1_accuweather/first_days|cut -c-3}\
${goto 196}${execi 600 sed -n '01p' $HOME/1_accuweather/last_days|cut -c-3}
${color8}${goto 6}${execi 600 sed -n '08p' $HOME/1_accuweather/first_days}°\
${goto 52}${execi 600 sed -n '13p' $HOME/1_accuweather/first_days}°\
${goto 99}${execi 600 sed -n '18p' $HOME/1_accuweather/first_days}°\
${goto 144}${execi 600 sed -n '23p' $HOME/1_accuweather/first_days}°\
${goto 190}${execi 600 sed -n '03p' $HOME/1_accuweather/last_days}°
${image $HOME/1_accuweather/forecast_2015/forecast_2.png -p 5,198 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_3.png -p 51,198 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_4.png -p 97,198 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_5.png -p 143,198 -s 50x30}\
${image $HOME/1_accuweather/forecast_2015/forecast_6.png -p 188,198 -s 50x30}
${color3}${goto 6}    ${execi 600 sed -n '09p' $HOME/1_accuweather/first_days}°\
${goto 52}    ${execi 600 sed -n '14p' $HOME/1_accuweather/first_days}°\
${goto 99}    ${execi 600 sed -n '19p' $HOME/1_accuweather/first_days}°\
${goto 144}    ${execi 600 sed -n '24p' $HOME/1_accuweather/first_days}°\
${goto 190}    ${execi 600 sed -n '04p' $HOME/1_accuweather/last_days}°

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#1280 2016-10-22 06:36:20

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:

@Teo

These thanks I am happy to pass on Sector11.
It was due to his companion.conky...   wink

Another function for conky companion: bug finder!


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

Board footer

Powered by FluxBB