You are not logged in.

#1 Yesterday 06:15:06

asqwerth
Member
Registered: 2015-10-08
Posts: 59

Accuweather conky script - no icons showing

Sigh.  I know it's no longer being maintained, but it does look like the part of the script that assigned icons/conkyweather font to the weather condition/forecast in question is no longer working.

Wind direction icon, and the textual weather conditions/forecasts still show.

Thankfully, Weather underground script is back, and we have the TAD script.

But it's still a pity.

Offline

#2 Yesterday 09:19:23

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

Re: Accuweather conky script - no icons showing

^I think @marens gets it with 'sed'.  wink
curr_cond

v2a/7
-1
-4
Cloudy
ENE
13 km/h
87%
↔ 1007 mb
0.8 (Low)
91%
87%
-2
24 km
028 km/h
4100 m
-
28 km/h
4100 m
4100 m
4100 m
<

Screenshot-19-Feb-09-42-42-25325.png

Offline

#3 Yesterday 19:10:20

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,102

Re: Accuweather conky script - no icons showing

asqwerth wrote:

Sigh.  I know it's no longer being maintained, but it does look like the part of the script that assigned icons/conkyweather font to the weather condition/forecast in question is no longer working.

Wind direction icon, and the textual weather conditions/forecasts still show.

Thankfully, Weather underground script is back, and we have the TAD script.

But it's still a pity.

Yes, you're right.
The developers of Accuweather have changed the folder where the icons are located.

I fixed it today in #### Marens Hourly:
https://forums.bunsenlabs.org/viewtopic … 30#p128130

Note *
@johnraff closed that thread and I don't have access.

#Icons
        cat $HOME/Accuweather_conky_script/hourly | grep '<svg class="icon" data-src="/images/weathericons/' | awk '{print $3}' | awk -F'weathericons/' '{print $2}' | sed -r 's/.{5}$//' | sed s'/v2a\///g' > $HOME/Accuweather_conky_script/marens_hourly/icons

First I had to fix the  accuweather  script.

Replace line:

	       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/curr_cond_temp

With (it should look like this):

		#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/curr_cond_temp

## Marens Settings  - Added Line
	        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' -e 's/v2a\///g' $HOME/Accuweather_conky_script/curr_cond_temp

Replace line:

		sed -i -e 's/\.svg.*$//g' -e 's/&#xB0;<\/span>//g' -e 's/<\/span>//g' $HOME/Accuweather_conky_script/daily_forecast

With (it should look like this):

		#sed -i -e 's/\.svg.*$//g' -e 's/&#xB0;<\/span>//g' -e 's/<\/span>//g' $HOME/Accuweather_conky_script/daily_forecast

## Marens Settings  - Added Line		
		sed -i -e 's/\.svg.*$//g' -e 's/&#xB0;<\/span>//g' -e 's/<\/span>//g' -e 's/v2a\///g' $HOME/Accuweather_conky_script/daily_forecast

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

Offline

#4 Today 06:56:17

asqwerth
Member
Registered: 2015-10-08
Posts: 59

Re: Accuweather conky script - no icons showing

Thanks, marens. The normal current and daily forecast icons are back.

As I have never used the hourly forecasts/conditions in Accuweather conky script, I had not previously added your fixes to the "hourly" section of the original TBG script.  So now that I am adding your #Marens Hourly script lines, I note that I still have the following section below. 

Should I comment them all out?

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

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

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

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

		sed -i '/Indoor Humidity\|Air Quality\|RealFeel Shade\|RealFeel Guide\|Ice/d' $HOME/Accuweather_conky_script/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/hourly

##adding empty lines for compatibility with the old config. file
#date
		sed -i -e 's/<\/span><\/h2>/\n--/g' $HOME/Accuweather_conky_script/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/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/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/hourly) == Wind ]]; then
					j=$((i-2))
					if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/hourly) != 'Max UV Index' ]]; then
						sed -i "${i}s/^/Max UV Index\n0\n/" $HOME/Accuweather_conky_script/hourly
						((i+=3))
					fi
				elif [[ $(sed -n ${i}p $HOME/Accuweather_conky_script/hourly) == Visibility ]]; then
					j=$((i-2))
					if [[ $(sed -n ${j}p $HOME/Accuweather_conky_script/hourly) != 'Rain' && $(sed -n ${j}p $HOME/Accuweather_conky_script/hourly) != 'Snow' ]]; then
						sed -i "${i}s/^/Prec. Amount\n-\n/" $HOME/Accuweather_conky_script/hourly
						((i+=3))
					fi
				fi
			((i+=1))
			done < $HOME/Accuweather_conky_script/hourly

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

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


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


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

Offline

#5 Today 09:54:52

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

Re: Accuweather conky script - no icons showing

marens wrote:

The developers of Accuweather have changed the folder where the icons are located.

^Thanks for fixing that.

Offline

#6 Today 10:56:03

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

Re: Accuweather conky script - no icons showing

... aaand the icons are back again!  thanks a lot @marens
cheeese-20260220-11-47-34.png

Offline

#7 Today 13:26:40

marens
Member
From: World without M$
Registered: 2023-02-02
Posts: 1,102

Re: Accuweather conky script - no icons showing

asqwerth wrote:

As I have never used the hourly forecasts/conditions in Accuweather conky script, I had not previously added your fixes to the "hourly" section of the original TBG script.  So now that I am adding your #Marens Hourly script lines, I note that I still have the following section below.

Should I comment them all out?

I also never use the hourly forecast.

I created my plugin for the accuweather script to help some people.
At @loutch's request I added wind (direction, icons):
https://forums.bunsenlabs.org/viewtopic … 46#p136646

Here's what to do if you don't need the rest of the script:
https://forums.bunsenlabs.org/viewtopic … 80#p134980

Please make a copy of the script first.

EDIT
I forgot that I later added a weatherfont for the hourly forecast at @loutch's request:
https://forums.bunsenlabs.org/viewtopic … 31#p145931

Last edited by marens (Today 14:30:50)


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

Offline

Board footer

Powered by FluxBB