You are not logged in.

#561 2016-01-16 21:21:13

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

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

@Detroiter_Overseas
As S11 mentioned, better use the 2b script.
A solution for the 1a script would involve I guess the use of cookies: find the cookie responsible for units with the help of a web browser and use it in the script to download the necessary pages.
Unless it's javascript...  8.(

@S11
You're welcome me old bean.

Last edited by TeoBigusGeekus (2016-01-16 22:30:07)


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

#562 2016-01-17 05:13:40

Detroiter_Overseas
New Member
Registered: 2016-01-16
Posts: 2

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

TeoBigusGeekus wrote:

@Detroiter_Overseas
As S11 mentioned, better use the 2b script.
A solution for the 1a script would involve I guess the use of cookies: find the cookie responsible for units with the help of a web browser and use it in the script to download the necessary pages.
Unless it's javascript...  8.(

@S11
You're welcome me old bean.

I'll try the 2b script and then amend it to simplify. Looking to take up a minimum of desktop real estate.
Thanks, S11 & Teo.

Offline

#563 2016-01-17 10:26:02

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

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

TeoBigusGeekus wrote:

Cheers mate!

You still haven't answered me though...

Sorry...I failed to check back to see if there might be a response.  Anyway, wind speed is for wind that constantly blows.  A gust is a momentary increase in wind speed.  Hah!  The following link pretty much says the same.  wink

http://www.differencebetween.net/scienc … -and-wind/

Offline

#564 2016-01-17 12:20:56

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

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

@ KrunchTime.  Teos's 2b) WUnderground API - All users - 2b_21-12-15 shows 'gusts'

Lines 73 to 83 in "Conditions"


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#565 2016-01-17 17:17:46

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

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

Hello

I finish my 2b_wunderground conky and hope it's completely traduce in French  big_smile  big_smile  big_smile

1453050967.png

the conkyrc

 
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1240 00
maximum_width 1240
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 ff0000 #LightSalmon
default_outline_color black
alignment tl
gap_x 250
gap_y 160
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0 
 uppercase no

 lua_load ~/.conky/lua/image.lua
 
 
 
TEXT

${execi 1800 bash $HOME/2b_Wunderground_API/2b}\
	${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 258 45 98 58}\
${font URW Chancery L:style=Bold:size=16}${voffset -20}${goto 15}${time %A, %d %B %Y}${voffset -20}${font}\
${voffset 20}${goto 370}${execi 600  sed -n '5p' $HOME/2b_Wunderground_API/Conditions}     ${goto 830}Mise à jour ${execi 600  sed -n '53p' $HOME/2b_Wunderground_API/Conditions}\
${goto 260}${color7}${execi 600  sed -n '6p' $HOME/2b_Wunderground_API/Moon_Sun}${color}
${voffset 10}${color5}${goto 380}${execi 600 echo `date --date="0 day" | awk '{print $1" "$3}'`}\
		${goto 460}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3} {}'`}\
		${goto 530}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3} {}'`}\
		${goto 600}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3} {}'`}\
		${goto 670}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3} {}'`}\
		${goto 740}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3} {}'`}\
		${goto 810}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3} {}'`}\
		${goto 880}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3} {}'`}\
		${goto 950}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3} {}'`}\
		${goto 1020}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3} {}'`}${color}${voffset -10}
  ${color5}${execi 600  sed -n '63p' $HOME/2b_Wunderground_API/Conditions-fr}${color}
  Pression ${execi 600  sed -n '85p' $HOME/2b_Wunderground_API/Conditions}mb\
	${goto 160}Index UV  ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Conditions}
  Pt. Rosée     ${execi 600  sed -n '95p' $HOME/2b_Wunderground_API/Conditions}°\
	${goto 160}Humiditée  ${execi 600  sed -n '69p' $HOME/2b_Wunderground_API/Conditions}
  Visibilitée  ${execi 600  sed -n '117p' $HOME/2b_Wunderground_API/Conditions}km\
	${goto 160}Pluie  ${execi 600  sed -n '133p' $HOME/2b_Wunderground_API/Conditions}mm
  Vent        ${execi 600  sed -n '81p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 160}${execi 600  sed -n '73p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 200}${execi 600  sed -n '75p' $HOME/2b_Wunderground_API/Conditions}°		
  Heu.Lev.: ${color8}${execi 600  sed -n '16p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '18p' $HOME/2b_Wunderground_API/Moon_Sun} \
${goto 150}${color} Heur Cou.: ${color1}${execi 600  sed -n '21p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '23p' $HOME/2b_Wunderground_API/Moon_Sun}${color}\
${voffset -35}${goto 250} Temp. ${goto 320}Res.
	${goto 260}${font URW Chancery L:style=Bold :size=12}${color3}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Conditions}°${color}\
	${goto 315}${color3}±${execi 600  sed -n '113p' $HOME/2b_Wunderground_API/Conditions}°${color}${font}${voffset 35}\
	${voffset -65}\
${goto 350}Temp.:${color9}${goto 400}${execi 600  sed -n '39p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	          ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 350}Vent.: ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 350}Vit.: ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 65}

${voffset -20}${goto 14}${execi 600  sed -n '157p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 85}${execi 600  sed -n '391p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '355p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 155}${execi 600  sed -n '625p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '589p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 225}${execi 600  sed -n '859p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '823p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 295}${execi 600  sed -n '1093p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '1057p' $HOME/2b_Wunderground_API/Hourly} H ${voffset 20}
${voffset -90}${color5}${goto 380}${execi 600 echo `date --date="0 day" | awk '{print $1" "$3}'`}\
	${goto 460}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3} {}'`}\
	${goto 530}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3} {}'`}\
	${goto 600}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3} {}'`}\
	${goto 670}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3} {}'`}\
	${goto 740}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3} {}'`}\
	${goto 810}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3} {}'`}\
	${goto 880}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3} {}'`}\
	${goto 950}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3} {}'`}\
	${goto 1020}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3} {}'`}${voffset 90}
${voffset -30}${goto 13}Hum${goto 50}±\
${goto 84}Hum${goto 120}±\
${goto 153}Hum${goto 190}±\
${goto 222}Hum${goto 260}±\
${goto 292}Hum${goto 330}±\
	${color}${voffset 50}
	${voffset -50}\
	${goto 13}${execi 600  sed -n '202p' $HOME/2b_Wunderground_API/Hourly}%${goto 50}${execi 600  sed -n '217p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 84}${execi 600  sed -n '436p' $HOME/2b_Wunderground_API/Hourly}%${goto 120}${execi 600  sed -n '451p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 153}${execi 600  sed -n '670p' $HOME/2b_Wunderground_API/Hourly}%${goto 190}${execi 600  sed -n '685p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 222}${execi 600  sed -n '904p' $HOME/2b_Wunderground_API/Hourly}%${goto 260}${execi 600  sed -n '919p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 292}${execi 600  sed -n '1138p' $HOME/2b_Wunderground_API/Hourly}%${goto 330}${execi 600  sed -n '1153p' $HOME/2b_Wunderground_API/Hourly}${voffset -50}
${voffset -5}\
	${goto 350}Temp.:${color3}${goto 400}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	                  ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 350}Vent.: ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 350}Vit.: ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 65}
	
${lua fDrawImage $HOME/2b_Wunderground_API/Moon_phase.png 220 2 30 30}\
${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 258 45 98 58}\
${lua fDrawImage $HOME/2b_Wunderground_API/d1.png 367 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d2.png 436 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d3.png 506 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d4.png 576 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d5.png 646 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d6.png 721 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d7.png 791 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d8.png 861 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d9.png 931 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d10.png 1001 60 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n1.png 367 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n2.png 436 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n3.png 506 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n4.png 576 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n5.png 646 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n6.png 721 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n7.png 791 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n8.png 861 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n9.png 931 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n10.png 1001 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h2.png 10 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h4.png 80 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h6.png 150 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h8.png 220 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h10.png 290 170 66 40}

${voffset -150} 

To Teo "Great job "


@+

Last edited by loutch (2016-01-17 17:26:42)


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

#566 2016-01-17 18:13:36

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

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

@ loutch  Nice!  I like the layout.

There are a couple places where English is displayed you 'might' want to look at them.

west = ouest

${if_match "${command to get direction}"=="NW"}NO${else}\
${if_match "${command to get direction}"=="WNW"}ONO${else}\
${if_match "${command to get direction}"=="NNW"}NNO${else}\
${if_match "${command to get direction}"=="W"}O${else}\
${if_match "${command to get direction}"=="SSW"}SSO${else}\
${if_match "${command to get direction}"=="SW"}SO${else}\
${if_match "${command to get direction}"=="WSW"}OSO\
${endif}${endif}${endif}${endif}${endif}${endif}${endif}

Quite possibly too much.


But the Day Hours are easier to fix You are reading the script for the "hours" and getting English.  You can use the 'date' command and get the day name and hour from your system settings:
2016_01_17_15_06_24_Scrot11.png

Example:  Now =  ${execi 600 echo `date --date="0 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus  2 hours =  ${execi 600 echo `date --date="2 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus  4 hours =  ${execi 600 echo `date --date="4 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus  6 hours =  ${execi 600 echo `date --date="6 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus  8 hours =  ${execi 600 echo `date --date="8 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus 10 hours =  ${execi 600 echo `date --date="10 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus 12 hours =  ${execi 600 echo `date --date="12 hour" | awk '{print $1" "$4}' | cut -c-6`} H
Plus 14 hours =  ${execi 600 echo `date --date="14 hour" | awk '{print $1" "$4}' | cut -c-6`} H

smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#567 2016-01-17 18:49:57

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

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

@ Sector11

Thank's you give me an idea i ad in the 2f file this line an wind directions are in french

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' /$HOME/2b_Wunderground_API/Simple_Forecast

Here are my conky-weather I think now of having a wide selection to choose anyone wink

1453057736.png




@+

Last edited by loutch (2016-01-17 19:09:14)


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

#568 2016-01-17 19:26:55

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

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

Nice work loutch!

Thanks for the explanation Krunchtime.


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

#569 2016-01-17 20:00:58

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

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

loutch wrote:

@ Sector11

Thank's you give me an idea i ad in the 2f file this line an wind directions are in french

OOPS!  I had totally forgotten about that. :8
Much better than the if_match.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#570 2016-01-17 20:49: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)

Because the CPU utilization of 15-20% , i have

update_interval = 0.5,

to 2sec. increased and am now at 3-5%  smile

Offline

#571 2016-01-17 21:24:56

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

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

yikes  I have no idea how that 0.5 got there! yikes

I must have been testing something and forgot to change it.

Sorry!  Changed the code in my post as well.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#572 2016-01-17 21:53:12

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

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

It is a CPU sucker though ... I started it with a 1 second update and all execi's to 1200 --- dragged all my other conkys onto one screen and:
2016_01_17_18_30_55_Scrot11.jpg

CPU Agerage at 4% CPU 1 at 6  ... must fix that.

The one between the huge Blue Date and Time is a hybred.  It's getting data from  /1b2_accuweather_conkyweather_font and 2b_Wunderground_API, two seperate conkys rin the scripts - and nothing else, so all my other weather conkys just display data, they don't go online.  Wunderground doesn't display the UVI for my location - accuweather does.  Also wunderground shows the 'trend' for the Barometric Pressure  The two conkys smuged out only update their data once a day.

Without the Accuweather 9 day 14 hour conky running it drops nicely: 2016_01_17_18_34_33_Scrot11.png


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#573 2016-01-19 15:57:55

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

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

loutch wrote:

Hello

I finish my 2b_wunderground conky and hope it's completely traduce in French  big_smile  big_smile  big_smile

http://pix.tdct.org/upload/img/1453050967.png

the conkyrc

 
background yes
use_xft yes
xftfont URW Chancery L:style=Bold:size=10
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 1240 00
maximum_width 1240
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 ff0000 #LightSalmon
default_outline_color black
alignment tl
gap_x 250
gap_y 160
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0 
 uppercase no

 lua_load ~/.conky/lua/image.lua
 
 
 
TEXT

${execi 1800 bash $HOME/2b_Wunderground_API/2b}\
	${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 258 45 98 58}\
${font URW Chancery L:style=Bold:size=16}${voffset -20}${goto 15}${time %A, %d %B %Y}${voffset -20}${font}\
${voffset 20}${goto 370}${execi 600  sed -n '5p' $HOME/2b_Wunderground_API/Conditions}     ${goto 830}Mise à jour ${execi 600  sed -n '53p' $HOME/2b_Wunderground_API/Conditions}\
${goto 260}${color7}${execi 600  sed -n '6p' $HOME/2b_Wunderground_API/Moon_Sun}${color}
${voffset 10}${color5}${goto 380}${execi 600 echo `date --date="0 day" | awk '{print $1" "$3}'`}\
		${goto 460}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3} {}'`}\
		${goto 530}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3} {}'`}\
		${goto 600}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3} {}'`}\
		${goto 670}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3} {}'`}\
		${goto 740}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3} {}'`}\
		${goto 810}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3} {}'`}\
		${goto 880}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3} {}'`}\
		${goto 950}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3} {}'`}\
		${goto 1020}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3} {}'`}${color}${voffset -10}
  ${color5}${execi 600  sed -n '63p' $HOME/2b_Wunderground_API/Conditions-fr}${color}
  Pression ${execi 600  sed -n '85p' $HOME/2b_Wunderground_API/Conditions}mb\
	${goto 160}Index UV  ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Conditions}
  Pt. Rosée     ${execi 600  sed -n '95p' $HOME/2b_Wunderground_API/Conditions}°\
	${goto 160}Humiditée  ${execi 600  sed -n '69p' $HOME/2b_Wunderground_API/Conditions}
  Visibilitée  ${execi 600  sed -n '117p' $HOME/2b_Wunderground_API/Conditions}km\
	${goto 160}Pluie  ${execi 600  sed -n '133p' $HOME/2b_Wunderground_API/Conditions}mm
  Vent        ${execi 600  sed -n '81p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 160}${execi 600  sed -n '73p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 200}${execi 600  sed -n '75p' $HOME/2b_Wunderground_API/Conditions}°		
  Heu.Lev.: ${color8}${execi 600  sed -n '16p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '18p' $HOME/2b_Wunderground_API/Moon_Sun} \
${goto 150}${color} Heur Cou.: ${color1}${execi 600  sed -n '21p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '23p' $HOME/2b_Wunderground_API/Moon_Sun}${color}\
${voffset -35}${goto 250} Temp. ${goto 320}Res.
	${goto 260}${font URW Chancery L:style=Bold :size=12}${color3}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Conditions}°${color}\
	${goto 315}${color3}±${execi 600  sed -n '113p' $HOME/2b_Wunderground_API/Conditions}°${color}${font}${voffset 35}\
	${voffset -65}\
${goto 350}Temp.:${color9}${goto 400}${execi 600  sed -n '39p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	          ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 350}Vent.: ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 350}Vit.: ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 65}

${voffset -20}${goto 14}${execi 600  sed -n '157p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 85}${execi 600  sed -n '391p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '355p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 155}${execi 600  sed -n '625p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '589p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 225}${execi 600  sed -n '859p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '823p' $HOME/2b_Wunderground_API/Hourly} H\
  ${goto 295}${execi 600  sed -n '1093p' $HOME/2b_Wunderground_API/Hourly} ${execi 600  sed -n '1057p' $HOME/2b_Wunderground_API/Hourly} H ${voffset 20}
${voffset -90}${color5}${goto 380}${execi 600 echo `date --date="0 day" | awk '{print $1" "$3}'`}\
	${goto 460}${execi 600 echo `date --date="1 day" | awk '{print $1" "$3} {}'`}\
	${goto 530}${execi 600 echo `date --date="2 day" | awk '{print $1" "$3} {}'`}\
	${goto 600}${execi 600 echo `date --date="3 day" | awk '{print $1" "$3} {}'`}\
	${goto 670}${execi 600 echo `date --date="4 day" | awk '{print $1" "$3} {}'`}\
	${goto 740}${execi 600 echo `date --date="5 day" | awk '{print $1" "$3} {}'`}\
	${goto 810}${execi 600 echo `date --date="6 day" | awk '{print $1" "$3} {}'`}\
	${goto 880}${execi 600 echo `date --date="7 day" | awk '{print $1" "$3} {}'`}\
	${goto 950}${execi 600 echo `date --date="8 day" | awk '{print $1" "$3} {}'`}\
	${goto 1020}${execi 600 echo `date --date="9 day" | awk '{print $1" "$3} {}'`}${voffset 90}
${voffset -30}${goto 13}Hum${goto 50}±\
${goto 84}Hum${goto 120}±\
${goto 153}Hum${goto 190}±\
${goto 222}Hum${goto 260}±\
${goto 292}Hum${goto 330}±\
	${color}${voffset 50}
	${voffset -50}\
	${goto 13}${execi 600  sed -n '202p' $HOME/2b_Wunderground_API/Hourly}%${goto 50}${execi 600  sed -n '217p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 84}${execi 600  sed -n '436p' $HOME/2b_Wunderground_API/Hourly}%${goto 120}${execi 600  sed -n '451p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 153}${execi 600  sed -n '670p' $HOME/2b_Wunderground_API/Hourly}%${goto 190}${execi 600  sed -n '685p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 222}${execi 600  sed -n '904p' $HOME/2b_Wunderground_API/Hourly}%${goto 260}${execi 600  sed -n '919p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 292}${execi 600  sed -n '1138p' $HOME/2b_Wunderground_API/Hourly}%${goto 330}${execi 600  sed -n '1153p' $HOME/2b_Wunderground_API/Hourly}${voffset -50}
${voffset -5}\
	${goto 350}Temp.:${color3}${goto 400}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	                  ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 350}Vent.: ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 350}Vit.: ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 65}
	
${lua fDrawImage $HOME/2b_Wunderground_API/Moon_phase.png 220 2 30 30}\
${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 258 45 98 58}\
${lua fDrawImage $HOME/2b_Wunderground_API/d1.png 367 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d2.png 436 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d3.png 506 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d4.png 576 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d5.png 646 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d6.png 721 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d7.png 791 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d8.png 861 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d9.png 931 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d10.png 1001 60 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n1.png 367 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n2.png 436 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n3.png 506 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n4.png 576 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n5.png 646 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n6.png 721 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n7.png 791 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n8.png 861 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n9.png 931 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n10.png 1001 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h2.png 10 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h4.png 80 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h6.png 150 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h8.png 220 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h10.png 290 170 66 40}

${voffset -150} 

To Teo "Great job "


@+

Hi loutch !
Thanks for this config, I really like this displaying, you've done a great work.
I've borrowed your conky and modify it because I had problems for "short date name" and the "hours forecast" I also add a draw_bg... And modify fonts too... Here's the result:
1453218881.png

conkywunloutch:

background yes
use_xft yes
xftfont pftempestafivecondensed:style=Bold:size=7
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
#own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager,sticky
double_buffer yes
minimum_size 1100 280
maximum_width 1100
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color ffffff
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 ff0000 #LightSalmon
default_outline_color black
alignment tl
gap_x 50
gap_y 100
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0 
uppercase no

lua_load ~/.conky/script/image.lua
lua_load ~/.conky/script/draw_bg.lua 
 
 
TEXT
${lua conky_draw_bg 10 0 0 355 280 0x000000 0.20}\
${lua conky_draw_bg 10 0 0 1100 280 0x000000 0.45}\
${execi 1800 bash $HOME/2b_Wunderground_API/2b}\

	${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 258 45 98 58}\
${font Calibri:style=Bold:size=16}${goto 15}${time %A, %d %B %Y}${voffset -20}${font}\
${goto 380}${execi 600  sed -n '5p' $HOME/2b_Wunderground_API/Conditions}     ${goto 830}Mise à jour ${execi 600  sed -n '53p' $HOME/2b_Wunderground_API/Conditions}\
${goto 260}${voffset 10}${color7}${execi 600  sed -n '6p' $HOME/2b_Wunderground_API/Moon_Sun}${color}
${voffset 15}${color5}${goto 380}${execi 600 echo `date --date "0 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 460}${execi 600 echo `date --date "1 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 530}${execi 600 echo `date --date "2 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 600}${execi 600 echo `date --date "3 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 670}${execi 600 echo `date --date "4 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 740}${execi 600 echo `date --date "5 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 810}${execi 600 echo `date --date "6 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 880}${execi 600 echo `date --date "7 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 950}${execi 600 echo `date --date "8 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 1020}${execi 600 echo `date --date "9 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}${color}${voffset -10}
  ${color5}${execi 600  sed -n '63p' $HOME/2b_Wunderground_API/Conditions-fr}${color}
  Pression ${execi 600  sed -n '85p' $HOME/2b_Wunderground_API/Conditions}mb\
	${goto 160}Index UV  ${execi 600  sed -n '121p' $HOME/2b_Wunderground_API/Conditions}
  Pt. Rosée     ${execi 600  sed -n '95p' $HOME/2b_Wunderground_API/Conditions}°\
	${goto 160}Humiditée  ${execi 600  sed -n '69p' $HOME/2b_Wunderground_API/Conditions}
  Visibilitée  ${execi 600  sed -n '117p' $HOME/2b_Wunderground_API/Conditions}km\
	${goto 160}Pluie  ${execi 600  sed -n '133p' $HOME/2b_Wunderground_API/Conditions}mm
  Vent        ${execi 600  sed -n '81p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 160}${execi 600  sed -n '73p' $HOME/2b_Wunderground_API/Conditions}\
	${goto 200}${execi 600  sed -n '75p' $HOME/2b_Wunderground_API/Conditions}°		
  ${color8}${font VariShapes Solid:pixelsize=10}q${font }${execi 600  sed -n '16p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '18p' $HOME/2b_Wunderground_API/Moon_Sun} \
${goto 150}${color1}${font VariShapes Solid:pixelsize=10}Q${font }${execi 600  sed -n '21p' $HOME/2b_Wunderground_API/Moon_Sun}:${execi 600  sed -n '23p' $HOME/2b_Wunderground_API/Moon_Sun}${color}\
${voffset 5}${color1}${goto 250} Temp. ${goto 320}Res.
	${goto 260}${font pftempestafivecondensed:style=Bold :size=12}${color3}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Conditions}°${color}\
	${goto 315}${color3}±${execi 600  sed -n '113p' $HOME/2b_Wunderground_API/Conditions}°${color}${font}${voffset 35}\
	${voffset -70}\
${goto 360}T°${color9}${goto 400}${execi 600  sed -n '39p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	          ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		          ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 360}V ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 360}Vit. ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset 70}

${voffset -60}${goto 14}${execi 600 echo `date --date "2 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
  ${goto 85}${execi 600 echo `date --date "4 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
  ${goto 155}${execi 600 echo `date --date "6 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
  ${goto 225}${execi 600 echo `date --date "8 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}\
  ${goto 295}${execi 600 echo `date --date "10 hour" +%H:%M|sed -e 's/\(.\{1\}\)/\U\1/'`}${voffset 10}
${voffset -20}${color5}${goto 380}${execi 600 echo `date --date "0 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
	${goto 460}${execi 600 echo `date --date "1 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 530}${execi 600 echo `date --date "2 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 600}${execi 600 echo `date --date "3 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 670}${execi 600 echo `date --date "4 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 740}${execi 600 echo `date --date "5 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 810}${execi 600 echo `date --date "6 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 880}${execi 600 echo `date --date "7 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 950}${execi 600 echo `date --date "8 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}\
		${goto 1020}${execi 600 echo `date --date "9 day" +%a-%d|sed -e 's/\(.\{1\}\)/\U\1/'`}${voffset 80}
${voffset -40}${goto 13}Hum${goto 50}±\
${goto 84}Hum${goto 120}±\
${goto 153}Hum${goto 190}±\
${goto 222}Hum${goto 260}±\
${goto 292}Hum${goto 330}±\
	${color}${voffset 50}
	${voffset -50}\
	${goto 13}${execi 600  sed -n '202p' $HOME/2b_Wunderground_API/Hourly}%${goto 50}${execi 600  sed -n '217p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 84}${execi 600  sed -n '436p' $HOME/2b_Wunderground_API/Hourly}%${goto 120}${execi 600  sed -n '451p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 153}${execi 600  sed -n '670p' $HOME/2b_Wunderground_API/Hourly}%${goto 190}${execi 600  sed -n '685p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 222}${execi 600  sed -n '904p' $HOME/2b_Wunderground_API/Hourly}%${goto 260}${execi 600  sed -n '919p' $HOME/2b_Wunderground_API/Hourly}\
	${goto 292}${execi 600  sed -n '1138p' $HOME/2b_Wunderground_API/Hourly}%${goto 330}${execi 600  sed -n '1153p' $HOME/2b_Wunderground_API/Hourly}${voffset -50}
${voffset 25}\
	${goto 360}T°${color3}${goto 400}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	                  ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}
${goto 360}V. ${goto 390}${execi 600  sed -n '89p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 460}${execi 600  sed -n '195p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 530}${execi 600  sed -n '301p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 600}${execi 600  sed -n '407p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 670}${execi 600  sed -n '513p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 740}${execi 600  sed -n '619p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 810}${execi 600  sed -n '725p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 880}${execi 600  sed -n '831p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 950}${execi 600  sed -n '937p' $HOME/2b_Wunderground_API/Simple_Forecast}\
                  ${goto 1020}${execi 600  sed -n '1043p' $HOME/2b_Wunderground_API/Simple_Forecast}
${goto 360}Vit. ${goto 390}${execi 600  sed -n '87p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 460}${execi 600  sed -n '193p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 530}${execi 600  sed -n '299p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 600}${execi 600  sed -n '405p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 670}${execi 600  sed -n '511p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 740}${execi 600  sed -n '617p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 810}${execi 600  sed -n '723p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 880}${execi 600  sed -n '829p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 950}${execi 600  sed -n '935p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h\
                 ${goto 1020}${execi 600  sed -n '1041p' $HOME/2b_Wunderground_API/Simple_Forecast}km/h${voffset -25}
	
${lua fDrawImage $HOME/2b_Wunderground_API/Moon_phase.png 220 2 30 30}\
${lua fDrawImage $HOME/2b_Wunderground_API/Now.png 258 25 98 58}\
${lua fDrawImage $HOME/2b_Wunderground_API/d1.png 367 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d2.png 446 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d3.png 516 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d4.png 586 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d5.png 656 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d6.png 731 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d7.png 801 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d8.png 871 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d9.png 941 60 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/d10.png 1011 60 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n1.png 367 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n2.png 436 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n3.png 506 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n4.png 576 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n5.png 646 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n6.png 721 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n7.png 791 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n8.png 861 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n9.png 931 170 66 40}\
			${lua fDrawImage $HOME/2b_Wunderground_API/n10.png 1001 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h2.png 0 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h4.png 70 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h6.png 140 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h8.png 210 170 66 40}\
${lua fDrawImage $HOME/2b_Wunderground_API/h10.png 280 170 66 40}
${voffset -95}

Offline

#574 2016-01-19 18:00:14

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

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

OK, I found a way to get weather conkys with images to use only 1 or 2% CPU cycles.  OH YEA!

Started like this here and unklar pointed out the high CPU usage. and first attempts failed to fix it satisfactorily for me... So ... ever the tweaker ...

I split "it" into two (better anyway IMHO) and configured them side by side with borders to see the windows.

So how does 0 to 1% sound for both conkys (running nothing else)?
2016_01_19_12_48_21_Scrot11.jpg
The bottom line is:

 ${cpu cpu0} | ${cpu cpu1} | ${cpu cpu2} | ${cpu cpu3}

with cpu0 being the average as we know.

I'm very pleased with that ... but there was some work getting it that way.
1. I copied the two /Forecast_Images directories to /Forecast_Images_50x30
    in: /1b1_accuweather_images/ and /1c_accuweather_images_hourly/

I ran:

mogrify -resize 50x30 /media/5/Conky/1b1_accuweather_images/Forecast_Images_50x30_50x30/*.png
mogrify -resize 50x30 /media/5/Conky/1c_accuweather_images_hourly/Forecast_Images_50x30_50x30/*.png

and copied:

  • /1b1 to /1b1_50x30, and

  • /1c to /1c_50x30

made them executable and changed all instances of "Forecast_Images" to "Forecast_Images_50x30" in the two new scripts and used the appropriate scripts in the two conkys.

Also in the "both "conkys - I really should have known this ... but hey, we learn when we learn, I made these changes:

## ---------- Miscellaneous Section
background yes
use_spacer none
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  ## <-- here
# Interval (in seconds) to flush Imlib2 cache.
imlib_cache_flush_interval 900  ## <--- and here

double_buffer yes
## ---------- End Miscellaneous Section  ###

then I stripped out the "-s" options all the ${image ...} calls except the one larger one.  Images are now being used at their normal size of 50x30

Next I tweaked the positioning and removed the stippled borders:
2016_01_19_12_54_51_Scrot11.png 2016_01_19_12_56_17_Scrot11.png
WOW!  1% - oh yea, medit is running.  wink

The final image showing the completed work (but still with the CPU lines), and no medit.
2016_01_19_12_56_51_Scrot11.jpg

S11_1b1_int_9.conky

# pkill -xf "conky -c /media/5/Conky/1b1_accuweather_images/S11_1b1_int_9.conky" &
## -- working: 2016-01-19

## Made to work together:
# /media/5/Conky/1b1_accuweather_images/S11_1b1_int_9.conky
# /media/5/Conky/1c_accuweather_images_hourly/S11_1c_hourly_14.conky

## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title Teo's Accuweather
### ARGB can be used for real transparency - requires composite manager
### Plays hell on conky with images.
#  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

minimum_size 75 00	# w|h
maximum_width 75

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

alignment tl
## ---------- End Window Settings
## ---------- Font Settings
use_xft yes
xftfont monofur:bold:size=9
xftalpha 1.0
override_utf8_locale yes
## ---------- End Font Settings
## ---------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 FFA07A #LightSalmon
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## 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
## ---------- Miscellaneous Section
background yes
use_spacer none
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

double_buffer yes
## ---------- End Miscellaneous Section  ###

#${image /media/5/Conky/images/red+x.png
#${texeci 1500 bash /media/5/Conky/1b1_accuweather_images/1b1_50x30}\
update_interval 1.0
TEXT
${texeci 1500 bash /media/5/Conky/1b1_accuweather_images/1b1_50x30}\
${color5}Currently${color}
${color9}${execi 900 sed -n '29p' /media/5/Conky/1b1_accuweather_images/curr_cond}°${color}
${image /media/5/Conky/1b1_accuweather_images/cc.png -p 2,15 -s 70x42}

    ${color8}± ${execi 900 sed -n '30p' /media/5/Conky/1b1_accuweather_images/curr_cond}°${color}
${execi 900 sed -n '33p' /media/5/Conky/1b1_accuweather_images/curr_cond}
UVI ${execi 900 sed -n '34p' /media/5/Conky/1b1_accuweather_images/curr_cond}
HUM ${execi 900 sed -n '32p' /media/5/Conky/1b1_accuweather_images/curr_cond}
DP  ${execi 900 sed -n '35p' /media/5/Conky/1b1_accuweather_images/curr_cond}°
Wnd ${execi 900 sed -n '31p' /media/5/Conky/1b1_accuweather_images/curr_cond}
@ ${execi 900 sed -n '38p' /media/5/Conky/1b1_accuweather_images/curr_cond}
Vis ${execi 900 sed -n '37p' /media/5/Conky/1b1_accuweather_images/curr_cond}
Cld ${execi 900 sed -n '36p' /media/5/Conky/1b1_accuweather_images/curr_cond}
${color8}S ${execi 900 sed -n '39p' /media/5/Conky/1b1_accuweather_images/curr_cond}
↓ ${execi 900 sed -n '40p' /media/5/Conky/1b1_accuweather_images/curr_cond}${color}
M ${execi 900 sed -n '41p' /media/5/Conky/1b1_accuweather_images/curr_cond}
↓ ${execi 900 sed -n '42p' /media/5/Conky/1b1_accuweather_images/curr_cond}
${color5}${time %a %e %b}${color}
${color9}${execi 900 sed -n '26p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/tod.png -p 25,232}\
${color8}± ${execi 900 sed -n '27p' /media/5/Conky/1b1_accuweather_images/first_days}${color}
CoP  ${execi 900 sed -n '28p' /media/5/Conky/1b1_accuweather_images/first_days}
 ${color5}TONIGHT${color}
${color9}${execi 900 sed -n '31p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/ton.png -p 25,282}\
${color8}± ${execi 900 sed -n '32p' /media/5/Conky/1b1_accuweather_images/first_days}${color}
CoP  ${color}${execi 900 sed -n '33p' /media/5/Conky/1b1_accuweather_images/first_days}
${membar 0,75}
${color5}${execi 900 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '4p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/6.png -p 25,350}\
${color7}${execi 900 sed -n '5p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${membar 0,75}
${color5}${execi 900 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '8p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/11.png -p 25,400}\
${color7}${execi 900 sed -n '9p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${membar 0,75}
${color5}${color5}${execi 900 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '13p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/16.png -p 25,453}\
${color7}${execi 900 sed -n '14p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${membar 0,75}
${color5}${execi 900 echo `date --date="4 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '9p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/21.png -p 25,507}\
${color7}${execi 900 sed -n '10p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${membar 0,75}
${color5}${execi 900 echo `date --date="5 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '18p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/last_2.png -p 25,560}\
${color7}${execi 900 sed -n '19p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${membar 0,75}
${color5}${execi 900 echo `date --date="6 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '23p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/last_7.png -p 25,612}\
${color7}${execi 900 sed -n '24p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
${membar 0,75}
${color5}${execi 900 echo `date --date="7 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '14p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/last_12.png -p 25,663}\
${color7}${execi 900 sed -n '15p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${membar 0,75}
${color5}${execi 900 echo `date --date="8 day" | awk '{print $1" "$3" "$2}'`}${color}
${color9}${execi 900 sed -n '19p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${image /media/5/Conky/1b1_accuweather_images/last_17.png -p 25,715}\
${color7}${execi 900 sed -n '20p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
${membar 0}

S11_1c_hourly_14.conky

## pkill -xf "conky -c /media/5/Conky/1c_accuweather_images_hourly/S11_1c_hourly_14.conky" &
## -- working: 2016-01-19

## Made to work together:
# /media/5/Conky/1b1_accuweather_images/S11_1b1_int_9.conky
# /media/5/Conky/1c_accuweather_images_hourly/S11_1c_hourly_14.conky

## ---------- Begin Window Settings
own_window yes
own_window_type normal
own_window_transparent yes
own_window_hints undecorated,below,skip_taskbar,skip_pager
own_window_colour 000000
own_window_class Conky
own_window_title Teo's Accuweather
### ARGB can be used for real transparency - requires composite manager
### Plays hell on conky with images.
#  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

minimum_size 80 00	# w|h
maximum_width 80

gap_x 88	# l|r
gap_y 10	# u|d

alignment tl
## ---------- End Window Settings
## ---------- Font Settings
use_xft yes
xftfont monofur:bold:size=9
xftalpha 1.0
override_utf8_locale yes
## ---------- End Font Settings
## ---------- Color Settings
draw_shades yes
default_shade_color 000000
draw_outline no
default_outline_color 000000

default_color DCDCDC #Gainsboro
color0 A9A9A9 #DarkGray
color1 778899 #LightSlateGray
color2 F5F5DC #Beige
color3 87CEFA #LightSkyBlue
color4 48D1CC #MediumTurquoise
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 B0E0E6 #PowderBlue
color8 FFD700 #Gold
color9 FFA07A #LightSalmon
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## 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
## ---------- Miscellaneous Section
background yes
use_spacer none
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

double_buffer yes
## ---------- End Miscellaneous Section

#${image /media/5/Conky/images/red+x.png
#${texeci 1200 bash /media/5/Conky/1c_accuweather_images_hourly/1c_50x30}\

update_interval 1
TEXT
${texeci 1200 bash /media/5/Conky/1c_accuweather_images_hourly/1c_50x30}\
 ${color5}Next 14 Hrs.${color}${image /media/5/Conky/images/gainsboro_1.png -p 0,0 -s 1x747}

 ${execi 900 sed -n '2p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}\
${image /media/5/Conky/1c_accuweather_images_hourly/20.png -p 30,37}
 ${execi 900 sed -n '52p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
 ±${execi 900 sed -n '61p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '3p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
 ${execi 900 sed -n '53p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${image /media/5/Conky/1c_accuweather_images_hourly/23.png -p 30,89}\
 ±${execi 900 sed -n '62p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '4p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
 ${execi 900 sed -n '54p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${image /media/5/Conky/1c_accuweather_images_hourly/26.png -p 30,141}\
 ±${execi 900 sed -n '63p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '5p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
 ${execi 900 sed -n '55p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${image /media/5/Conky/1c_accuweather_images_hourly/29.png -p 30,193}\
 ±${execi 900 sed -n '64p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '6p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
${image /media/5/Conky/1c_accuweather_images_hourly/32.png -p 30,245}\
 ${execi 900 sed -n '56p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
 ±${execi 900 sed -n '65p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '7p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
${image /media/5/Conky/1c_accuweather_images_hourly/35.png -p 30,297}\
 ${execi 900 sed -n '57p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
 ±${execi 900 sed -n '66p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '8p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
 ${execi 900 sed -n '58p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${image /media/5/Conky/1c_accuweather_images_hourly/38.png -p 30,349}\
 ±${execi 900 sed -n '67p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '9p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}${color}
 ${execi 900 sed -n '59p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${image /media/5/Conky/1c_accuweather_images_hourly/41.png -p 30,401}\
 ±${execi 900 sed -n '68p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw1}
${membar 0}
 ${color5}${execi 900 sed -n '2p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}${color}
 ${execi 900 sed -n '52p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${image /media/5/Conky/1c_accuweather_images_hourly/120.png -p 30,453}\
 ±${execi 900 sed -n '61p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${membar 0}
 ${color5}${execi 900 sed -n '3p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}${color}
 ${execi 900 sed -n '53p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${image /media/5/Conky/1c_accuweather_images_hourly/123.png -p 30,505}\
 ±${execi 900 sed -n '62p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${membar 0}
 ${color5}${execi 900 sed -n '4p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}${color}
 ${execi 900 sed -n '54p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${image /media/5/Conky/1c_accuweather_images_hourly/126.png -p 30,557}\
 ±${execi 900 sed -n '64p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${membar 0}
 ${color5}${execi 900 sed -n '5p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}${color}
 ${execi 900 sed -n '55p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${image /media/5/Conky/1c_accuweather_images_hourly/129.png -p 30,609}\
 ±${execi 900 sed -n '65p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${membar 0}
 ${color5}${execi 900 sed -n '6p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}${color}
 ${execi 900 sed -n '56p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${image /media/5/Conky/1c_accuweather_images_hourly/132.png -p 30,661}\
 ±${execi 900 sed -n '66p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${membar 0}
 ${color5}${execi 900 sed -n '7p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}${color}
 ${execi 900 sed -n '57p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${image /media/5/Conky/1c_accuweather_images_hourly/135.png -p 30,713}\
 ±${execi 900 sed -n '67p' /media/5/Conky/1c_accuweather_images_hourly/hourly_raw2}
${membar 0}
Note:

You will need to change the paths to the files.

One final screenshot with both new conkys running with 13 other conkys, iceweasel and medit...
2016_01_19_14_57_41_Scrot11.jpg
CPU usage on the right. Colour me happy!

An addition: sscc-Accu-9-14.sh - change the paths...

#!/bin/bash
## Original idea by: GrouchyGaijin
## This idea by: Stinkeye - Jan 2013
## With another tweak by: arclance
## Final tweak by: Sector11
## click to start, click to stop

if
	pgrep -f "conky -c /media/5/Conky/1b1_accuweather_images/S11_1b1_int_9.conky"
	pgrep -f "conky -c /media/5/Conky/1c_accuweather_images_hourly/S11_1c_hourly_14.conky"

then
	pkill -xf "conky -c /media/5/Conky/1b1_accuweather_images/S11_1b1_int_9.conky"
	pkill -xf "conky -c /media/5/Conky/1c_accuweather_images_hourly/S11_1c_hourly_14.conky"

else
	conky -c /media/5/Conky/1b1_accuweather_images/S11_1b1_int_9.conky
	sleep 5 & conky -c /media/5/Conky/1c_accuweather_images_hourly/S11_1c_hourly_14.conky
fi

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#575 2016-01-20 11:14:56

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)

@Sector11, (Conky-Guru)  O:)

Great idea! big_smile big_smile

I have the Conky's not yet separated.
Because I wanted to know how the laying on Plasma5

imlib_cache_flush_interval 900

behaves.

So, here with a conky_V1.10

update_interval = 2,

Ucvl17FC
With my strong processor on the desk I could live with the result ...
The workload varies from 0.5 to 1.4   smile

Offline

#576 2016-01-20 12:51:26

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

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

@ unklar - 1.4 is probably when it is updating.  That's very respectable.


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#577 2016-01-20 14:02:45

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

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

Hello guys

I have just realized that I forgot  to change a litle part in my wunderground conkyrc 

you must remplace that (the second part for night temperature)  :

${goto 350}Temp.:${color3}${goto 400}${execi 600  sed -n '67p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 470}${execi 600  sed -n '145p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 540}${execi 600  sed -n '251p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 610}${execi 600  sed -n '357p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 680}${execi 600  sed -n '463p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 750}${execi 600  sed -n '569p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 820}${execi 600  sed -n '675p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	                  ${goto 890}${execi 600  sed -n '781p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 960}${execi 600  sed -n '887p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 1030}${execi 600  sed -n '993p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}

with this :

${goto 350}Temp.:${color3}${goto 400}${execi 600  sed -n '44p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 470}${execi 600  sed -n '150p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 540}${execi 600  sed -n '256p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 610}${execi 600  sed -n '362p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 680}${execi 600  sed -n '468p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 750}${execi 600  sed -n '574p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 820}${execi 600  sed -n '680p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
        	                  ${goto 890}${execi 600  sed -n '786p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 960}${execi 600  sed -n '892p' $HOME/2b_Wunderground_API/Simple_Forecast}°\
		                  ${goto 1030}${execi 600  sed -n '998p' $HOME/2b_Wunderground_API/Simple_Forecast}°${color}

And now  the temperature from day and night are just .


@+

Last edited by loutch (2016-01-20 17:44:51)


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

#578 2016-01-21 10:11:47

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)

Sector11 wrote:

1.4 is probably when it is updating.  That's very respectable.

and it was only possible by your mathematical trick with the pictures
in

imlib_cache_size

here is the thread

Thanks to you, Conky-Guru!  wink

Offline

#579 2016-01-26 22:52:32

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

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

How did I miss these?????

@ loutch - good stuff ... can you post the entire script ... it will be easier to see what sections need to be edited for others - with a different language, Spanish, Dutch, etc.   smile

@ unklar - NICE!  I'm logged in now (26 Jan - @ 22:52 UTC)... might just leave a post  smile


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#580 2016-01-27 16:21:53

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

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

To S11

No problem

here the completly 2b script

#!/bin/bash

#put your hemisphere here: n for north, s for south
hemisphere=n

#put your Weather Underground address API here
address="http://api.wunderground.com/api/xxxxxxkeyxxxx/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.json"

wun_icon_to_png () {
    if [[ $1 == day ]]; then
        case $2 in
            chanceflurries)
                echo 21
            ;;
            chancerain)
                echo 14
            ;;
            chancesleet)
                echo 26
            ;;
            chancesnow)
                echo 20
            ;;
            chancetstorms)
                echo 17
            ;;
            clear)
                echo 1
            ;;
            cloudy)
                echo 7
            ;;
            flurries)
                echo 21
            ;;
            fog)
                echo 11
            ;;
            hazy)
                echo 5
            ;;
            mostlycloudy)
                echo 6
            ;;
            mostlysunny)
                echo 4
            ;;
            partlycloudy)
                echo 4
            ;;
            partlysunny)
                echo 6
            ;;
            sleet)
                echo 26
            ;;
            rain)
                echo 18
            ;;
            snow)
                echo 22
            ;;
            sunny)
                echo 1
            ;;
            tstorms)
                echo 15
            ;;
            unknown)
                echo 0
            ;;
        esac
    elif [[ $1 == night ]]; then
        case $2 in
            chanceflurries)
                echo 43
            ;;
            chancerain)
                echo 39
            ;;
            chancesleet)
                echo 40
            ;;
            chancesnow)
                echo 43
            ;;
            chancetstorms)
                echo 41
            ;;
            clear)
                echo 33
            ;;
            cloudy)
                echo 38
            ;;
            flurries)
                echo 43
            ;;
            fog)
                echo 11
            ;;
            hazy)
                echo 37
            ;;
            mostlycloudy)
                echo 36
            ;;
            mostlysunny)
                echo 35
            ;;
            partlycloudy)
                echo 35
            ;;
            partlysunny)
                echo 36
            ;;
            sleet)
                echo 40
            ;;
            rain)
                echo 40
            ;;
            snow)
                echo 44
            ;;
            sunny)
                echo 33
            ;;
            tstorms)
                echo 41
            ;;
            unknown)
                echo 0
            ;;
        esac
    fi
    }

rm $HOME/2b_Wunderground_API/*.png

killall -STOP conky
killall wget

wget -O $HOME/2b_Wunderground_API/raw_data $address

#Conditions feature
sed -n '/,	"current_observation": {/,/,	"satellite": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Conditions
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Conditions
sed -i '/current_observation\|image":\|logo_\|title":\|link":\|^[ \t]*},$\|^[ \t]*}$\|temperature_string\|forecast_url\|history_url\|ob_url\|satellite":/d' $HOME/2b_Wunderground_API/Conditions
sed -i -e 's/":"/\n/g' -e 's/",\|": {$//g' -e 's/"precip_1hr_string/\nprecip_1hr_string/g' -e 's/":/\n/g' -e 's/,$//g' $HOME/2b_Wunderground_API/Conditions
sed -i -e 's/^http.*\/c\/k\///g' -e '/gif/s/_.*$//g' $HOME/2b_Wunderground_API/Conditions
day_or_night=$(sed -n 137p $HOME/2b_Wunderground_API/Conditions)
if [[ $day_or_night == nt ]]; then
	cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n 135p $HOME/2b_Wunderground_API/Conditions)).png $HOME/2b_Wunderground_API/Now.png
else 
	cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n 135p $HOME/2b_Wunderground_API/Conditions)).png $HOME/2b_Wunderground_API/Now.png
fi

#Satellite feature, commented out by default, uncomment if you wish so
sed -n '/,	"satellite": {/,/"forecast":{/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Satellite
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Satellite
sed -i -e '/image/!d' -e 's/^.*": "//g' -e 's/".*$//g' $HOME/2b_Wunderground_API/Satellite
for (( i=1; i<=3; i++ ))
	  do
         wget -O $HOME/2b_Wunderground_API/sat_pic$i.png $(sed -n ${i}p $HOME/2b_Wunderground_API/Satellite)
	  done

#Forecast feature: Forecast
sed -n '/"forecast":{/,/"simpleforecast": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Forecast
sed -i -e '/"period":\|icon_url/d' $HOME/2b_Wunderground_API/Forecast
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Forecast
sed -i -e '/period\|icon\|title\|fcttext/!d' -e 's/":"/\n/g' -e 's/":/\n/g' -e 's/",//g' -e 's/,$//g' -e 's/nt_//g' $HOME/2b_Wunderground_API/Forecast

#Forecast feature: Simple Forecast
sed -n '/"simpleforecast": {/,/"hourly_forecast": \[/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Simple_Forecast
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i '/hourly_forecast\|simpleforecast\|forecastday\|{"date"\|period\|icon_url\|^[ \t]*},$\|^[ \t]*}$\|^[ \t]*,$\|^[ \t]*\]$/d' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i -e 's/":"/\n/g' -e 's/":/\n/g' -e 's/",$//g' -e 's/,$//g' -e 's/"$//g' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i '/^[ \t]*{/d' $HOME/2b_Wunderground_API/Simple_Forecast
sed -i -e 's/^[ \t]*"//g' -e 's/^[ \t]*//g' $HOME/2b_Wunderground_API/Simple_Forecast
for (( i=2; i<=146; i+=16 ))
    do
        cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n ${i}p $HOME/2b_Wunderground_API/Forecast)).png $HOME/2b_Wunderground_API/d$(( 1+(i-2)/16 )).png
        j=$(( i+8 ))
        cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n ${j}p $HOME/2b_Wunderground_API/Forecast)).png $HOME/2b_Wunderground_API/n$(( 1+(i-2)/16 )).png
    done

#Forecast feature: Hourly
sed -n '/"hourly_forecast": \[/,/"moon_phase": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/^[ \t]*"//g' -e 's/^[ \t]*//g' $HOME/2b_Wunderground_API/Hourly
sed -i '/hourly_forecast\|FCTTIME\|^{$\|^},$\|^}$\|^,$\|^]$\|moon_phase/d' $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/": /\n/g' -e 's/","/\n/g' -e 's/", "/\n/g' $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/^""//g' -e 's/^"//g' -e 's/^{"//g' -e 's/"},$//g' -e 's/",$//g' $HOME/2b_Wunderground_API/Hourly 
sed -i -e 's/^},//g' -e 's/"}$//g' -e 's/^,//g' $HOME/2b_Wunderground_API/Hourly
sed -i -e 's/^icon_url.*\/c\/k\///g' -e '/gif/s/_.*$//g' $HOME/2b_Wunderground_API/Hourly
sed -i -e '/min_unpadded\|UTCDATE/,+1d' $HOME/2b_Wunderground_API/Hourly
for (( i=64; i<=4212; i+=117 ))
    do
		j=$(( i+1 ))
		day_or_night=$(sed -n ${j}p $HOME/2b_Wunderground_API/Hourly)
		if [[ $day_or_night == nt ]]; then
			cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png night $(sed -n ${i}p $HOME/2b_Wunderground_API/Hourly)).png $HOME/2b_Wunderground_API/h$(( 1+(i-64)/117 )).png
		else 
			cp $HOME/2b_Wunderground_API/Forecast_Images/$(wun_icon_to_png day $(sed -n ${i}p $HOME/2b_Wunderground_API/Hourly)).png $HOME/2b_Wunderground_API/h$(( 1+(i-64)/117 )).png
		fi
    done
    
#Forecast feature: Moon_Sun
sed -n '/"moon_phase": {/,/"sun_phase": {/p' $HOME/2b_Wunderground_API/raw_data > $HOME/2b_Wunderground_API/Moon_Sun
sed -i 's/^[ \t]*"//g' $HOME/2b_Wunderground_API/Moon_Sun
sed -i '/moon_phase\|^[ \t]*},$\|sun_phase\|^[ \t]*}$/d' $HOME/2b_Wunderground_API/Moon_Sun
sed -i -e 's/":"/\n/g' -e 's/".*$//g' $HOME/2b_Wunderground_API/Moon_Sun
moon_phase=$(sed -n 6p $HOME/2b_Wunderground_API/Moon_Sun)
if [[ $moon_phase == "Waning Crescent" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"21.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waxing Crescent" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"04.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waning Gibbous" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"17.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Waxing Gibbous" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"09.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "First Quarter" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"07.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Last Quarter" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"19.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "New Moon" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"24.png" $HOME/2b_Wunderground_API/Moon_phase.png
elif [[ $moon_phase == "Full Moon" ]]; then
	cp $HOME/2b_Wunderground_API/moonicons/$hemisphere"13.png" $HOME/2b_Wunderground_API/Moon_phase.png
fi

 ## English to French
cp $HOME/2b_Wunderground_API/Conditions $HOME/2b_Wunderground_API/Conditions-fr
if [[ -s $HOME/2b_Wunderground_API/Conditions-fr ]]; then
	sed -i -e 's/Clouds and sun/Nuages et soleil/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Turning cloudy and less humid/Moins nuageux et moins humide/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A couple of showers/Averses éparses/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mostly cloudy/Ciel plutôt nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain and drizzle/Pluie et bruine/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Cloudy with a couple/Nuages épars/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Cloudy with a bit of/Nuageux,Faible pluie/' $HOME/2b_Wunderground_API/Conditions-fr	
	sed -i -e 's/Cloudy/Nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A few a.m. showers,/Pluies l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Showers around in th/Quelques averses l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/breezy/Venteux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Times of clouds and/Nuages épars avec soleil/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A little morning rai/Faible pluie le matin/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/a little morning rai/Faible pluie le matin/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/A touch of afternoon/Faible pluie l'\''après-midi/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Periods of rain/Pluies intermittentes/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain shover/Averses de pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light rain/Pluie/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Foggy/Brumeux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Dense fog/Brouillard dense/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light fog/Léger brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mist/Brume/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light rain shower/Pluie faible/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly cloudy/Partiellement nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly Cloudy/Partiellement nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Partly/Partiellement/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/shower/averses/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Som sun,then turni/Mitigé/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Sunny/Ensoleillé/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Clear/Clair/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Light Freezing Fog/Léger brouillard givrant/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Mostly/Peu/' $HOME/2b_Wunderground_API/Conditions-fr
	sed -i -e 's/Fog/Brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
fi
	
	 sed -i -e 's/New Moon/Nouvelle Lune/g' -e 's/Waxing Crescent/Lune Montante/g' -e 's/First Quarter/Premier Quartier/g' -e 's/Waxing Gibbous/Gibeuse Croissante/g' -e 's/Full/Pleine Lune/g' -e 's/Waning Gibbous/Gibeuse Décroissante/g' -e 's/Last Quarter/Dernier Quartier/g' -e 's/Waning Crescent/Lune Déscendante/g' /$HOME/2b_Wunderground_API/Moon_Sun
         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' /$HOME/2b_Wunderground_API/Simple_Forecast

sed -i -e 's/Mon/Lun/g' -e 's/Tue/Mar/g' -e 's/Wed/Mer/g' -e 's/Thu/Jeu/g' -e 's/Fri/Ven/g' -e 's/Sat/Sam/g' -e 's/Sun/Dim/g' /$HOME/2b_Wunderground_API/Conditions
	
       sed -i -e 's/Feb/Fév/g' -e 's/Apr/Avr/g' -e 's/May/Mai/g' -e 's/Jun/Jui/g' -e 's/Jul/Jui/g' -e 's/Aug/Aou/g' /$HOME/2b_Wunderground_API/Conditions  

sed -i -e 's/Mon/Lun/g' -e 's/Tue/Mar/g' -e 's/Wed/Mer/g' -e 's/thu/Jeu/g' -e 's/Fri/Ven/g' -e 's/Sat/Sam/g' -e 's/Sun/Dim/g' /$HOME/2b_Wunderground_API/Hourly	

killall -CONT conky

Edit Days and hour  from hourly now in french to

Edit 2 Update date to

Edit 3 months are now in french for update

@+

Last edited by loutch (2016-02-24 15:06:16)


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

Board footer

Powered by FluxBB