You are not logged in.

#4481 2024-05-02 19:25:37

loutch
Member
Registered: 2015-12-12
Posts: 848

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

THis in conky

${execi 1800 trans --brief :fr file:///home/loutch/Accuweather_conky_script/daily_phrase | sed 's/u200b//g' > /home/loutch/Accuweather_conky_script/phrases}

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

#4482 2024-05-02 19:42:27

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

^ You only need to translate the existing daily_phrase  file and create a new daily_phrase_fr  that you will use in conky:

${execi 1800 trans -brief :fr file:///home/loutch/Accuweather_conky_script/daily_phrase | sed 's/u200b//g' > $HOME/Accuweather_conky_script/daily_phrase_fr}

EDIT

Replaced command:

trans --brief

with:

trans -brief

Last edited by marens (2024-05-05 20:06:19)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4483 2024-05-02 19:49:26

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Give the same

Pluie
Un peu de pluie le matin ; sinon, plutôt nuageux
Plutôt nuageux avec quelques averses
Plutôt nuageux; un peu de pluie le matin suivie de quelques averses l'après-midi
Une couverture nuageuse épaisse avec un peu de pluie l'après-midi
Nuages bas avec averses éparses l'après-midi
Généralement nuageux avec quelques averses, principalement en fin de journée
Quelques averses le matin ; sinon, les nuages cèdent au soleil
Plutôt nuageux
Partiellement ensoleillé avec quelques averses, principalement en début de journée
Partiellement ensoleillé
Partiellement ensoleillé
Partiellement ensoleillé
Pluie
Une épaisse couverture nuageuse ; une averse matinale par endroits suivie d'un peu de pluie l'après-midi
Nébulosité considérable ; quelques averses le matin, puis des averses et des orages l'après-midi
Nuageux; zones de bruine le matin suivies d'un peu de pluie l'après-midi
Pluie
Nuageux avec quelques averses suivies d'une pluie plus constante
Restant nuageux avec de la pluie occasionnelle
Partiellement ensoleillé avec quelques averses l'après-midi
Nuages considérables ; une averse matinale par endroits suivie d'un peu de pluie l'après-midi
Nuageux avec quelques averses
Nuageux; une averse par endroits le matin suivie d'un peu de pluie l'après-midi
Une épaisse couverture nuageuse ; un peu de pluie le matin suivi de quelques averses et d'un orage l'après-midi
Nébulosité importante avec orages par endroits
Nuageux avec quelques averses et orages l'après-midi
Nuageux; un orage par endroits le matin suivi d'un orage par endroits dans l'après-midi
Restant nuageux; un orage le matin suivi d'un orage l'après-midi
Plutôt nuageux avec un peu de pluie l'après-midi
Nuageux; un peu de pluie le matin suivi d'un orage par endroits dans l'après-midi
Soleil suivi de nuages croissants
Un peu de soleil, puis des nuages croissants
Soleil et nuages épars
Nuageux
Une épaisse couverture nuageuse ; un peu de pluie le matin suivi d'averses par endroits l'après-midi
Plus de nuages que de soleil avec un orage par endroits dans l'après-midi
Nuageux avec quelques averses et orages l'après-midi
Partiellement ensoleillé
Partiellement ensoleillé
Nébulosité croissante
Partiellement ensoleillé
Ciel couvert avec pluie intermittente et orage l'après-midi
Passages nuageux et soleil avec quelques averses et orage
Nébulosité considérable ; pluie intermittente le matin suivie de quelques averses et d'un orage l'après-midi
classu003d"phrase">Plutôt nuageux avec un peu de pluie l'après-midi</div>
<div classu003d"phrase">Nuageux ; un peu de pluie le matin suivi d'un orage par endroits dans l'après-midi</div>
<div classu003d"phrase">Soleil suivi de nuages croissants</div>
<div classu003d"phrase">Un peu de soleil, puis nuages croissants</div>
<div classu003d"phrase">Ensoleillement et nuages épars</div>
<div classu003d"phrase">Nuageux</div>
<div classu003d"phrase">Une épaisse couverture nuageuse ; un peu de pluie le matin suivi d'averses ponctuelles l'après-midi</div>
<div classu003d"phrase">Plus de nuages que de soleil avec un orage par endroits dans l'après-midi</div>
<div classu003d"phrase">Nuageux avec quelques averses et un orage dans l'après-midi</div>
<div classu003d"phrase">Partiellement ensoleillé</div>
<div classu003d"phrase">Partiellement ensoleillé</div>
<div classu003d"phrase">Nébulosité croissante</div>
<div classu003d"phrase">Partiellement ensoleillé</div>
<div classu003d"phrase">Couvert avec pluie intermittente et orage dans l'après-midi</div>
<div classu003d"phrase">Intervalles de nuages et de soleil avec quelques averses et un orage</div>
<div classu003d"phrase">Nébulosité considérable ; pluie intermittente le matin suivie de quelques averses et d'un orage l'après-midi</div>

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

#4484 2024-05-02 20:23:13

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

Yes, I see it now, but I don't know why it doesn't work as expected?
Remove that line from conky.

* Note:
If the accuweather script is updated  and the daily_phrase  file is correct, it should work.

We can try to run the trans command from the accuweather script.

OK.

Find this line:

        sed -i 's/--/N\/A/g' $HOME/Accuweather_conky_script/curr_cond

Add below (it should look like this):       

        sed -i 's/--/N\/A/g' $HOME/Accuweather_conky_script/curr_cond
        
        trans -brief :fr file:///home/loutch/Accuweather_conky_script/daily_phrase | sed 's/u200b//g' > $HOME/Accuweather_conky_script/daily_phrase_fr

Open terminal:

bash $HOME/Accuweather_conky_script/accuweather -f2015

Is the daily_phrase_fr  file now in the Accuweather_conky_script  folder?


EDIT
I tested in my accuweather script and the daily_phrase_fr  file looks fine:

Un peu de soleil, puis devenant nuageux ; venteux ce matin, puis quelques averses cet après-midi
Beaucoup de nébulosité et plus frais avec quelques averses
Les nuages cèdent la place à un peu de soleil et de chaleur
Partiellement ensoleillé et agréable
Partiellement ensoleillé et agréable
Plutôt nuageux
Quelques averses matinales ; sinon, nuageux
Nuages et éclaircies avec averses l'après-midi
Plutôt nuageux
Un peu de pluie le matin ; sinon, nuageux
Une épaisse couverture nuageuse avec un peu de pluie
Nuageux la plupart du temps
Assez ensoleillé
Assez ensoleillé
Partiellement ensoleillé
Assez ensoleillé
Partiellement ensoleillé
Nuageux
Plutôt nuageux
Ensoleillement partiel
Passages nuageux et ensoleillé avec quelques averses et orages dans l'après-midi
Partiellement ensoleillé
Nébulosité croissante
Beaucoup de soleil
Partiellement ensoleillé
Nuages et soleil
Quelques averses et un orage le matin ; sinon, plutôt nuageux
Beaucoup de soleil
Ensoleillé
Intervalles de nuages et de soleil
Passages nuageux et ensoleillé avec quelques averses et orages dans l'après-midi
Généralement nuageux avec quelques averses et orages dans l'après-midi
Nuageux la plupart du temps
Plutôt nuageux
Plutôt nuageux
Plutôt nuageux
Beaucoup de soleil
Assez ensoleillé
Ensoleillé
Beaucoup de soleil
Intervalles de nuages et de soleil
Assez ensoleillé
Un soleil abondant
Assez ensoleillé
Beaucoup de soleil

EDIT 2

Replaced command:

trans --brief

with:

trans -brief

Last edited by marens (2024-05-05 20:09:59)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4485 2024-05-03 08:17:20

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Hello

Sorry i don't have this line

   sed -i 's/--/N\/A/g' $HOME/Accuweather_conky_script/curr_cond

here my accuweather complet


#!/usr/bin/env bash

#########################################################################################
# Put the command that launches the conky configuration file that uses this script here #
#########################################################################################
weather_conky_launch_command="$HOME/Accuweather_conky_script/didiert2accu"


#####################################
# Put your Accuweather address here #
#####################################
#address="https://www.accuweather.com/en/ar/buenos-aires/7894/weather-forecast/7894"
address="https://www.accuweather.com/en/fr/sarreguemines/135050/weather-forecast/135050"
#address="https://www.accuweather.com/en/gr/kastoria/178682/weather-forecast/178682"
#address="https://www.accuweather.com/en/de/lichtenstein/09350/weather-forecast/171261"
#address="https://www.accuweather.com/en/aq/casey-station/2273690/weather-forecast/2273690"

#Pause weather conky
pkill -STOP -xf "$weather_conky_launch_command"

# Make the temp directories as needed
  [ -d $HOME/Accuweather_conky_script/temp ] || mkdir $HOME/Accuweather_conky_script/temp
  [ -d $HOME/Accuweather_conky_script/temp/images ] || mkdir $HOME/Accuweather_conky_script/temp/images
  [ -d $HOME/Accuweather_conky_script/temp/images_hourly ] || mkdir $HOME/Accuweather_conky_script/temp/images_hourly

#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;
         11)
           echo 0
         ;;
         12)
           echo h
         ;;
         13|14)
           echo g
         ;;
         15)
           echo m
         ;;
         16|17)
           echo k
         ;;
         18)
           echo i
         ;;
         19)
           echo q
         ;;
         20|21|23)
           echo o
         ;;
         22)
           echo r
         ;;
         24|31)
           echo E
         ;;
         25)
           echo v
         ;;
         26)
           echo x
         ;;
         29)
           echo y
         ;;
         30)
           echo 5
         ;;
         32)
           echo 6
         ;;
         33)
           echo A
         ;;
         34|35)
           echo B
         ;;
         36|37)
           echo C
         ;;
         38)
           echo D
         ;;
         39|40)
           echo G
         ;;
         41|42)
           echo K
         ;;
         43|44)
           echo O
         ;;
         *)
	   echo -
		 ;;
	esac
	}


	#function: test_wind
	test_wind () {
	    case $1 in
	         CLM)
	           echo \-
	         ;;
	         S)
	           echo 1
	         ;;
	         SSW)
	           echo 2
	         ;;
	         SW)
	           echo 3
	         ;;
	         WSW)
	           echo 4
	         ;;
	         W)
	           echo 5
	         ;;
	         WNW)
	           echo 6
	         ;;
	         NW)
	           echo 7
	         ;;
	         NNW)
	           echo 8
	         ;;
	         N)
	           echo 9
	         ;;
	         NNE)
	           echo \:
	         ;;
	         NE)
	           echo \;
	         ;;
	         ENE)
	           echo \<
	         ;;
	         E)
	           echo \=
	         ;;
	         ESE)
	           echo \>
	         ;;
	         SE)
	           echo \?
	         ;;
	         SSE)
	           echo \@
	         ;;
	    esac
	}


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

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

forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0
h_24hours=1
h_real=1
h_uv=1
h_wind=1
h_wind_g=1
h_hum=1
h_ind_hum=1
h_dew=1
h_cl_cov=1
h_prec_am=1
h_visib=1
h_cl_ceil=1

for i in $*
	do
		if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 && $i != -h_12h && $i != -h_no_real && $i != -h_no_uv && $i != -h_no_wind && $i != -h_no_wind_g && $i != -h_no_hum && $i != -h_no_ind_hum && $i != -h_no_dew && $i != -h_no_cl_cov && $i != -h_no_prec_am && $i != -h_no_visib && $i != -h_no_cl_ceil ]]; then
			echo "Invalid arguments!"
			exit
		fi
		case $i in
			-f)
				forecast0=1
			;;
			-f2015)
				forecast2015=1
			;;
			-f2016)
				forecast2016=1
			;;
			-h)
				hourly0=1
			;;
			-h2015)
				hourly2015=1
			;;
			-h2016)
				hourly2016=1
			;;
			-h_12h)
				h_24hours=0
			;;
			-h_no_real)
				h_real=0
			;;
			-h_no_uv)
				h_uv=0
			;;
			-h_no_wind)
				h_wind=0
			;;
			-h_no_wind_g)
				h_wind_g=0
			;;
			-h_no_hum)
				h_hum=0
			;;
			-h_no_ind_hum)
				h_ind_hum=0
			;;
			-h_no_dew)
				h_dew=0
			;;
			-h_no_cl_cov)
				h_cl_cov=0
			;;
			-h_no_prec_am)
				h_prec_am=0
			;;
			-h_no_visib)
				h_visib=0
			;;
			-h_no_cl_ceil)
				h_cl_ceil=0
			;;
		esac
	done

if [[ $forecast0 == 1 ]]; then
	forecast2015=0
	forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
	hourly2015=0
	hourly2016=0
fi


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


#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then

	#function: convert_time
	convert_time ()
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		minutes=$(echo $1|awk -F ":| " '{print $2}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
		if [[ $am_or_pm == "" ]]; then
			echo $1
			return 0
		elif [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:$minutes
		if [[ $1 != "N/A" ]]; then
			echo $time_24
		elif [[ $1 == "N/A" ]]; then
			echo "N/A"
		fi
	}

sleep 0.2
	curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/curr_cond_raw "$curr_addr"

	daily_addr="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/daily_forecast_raw "$daily_addr"

##### del image forecast
	if [[ $forecast2015 == 1 ]]; then
	  if [[ -f $HOME/Accuweather_conky_script/temp/images/forecast_*.png ]]; then
		rm $HOME/Accuweather_conky_script/temp/images/forecast_*.png
	  fi
	fi
	if [[ $forecast2016 == 1 ]]; then
	  if [[ -f $HOME/Accuweather_conky_script/temp/images/forecast_*.png ]]; then
		rm $HOME/Accuweather_conky_script/temp/images/forecast_*.png
	  fi
	fi

sleep 0.2

	#current conditions
	if [[ -s $HOME/Accuweather_conky_script/temp/curr_cond_raw ]]; then

		sed '/current-weather-card/,/glacier-ad /!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/curr_cond_temp

sed -i '/div class=\"label-tooltip\" data-js/,/div class=\"current-weather-details/d' $HOME/Accuweather_conky_script/temp/curr_cond_temp
		sed -i -e 's/\.svg.*$//g' -e 's/<\/div>//g' -e 's/<div>//g' -e 's/<\/span>//g' -e 's/<span class.*$//g' -e 's/^[\t]*//g' $HOME/Accuweather_conky_script/temp/curr_cond_temp
		#sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/&#xB0;.*$//g' -e 's/.*RealFeel&#xAE; //g' -e '/RealFeel Shade™/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/temp/curr_cond_temp
  sed -i -e 's/.*weathericons\///' -e 's/^.*>//g' -e 's/&#xB0;.*$//g' -e '/RealFeel&#xAE;/d' -e '/RealFeel Shade™/,+1d' -e '/RealFeel Shade/,+1d' -e '/Indoor Humidity/,+1d' -e '/^$/d' $HOME/Accuweather_conky_script/temp/curr_cond_temp
#
		sed -i '1s/^0//' $HOME/Accuweather_conky_script/temp/curr_cond_temp

# temporary file to control
#
cp $HOME/Accuweather_conky_script/temp/curr_cond_temp $HOME/Accuweather_conky_script/temp/curr_cond_control_point

 
		if [[ $(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond_temp) != 'Max UV Index' ]]; then
			sed -i "5s/^/Max UV\n0\n/" $HOME/Accuweather_conky_script/temp/curr_cond_temp
		fi


		wind_dir=$(sed -n 8p $HOME/Accuweather_conky_script/temp/curr_cond_temp|head -c 1)
		if [[ $wind_dir == 0 ]]; then
			sed -i '8s/^/CLM /' $HOME/Accuweather_conky_script/temp/curr_cond_temp
		fi

		sed -i '8s/ /\n/1' $HOME/Accuweather_conky_script/temp/curr_cond_temp


		sed '/sunrise-sunset card-module content-module/,/temp-history content-module/!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/curr_cond_temp1

		sed -i -e 's/.*"text-value">//g' -e 's/<\/span>$//g' -e '/</d' $HOME/Accuweather_conky_script/temp/curr_cond_temp1
#
		sed -i -e '1d;4d' -e 's/^[\t]*//g' -e 's/ AM/:AM/g' -e 's/ PM/:PM/g' -e 's/ .*$//g' -e '/^$/d' -e 's/:AM/ AM/g' -e 's/:PM/ PM/g' $HOME/Accuweather_conky_script/temp/curr_cond_temp1

		sed -i -e '1N;s/\n/:/' $HOME/Accuweather_conky_script/temp/curr_cond_temp1

		if [[ $(sed -n 4p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" && $(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" && $(sed -n 6p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" && $(sed -n 7p $HOME/Accuweather_conky_script/temp/curr_cond_temp1) != "N/A" ]]; then

			sed -i '4N;s/\n/:/' $HOME/Accuweather_conky_script/temp/curr_cond_temp1
		fi


# sorting  сортировка
# curr_cond line 1,2 номер изобр. облака и температуры сейчас , number icon and Temperature now
		sed -n 1,2p $HOME/Accuweather_conky_script/temp/curr_cond_temp > $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 3 температура ощущение  Real Feel
		sed -n 4p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 4 облачность  Forecast
		sed -n 3p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 5 направление ветра  Wind Direction
		sed -n 8p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 6 скорость ветра  Wind Speed
#
		sed -n 9p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 7 влажность Humidity
		sed -n 13p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 8 давление  Pressure
		sed -n 17p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 9 УФ индекс  UV Index
		sed -n 6p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 10 облачность  Cloud Cover
		sed -n 19p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 11 влажность  Indoor Humidity (for compatibility with old config file) 
		sed -n 13p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 12 точка росы  Dew Point
		sed -n 15p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 13 видимость  Visibility
		sed -n 21p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 14,15 солнце  рассвет, закат  Sun Rise Sun Set
		sed -n 2,3p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 16 солнце длит.  Sunlight Duration
		sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 17 порывы ветра  Wind Gusts
		sed -n 11p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 18,19 луна  восход, заход  Moon Rise Moon Set
		sed -n 5,6p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 20   Moonlight Duration
		sed -n 4p $HOME/Accuweather_conky_script/temp/curr_cond_temp1 >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 21 высота облаков  Cloud Ceiling
		sed -n 23p $HOME/Accuweather_conky_script/temp/curr_cond_temp >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 22 	#convert Image Number curr. cond.  to  Weather font letter curr. cond.
	    image=$(sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond)
	    echo $(test_image $image) >> $HOME/Accuweather_conky_script/temp/curr_cond
# curr_cond line 23   Sun Rise-24h
		sunrise_time=$(sed -n 14p $HOME/Accuweather_conky_script/temp/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 24  Sun Set-24h
		sunrise_time=$(sed -n 15p $HOME/Accuweather_conky_script/temp/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 25  Moon Rise-24h
		sunrise_time=$(sed -n 18p $HOME/Accuweather_conky_script/temp/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond

# curr_cond line 26  Moon Set-24h
		sunrise_time=$(sed -n 19p $HOME/Accuweather_conky_script/temp/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/Accuweather_conky_script/temp/curr_cond


## curr_cond line 27   convert Wind Direction curr. cond.  to  Wind font letter curr. cond.
		wind=$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond)
		echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/temp/curr_cond

	if (( $(sed -n 14p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
			sed -i '14s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
		fi
		if (( $(sed -n 15p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
			sed -i '15s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
		fi
		if (( $(sed -n 18p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
			sed -i '18s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
		fi
		if (( $(sed -n 19p $HOME/Accuweather_conky_script/temp/curr_cond|wc -c) == 8 )); then
			sed -i '19s/^/0/' $HOME/Accuweather_conky_script/temp/curr_cond
	fi

sleep 0.2

# Copy image clouds

	    if [[ $forecast2015 == 1 ]]; then
			cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/forecast_0.png
			cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/wind_0.png
		fi
		if [[ $forecast2016 == 1 ]]; then
			cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 1p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/forecast_0.png
			cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond).png $HOME/Accuweather_conky_script/temp/images/wind_0.png
		fi
	fi


## delete tendency pressure
#		sed -i '8s/^.*; //' $HOME/Accuweather_conky_script/temp/curr_cond

## tendency pressure
#
	sed -i -e '8s/&#x2194;/↔/g' -e '8s/&#x2191;/↑/g' -e '8s/&#x2193;/↓/g' -e '8s/&#x2197;/↗/g' -e '8s/&#x2198;/↘/g' -e '8s/&#x219D;/↝/g' $HOME/Accuweather_conky_script/temp/curr_cond


########## location, time update
		sed '/header-loc-weather">\|<p class="sub">/!d' $HOME/Accuweather_conky_script/temp/curr_cond_raw > $HOME/Accuweather_conky_script/temp/location
		sed -i -e 's/^.*">//g' -e 's/<\/div>.*$//g' -e 's/<\/p>.*$//g' -e 's/,/ /' $HOME/Accuweather_conky_script/temp/location
#AJOUT remplacement des accents
            sed -i -e '8s/&#x2194;/↔/g' -e '8s/&#x2191;/↑/g' -e '8s/&#x2193;/↓/g' -e '8s/&#x2197;/↗/g' -e '8s/&#x2198;/↘/g' -e '8s/&#x219D;/↝/g' $HOME/Accuweather_conky_script/temp/curr_cond
	    sed -i -e 's/\&#234;/ê/g' -e 's/\&#xE9;/é/g' -e 's/\&#xE8;/é/g' -e 's/\&#xF4;/ô/g' -e 's/\&#x202F;/ /g' -e 's/\&#xC9;/É/g' -e's/\\u0027/'"'"'/g' $HOME/Accuweather_conky_script/temp/curr_cond
            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/Accuweather_conky_script/temp/curr_cond

#icone direction vent 
wind_direction=$(sed -n 5p $HOME/Accuweather_conky_script/temp/curr_cond)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"02.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "South" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"02.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "SSO" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"03.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "SO" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"04.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "OSO" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"05.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "O" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"06.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "West" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"06.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "ONO" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"07.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "NO" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"08.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "NNO" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"09.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"10.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "North" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"10.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"11.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"12.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"13.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"14.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "East" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"14.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"15.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"16.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"17.png" $HOME/Accuweather_conky_script/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
	cp $HOME/Accuweather_conky_script/vents/"00.png" $HOME/Accuweather_conky_script/Wind1.png
fi

#traduction
sed -i -e 's/Clear/Dégagé/' $HOME/Accuweather_conky_script/temp/curr_cond
sed -i -e 's/Mostly cloudy/Peu nuageux/' $HOME/Accuweather_conky_script/temp/curr_cond
sed -i -e 's/Mostly sunny/Plutôt ensoleillé/' $HOME/Accuweather_conky_script/temp/curr_cond



##########


	#Daily forecast
	if [[ -s $HOME/Accuweather_conky_script/temp/daily_forecast_raw ]]; then

		sed '/<div class="daily-wrapper" data-qa="dailyCard0">/,/Further Ahead/!d' $HOME/Accuweather_conky_script/temp/daily_forecast_raw > $HOME/Accuweather_conky_script/daily_forecast
# удаляем блок  WinterCast
		sed -i '/<div class="daily-wintercast-cta">/,/div class="daily-wrapper"/d' $HOME/Accuweather_conky_script/daily_forecast

# удалить строки между  collapseConnatix   и   connatix" class (delete alert)
	sed -i '/collapseConnatix/,/connatix" class/d' $HOME/Accuweather_conky_script/daily_forecast
	sed -i '/script>/d' $HOME/Accuweather_conky_script/daily_forecast

# удалить строки между  alert-banners   и  alert-description  (delete alert)
	sed -i '/alert-banners/,/alert-description/d' $HOME/Accuweather_conky_script/daily_forecast

		sed -i -e 's/\.svg.*$//g' -e 's/&#xB0;<\/span>//g' -e 's/<\/span>//g' $HOME/Accuweather_conky_script/daily_forecast
# сохранить состояние погоды в файле daily_phrase 
		sed '/class="phrase/!d' $HOME/Accuweather_conky_script/daily_forecast > $HOME/Accuweather_conky_script/daily_phrase
		sed -i -e 's/<\/div>//g' -e 's/.*>//g' $HOME/Accuweather_conky_script/daily_phrase

		sed -i -e 's/^.*">\///' -e 's/^.*">//' -e 's/.*weathericons\///g' -e 's/^[\t]*//g' -e '/^$/d' $HOME/Accuweather_conky_script/daily_forecast

		sed -i -e '/<\|>\|fill=\|^[ ]*$\|Further Ahead/d' $HOME/Accuweather_conky_script/daily_forecast

#### вставка строк из файла phrase  в файл daily_phrase ####
			j=6
	   for (( i=1; i<=20; i+=1 ))
	 	do

	phrase=$(sed -n ${i}p $HOME/Accuweather_conky_script/daily_phrase)

	sed -i "${j}s/^/$phrase\n/" $HOME/Accuweather_conky_script/daily_forecast

			((j+=7))

		  done


		sed -i '85,$d' $HOME/Accuweather_conky_script/daily_forecast
# Change a short name to a long one or translate into another language
#		sed -i -e 's/^Sun$/Sunday/g' -e 's/^Mon$/Monday/g' -e 's/^Tue$/Tuesday/g' -e 's/^Wed$/Wednesday/g' -e 's/^Thu$/Thursday/g' -e 's/^Fri$/Friday/g' -e 's/^Sat$/Saturday/g' $HOME/Accuweather_conky_script/temp/daily_forecast

sleep 0.2
# Copy image clouds

		for (( i=1; i<=21; i+=1 ))
		  do
	          echo >> $HOME/Accuweather_conky_script/temp/daily_forecast
		  done
		for (( i=3; i<=80; i+=7 ))
		  do
	          image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/temp/daily_forecast)
	          echo $(test_image $image) >> $HOME/Accuweather_conky_script/temp/daily_forecast
		  done
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=3; i<=80; i+=7 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/daily_forecast).png $HOME/Accuweather_conky_script/temp/images/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/daily_forecast).png $HOME/Accuweather_conky_script/temp/images/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
fi
###AJOUT remplacement des accents
                sed -i -e 's/\&#234;/ê/g' -e 's/\&#xE9;/é/g' -e 's/\&#xF4;/ô/g' -e 's/\&#xE8;/è/g' -e 's/\&#x27;/'"'"'/g' $HOME/Accuweather_conky_script/temp/daily_forecast
                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/Accuweather_conky_script/temp/daily_forecast
sleep 0.2
#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################
#function: convert_time_h
	convert_time_h ()
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $2}')
		if [[ $am_or_pm == "" ]]; then
			echo $1
			return 0
		elif [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:00
		echo $time_24
	}

if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then

	#Hourly: 24h

	hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
	hourly_addr2="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"?day=2

	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/hourly_raw1 "$hourly_addr1"

	curl -H 'User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:80.0) Gecko/20100101 Firefox/80.0' -H 'Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' -H 'Accept-Language: en-US,en;q=0.5' --compressed -H 'Connection: keep-alive' -H 'Upgrade-Insecure-Requests: 1' -H 'Cache-Control: max-age=0' -o $HOME/Accuweather_conky_script/temp/hourly_raw2 "$hourly_addr2"

	if [[ -s $HOME/Accuweather_conky_script/temp/hourly_raw1 && -s $HOME/Accuweather_conky_script/temp/hourly_raw2 ]]; then

		cat $HOME/Accuweather_conky_script/temp/hourly_raw1 $HOME/Accuweather_conky_script/temp/hourly_raw2 > $HOME/Accuweather_conky_script/temp/hourly_raw_temp

	sed '/<div class=\"hourly-wrapper content-module\">/,/day=/!d' $HOME/Accuweather_conky_script/temp/hourly_raw_temp > $HOME/Accuweather_conky_script/temp/hourly



#		#Hourly file
#
	sed -i '/div class=\"label-tooltip\" data-js=/,/div class=\"hourly-content-container/d' $HOME/Accuweather_conky_script/temp/hourly

#remove spaces and tabs in lines 
#		sed -i -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/temp/hourly

		sed -i '/div class=\"real-feel-mobile/,/<\/div>/d' $HOME/Accuweather_conky_script/temp/hourly

#Поменять &#xAE;  на  <span class="value">space
		sed -i -e 's/&#xAE;/<span class="value">space/g' $HOME/Accuweather_conky_script/temp/hourly
		# и  к   space присоединить следующую строку(удалив space и \n- новая строка)
		sed -i -z 's/space\n//g' $HOME/Accuweather_conky_script/temp/hourly

		sed -i '/Indoor Humidity\|Air Quality\|RealFeel Shade\|RealFeel Guide\|Ice/d' $HOME/Accuweather_conky_script/temp/hourly

#
	sed -i '/class="date"\|weathericons\/\|temp metric\|RealFeel<span\|"phrase"\|Max UV Index\|Wind\|Wind Gusts\|Humidity\|Dew Point\|Cloud Cover\|Visibility\|Cloud Ceiling/!d' $HOME/Accuweather_conky_script/temp/hourly

##adding empty lines for compatibility with the old config. file
#date
		sed -i -e 's/<\/span><\/h2>/\n--/g' $HOME/Accuweather_conky_script/temp/hourly

		sed -i -e 's/<\/span>.*$//g' -e 's/\.svg.*$//g' -e 's/<\/div>.*$//g' -e 's/<span class="value">/\n/g' $HOME/Accuweather_conky_script/temp/hourly

		sed -i -e 's/.*weathericons\///g' -e 's/^.*>//g' -e 's/&#xB0;.*$//g' -e 's/&#xAE;//g' -e 's/^[ \|\t]*//g' $HOME/Accuweather_conky_script/temp/hourly


		#Populate Max UV and Prec. Amount values where needed
		i=1
		while IFS= read -r line;
			do
				if [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly) == Wind ]]; then
					j=$((i-2))
					if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/temp/hourly) != 'Max UV Index' ]]; then
						sed -i "${i}s/^/Max UV Index\n0\n/" $HOME/Accuweather_conky_script/temp/hourly
						((i+=3))
					fi
				elif [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly) == Visibility ]]; then
					j=$((i-2))
					if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/temp/hourly) != 'Rain' && $(sed -n ${j}p $HOME/Accuweather_conky_script/temp/hourly) != 'Snow' ]]; then
						sed -i "${i}s/^/Prec. Amount\n-\n/" $HOME/Accuweather_conky_script/temp/hourly
						((i+=3))
					fi
				fi
			((i+=1))
			done < $HOME/Accuweather_conky_script/temp/hourly

		sed -i '/^$/d' $HOME/Accuweather_conky_script/temp/hourly

##adding empty lines for compatibility with the old config. file 
	sed -i '/Dew Point/i Indoor Hum.\n0' $HOME/Accuweather_conky_script/temp/hourly
	sed -i '/Max UV Index/i precip\n-\nNot' $HOME/Accuweather_conky_script/temp/hourly


		sed -i '/^Further Ahead$/d' $HOME/Accuweather_conky_script/temp/hourly
		sed -i '721,$d' $HOME/Accuweather_conky_script/temp/hourly
		sed -i -e 's/ mph$\| km\/h$//g' -e 's/°.*$//g' $HOME/Accuweather_conky_script/temp/hourly


##### del image hourly
	if [[ $hourly2015 == 1 ]]; then
	  if [[ -f $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png ]]; then
		rm $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png
	  fi
	fi
	if [[ $hourly2016 == 1 ]]; then
	  if [[ -f $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png ]]; then
		rm $HOME/Accuweather_conky_script/temp/images_hourly/hourly_*.png
	  fi
	fi


#	# Convert number image hourly  to  Weather font letter. Copy image clouds
		for (( i=3; i<=720; i+=30 ))
		  do
		image=$(sed -n "${i}"p $HOME/Accuweather_conky_script/temp/hourly)
		echo $(test_image $image) >> $HOME/Accuweather_conky_script/temp/hourly
			  sed -i "$(( i+9 ))s/ .*$//" $HOME/Accuweather_conky_script/temp/hourly
			  sed -i "$(( i+17 ))s/ .*$//" $HOME/Accuweather_conky_script/temp/hourly
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=3; i<=720; i+=30 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2015/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly).png $HOME/Accuweather_conky_script/temp/images_hourly/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/Accuweather_conky_script/Forecast_Images_2016/$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly).png $HOME/Accuweather_conky_script/temp/images_hourly/hourly_$j.png
				fi
		    	((j++))
			  done
		fi
	fi

	# Convert times in hourly from am/pm to freedom times
	for (( i=1; i<=720; i+=30 ))
		  do
		   h=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			  sed -i ${i}s/^.*$/$(convert_time_h "$h")/ $HOME/Accuweather_conky_script/temp/hourly
#	# Add times in hourly  :0    ru version
#		  sed -i ${i}s/^.*$/"$h":00/ $HOME/Accuweather_conky_script/temp/hourly
		  done
sleep 0.2
	##convert Wind Direction hourly  to  Wind font letter hourly
		echo 'Font letter wind  hourly ' >> $HOME/Accuweather_conky_script/temp/hourly
			j=1
		for (( i=14; i<=720; i+=30 ))
		  do
		   wind=$(sed -n "${i}"p $HOME/Accuweather_conky_script/temp/hourly | awk '{print $1}')
		   echo $(test_wind $wind) >> $HOME/Accuweather_conky_script/temp/hourly

			((j++))
		  done

sed -i -e 's/\&#234;/ê/g' -e 's/\&#xE9;/é/g' -e 's/\&#xE8;/é/g' -e 's/\&#xF4;/ô/g' -e 's/\&#x202F;/ /g' -e 's/\&#xC9;/É/g' -e's/\\u0027/'"'"'/g' $HOME/Accuweather_conky_script/temp/hourly
            

##############################################################
	# Full info, next 24h - altogether24 file

#
  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24 ]]; then
#
	rm $HOME/Accuweather_conky_script/temp/altogether24
#
  fi
#
  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2015 ]]; then
#
	rm $HOME/Accuweather_conky_script/temp/altogether24_2015
#
  fi
#
  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2016 ]]; then
#
	rm $HOME/Accuweather_conky_script/temp/altogether24_2016
#
  fi


	#TIME
	echo "\${color1}TIME\${goto 100}$(sed -n 1p $HOME/Accuweather_conky_script/temp/hourly)" > $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=160
	for (( i=31; i<=360; i+=30 ))
		do
			time=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=361; i<=720; i+=30 ))
			do
				time=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "1s/$/\${goto $jump_to}$time/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	sed -i '1s/$/\n\n\n/' $HOME/Accuweather_conky_script/temp/altogether24

	#FORECAST
	echo "\${color1}FORECAST\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=7; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=367; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $1}'|cut -c1-8)
				sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi
	sed -i '5s/$/\n/' $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=7; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=367; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly|awk '{print $2}'|cut -c1-8)
				sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#TEMPERATURE
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "TEMPER.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=4; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=364; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#REAL FEEL
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "REAL FEEL\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=6; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=366; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#CHANCE OF PRECIPITATION
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "PRECIP. %\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=9; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=369; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#MAX UV INDEX
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "UV INDEX\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=12; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=372; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#WIND
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "WIND\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=14; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=374; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#WIND GUSTS
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "WIND GUSTS\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=16; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=376; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#HUMIDITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "HUMIDITY\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=18; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=378; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#INDOOR HUMIDITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "IND. HUMID.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=20; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=380; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#DEW POINT
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "DEW POINT\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=22; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "24s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=382; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "24s/$/\${goto $jump_to}$messg°/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#CLOUD COVER
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "CLOUD CVR\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=24; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "26s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=384; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "26s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#PRECIPITATION AMOUNT
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "PREC. AM.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=26; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=386; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "28s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#VISIBILITY
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "VISIBILITY\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=28; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "30s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=388; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "30s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#CLOUD CEILING
	echo "\${color1}\${goto 100}\${hr 1}" >> $HOME/Accuweather_conky_script/temp/altogether24
	echo "CLOUD CEIL.\${color}" >> $HOME/Accuweather_conky_script/temp/altogether24
	jump_to=100
	for (( i=30; i<=360; i+=30 ))
		do
			messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
			sed -i "32s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
			((jump_to+=60))
		done
	if [[ $h_24hours == 1 ]]; then
		for (( i=390; i<=720; i+=30 ))
			do
				messg=$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)
				sed -i "32s/$/\${goto $jump_to}$messg/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
	fi

	#IMAGES
	if [[ $hourly0 == 0 ]]; then
		if [[ $hourly2015 == 1 ]]; then
					jump_to=75
					cp $HOME/Accuweather_conky_script/temp/altogether24 $HOME/Accuweather_conky_script/temp/altogether24_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
					jump_to=85
					cp $HOME/Accuweather_conky_script/temp/altogether24 $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
#  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24 ]]; then
#		rm $HOME/Accuweather_conky_script/temp/altogether24
#  fi
		hours=$((12+$h_24hours*12))
		for (( i=1; i<=$hours; i+=1 ))
			do
				if [[ $hourly2015 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/temp/altogether24_2015
				fi
				if [[ $hourly2016 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/Accuweather_conky_script\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/Accuweather_conky_script/temp/altogether24_2016
				fi
				((jump_to+=60))
			done
	fi

	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/Accuweather_conky_script/temp/altogether24
		jump_to=95
		for (( i=721; i<=732; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)/" $HOME/Accuweather_conky_script/temp/altogether24
				((jump_to+=60))
			done
		if [[ $h_24hours == 1 ]]; then
			for (( i=733; i<=744; i+=1 ))
				do
					sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/Accuweather_conky_script/temp/hourly)/" $HOME/Accuweather_conky_script/temp/altogether24
					((jump_to+=60))
				done
		fi
		sed -i '4s/$/\${font}/' $HOME/Accuweather_conky_script/temp/altogether24
		sed -i '2,3d' $HOME/Accuweather_conky_script/temp/altogether24
	fi

	#DELETE UNWANTED VARIABLES
	if [[ $h_real == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '7,8s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '9,10s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_uv == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '11,12s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_wind == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '13,14s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_wind_g == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '15,16s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi


	if [[ $h_hum == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '17,18s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi


	if [[ $h_ind_hum == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '19,20s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_dew == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '21,22s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_cl_cov == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '23,24s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_prec_am == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '25,26s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_visib == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '27,28s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

	if [[ $h_cl_ceil == 0 ]]; then
		if [[ $hourly0 == 1 ]]; then
			sed -i '29,30s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24
		elif [[ $hourly2015 == 1 ]]; then
			sed -i '31,32s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2015
		elif [[ $hourly2016 == 1 ]]; then
			sed -i '31,32s/^.*$/VOID/' $HOME/Accuweather_conky_script/temp/altogether24_2016
		fi
	fi

  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24 ]]; then
	sed -i '/VOID/d' $HOME/Accuweather_conky_script/temp/altogether24
  fi
  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2015 ]]; then
	sed -i '/VOID/d' $HOME/Accuweather_conky_script/temp/altogether24_2015
  fi
  if [[ -f $HOME/Accuweather_conky_script/temp/altogether24_2016 ]]; then
	sed -i '/VOID/d' $HOME/Accuweather_conky_script/temp/altogether24_2016
  fi



fi

sleep 0.5

##################################################################
#del. temp files

#
  if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_temp ]]; then
#
	rm $HOME/Accuweather_conky_script/temp/curr_cond_temp
#
  fi
#
  if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_temp1 ]]; then
#
	rm $HOME/Accuweather_conky_script/temp/curr_cond_temp1
#
  fi
#  if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_control_point ]]; then
#	rm $HOME/Accuweather_conky_script/temp/curr_cond_control_point
#  fi

#
  if [[ -f $HOME/Accuweather_conky_script/temp/hourly_raw_temp ]]; then
#
	rm $HOME/Accuweather_conky_script/temp/hourly_raw_temp
#
  fi

###############################################################
#del. raw files

#  if [[ -f $HOME/Accuweather_conky_script/temp/curr_cond_raw ]]; then
#	rm $HOME/Accuweather_conky_script/temp/curr_cond_raw
#  fi
#  if [[ -f $HOME/Accuweather_conky_script/temp/daily_forecast_raw ]]; then
#	rm $HOME/Accuweather_conky_script/temp/daily_forecast_raw
#  fi
#  if [[ -f $HOME/Accuweather_conky_script/temp/hourly_raw1 ]]; then
#	rm $HOME/Accuweather_conky_script/temp/hourly_raw1
#  fi
#  if [[ -f $HOME/Accuweather_conky_script/temp/hourly_raw2 ]]; then
#	rm $HOME/Accuweather_conky_script/temp/hourly_raw2
#  fi
#
#### Marens - French Translation

sed -n '4p' $HOME/Accuweather_conky_script/temp/curr_cond | trans -brief :fr  > $HOME/Accuweather_conky_script/translate_fr


#### Marens - END French Translation
##################################################################

#### mise à jour unklar ####
date +%T > $HOME/Accuweather_conky_script/actualisation

#### temp+40 pour conky barometr ####

num1=$(sed -n 2p $HOME/Accuweather_conky_script/temp/curr_cond)
num2=40

ans=$(bc -l <<<"$num1+$num2")

echo $ans >> $HOME/.conky/barometr/temp

#Resume weather conky
pkill -CONT -xf "$weather_conky_launch_command"

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

#4486 2024-05-03 11:48:57

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

loutch wrote:

Sorry i don't have this line

Did you see this post?
https://forums.bunsenlabs.org/viewtopic … 83#p134283

If you open the first link and go to the page:
https://forums.bunsenlabs.org/viewtopic … 99#p129399

See EDIT 2.

Try to update everything or:

marens wrote:

My accuweather script is different and best to wait for someone with an updated base version (@ceeslans or @asqwerth).


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4487 2024-05-03 13:26:19

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Re

This post are talking about gis-weather  no ???

I'm waiting for an update version .

Many tanks for helping


@+

Last edited by loutch (2024-05-03 13:42:37)


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

#4488 2024-05-03 13:41:44

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

^ See EDIT 2 in that post.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4489 2024-05-03 19:29:05

GioD
New Member
From: Germany
Registered: 2023-11-05
Posts: 4

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

marens wrote:

^ You probably haven't updated the accuweather script.
There have been several changes.

I'd put such things on github.
But maybe it's just me and others find searching through a dozen forum pages convenient.

Offline

#4490 2024-05-03 20:20:41

ceeslans
Member
Registered: 2015-09-30
Posts: 195

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

GioD wrote:
marens wrote:

^ You probably haven't updated the accuweather script.
There have been several changes.

I'd put such things on github.
But maybe it's just me and others find searching through a dozen forum pages convenient.

inconvenient, yes -- but definitely rewarding

Offline

#4491 2024-05-04 00:02:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

@GioD

I don't think you are familiar enough with the situation we are in.
The author of the accuweather script (@TBG) is a genius and we owe him a big thank you for his work.

Unfortunately, this happened:
https://forums.bunsenlabs.org/viewtopic … 72#p120672

After that, @il.harun did a great job of maintaining the script for the next 9 months but announced that he was ending support:
https://forums.bunsenlabs.org/viewtopic … 88#p124088

Let's go back to the beginning.
Sorry, I'm not a developer (I don't care about GitHub), and I'm not a moderator here either.
I came with the desire to help save this script:
https://forums.bunsenlabs.org/viewtopic … 38#p125938

In the meantime, things happened that I don't want to mention because I won't go back into the past.
Anyway, I stopped supporting the accuweather script.

I can only help with things I've already posted.

P.S.
I am glad that after 15 months my solutions are still working.
The basic version of the accuweather script is saved.
Sometimes @il.harun helped me.
I have great respect for him.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4492 2024-05-05 17:12:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

In the last few posts (about the daily_phrase  file) I used the command trans --brief  instead of trans -brief.

Although both commands work, I edited those posts because:

$ man trans
  ...
       -b, -brief
              Brief mode.
  ...

Last edited by marens (2024-05-05 21:48:00)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4493 2024-05-07 12:14:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

MoonGiant Conky Script

It happened again (yesterday).
This time the moogiant script is not working properly.
Those who only use the image of the moon will not notice.
I'm also not using all the data, but the problem is solved.

Find the line:

phase=$(sed -n 21p $HOME/Moongiant_conky_script/raw|sed 's/ //')

Add above (it should look like this):

#### Marens Settings - 06.05.2024
sed -i -e '/<p style/g' -e '/^$/d' $HOME/Moongiant_conky_script/raw
#### END Marens Settings - 06.05.2024

phase=$(sed -n 21p $HOME/Moongiant_conky_script/raw|sed 's/ //')

After testing  I can say that everything is fine (for me).

moon2.png    moon1.png

P.S.
@unklar is the author of default conkies (.conkyrc_moongiant_unklar1 and .conkyrc_moongiant_unklar2).
They will check (on their end) that everything is working properly.

Last edited by marens (2024-05-07 16:54:39)


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4494 2024-05-08 08:04:38

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

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

marens wrote:

P.S.
@unklar is the author of default conkies (.conkyrc_moongiant_unklar1 and .conkyrc_moongiant_unklar2).
They will check (on their end) that everything is working properly.

That is wrong.
Configuration files with such long file names were never my cup of tea.  tongue

Link ?

Offline

#4495 2024-05-08 12:53:45

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

unklar wrote:
marens wrote:

P.S.
@unklar is the author of default conkies (.conkyrc_moongiant_unklar1 and .conkyrc_moongiant_unklar2).
They will check (on their end) that everything is working properly.

That is wrong.
Configuration files with such long file names were never my cup of tea.  tongue

Link ?

https://gitlab.com/teobigusgeekus/Moong … nky_script

Maybe @TBG gave those names.
There must be a reason why unklar1(2).
If that has nothing to do with you, sorry.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4496 2024-05-08 15:51:20

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

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

marens wrote:
unklar wrote:
marens wrote:

P.S.
@unklar is the author of default conkies (.conkyrc_moongiant_unklar1 and .conkyrc_moongiant_unklar2).
They will check (on their end) that everything is working properly.

That is wrong.
Configuration files with such long file names were never my cup of tea.  tongue

Link ?

https://gitlab.com/teobigusgeekus/Moong … nky_script

Maybe @TBG gave those names.
There must be a reason why unklar1(2).
If that has nothing to do with you, sorry.

Thanks for the link. You don't need to apologize. I don't expect you to understand the friendship of two Old with a Script-Genie.


The author of these configuration files is @Sector11.
I helped clean up the code and convert it to 1.10 syntax. See: https://forums.bunsenlabs.org/viewtopic.php?id=189

PS: If I adjust the code according to the raw file, it's ok again.  wink


467007151_2024-05-07-17-56-08_scrot.png

Offline

#4497 2024-05-08 16:14:11

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

Thanks for the explanation.
I really don't have time to wade through 220+ pages with 4500 replies.

I just needed this:

unklar wrote:

If I adjust the code according to the raw file, it's ok again.

Thanks for the feedback.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4498 2024-05-16 16:23:57

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

Trans Command - Improve the translation

marens wrote:

Maybe the translation will be weird sometimes, but it needs time to test.

Yes.
Sometimes it's not the best translation, but that's to be expected.

However, we can easily  find a solution if we test long enough, since most of them are repeated phrases.
Just replace the wrong word (phrase) with the sed command at the end:

Example:

${execi 600 some command | trans -brief :en | sed 's/Wrong1/Correct1/g' | sed 's/Wrong2/Correct2/g' | sed ...}

Note:
Pay attention to upper and lower case letters.


If people would know how little brain is ruling the world, they would die of fear.

Offline

#4499 2024-05-24 19:39:03

loutch
Member
Registered: 2015-12-12
Posts: 848

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

Hello guys

Accuweather conky work great with an API KEY everything is in French, the only problem is that since it's a free key, y only have 20 calls in 24 hours , the current weather forecast, five days and twelve hours, and it's well supplied.

In addition, the hours are taken into account, as they are on Theo's script when it's launched .

Capture-d-cran-2024-05-24-21-30-57.png


@+

Last edited by loutch (2024-05-24 20:36:13)


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

#4500 2024-05-25 00:00:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 827

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

^ That's not Teo's script?
Or you just changed the address (with API key)?

loutch wrote:

... the only problem is that since it's a free key, y only have 20 calls in 24 hours , the current weather forecast, five days and twelve hours, and it's well supplied.

I think that's fine.
Running the script every 30-40 minutes should be enough  for a day (average user).
Dew point and sun (moon) data is missing, but we have a moongiant script.

Anyway, great job and nice find as expected from you.


If people would know how little brain is ruling the world, they would die of fear.

Offline

Board footer

Powered by FluxBB