You are not logged in.

#861 2016-05-15 14:56: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)

What an honour!!!
You've learnt well Luke!
Check it with Master Yoda and I'll post a link on the first page.


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

#862 2016-05-15 15:19:48

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

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

@fvirgola80

for later it should do this Digital-7

@fvirgola80 and @S11,

Where to find the pixel ruler and how do you get that in the picture?   :8

Offline

#863 2016-05-15 15:43:37

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

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

TeoBigusGeekus wrote:

What an honour!!!
You've learnt well Luke!
Check it with Master Yoda and I'll post a link on the first page.


:8  :8  :8

wink  wink  wink


Nothing happens by chance

Offline

#864 2016-05-15 15:44:39

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

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

unklar wrote:

@fvirgola80

for later it should do this Digital-7

@fvirgola80 and @S11,

Where to find the pixel ruler and how do you get that in the picture?   :8


using this led_mono by Sector11

wink  wink

Last edited by fvirgola80 (2016-05-15 17:29:17)


Nothing happens by chance

Offline

#865 2016-05-16 14:51:32

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

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

=== Conky v1.90 ===
Here's the conky Clock2FV80 created for those not using LUA script .. with 8 day weather forecast and moon phase of the current day .
The idea of a team made up of friends .....
@Yoda wink --> Sector11
@Obi-Wan :8 --> TEO

Clock2FV80 <---Preview
May the force be with you

Luke

# pkill -xf "conky -q -c /home/fvirgola80/The_Clock_2-f80.conky" &
# edited and working
## ---------- Begin Window Settings

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

minimum_size 200 750
maximum_width 200

gap_x 10	## l|r
gap_y 10	## u|d
alignment tl
## ---------- End Window Settings
## ---------- Font Settings
## Use Xft (anti-aliased font and stuff)
use_xft yes
#xftfont Fantasque Sans Mono:bold:size=11
xftfont Fantasque Sans Mono:bold:size=10

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

## Force UTF8? requires XFT
override_utf8_locale yes

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

default_color f5fffa ## MintCream
color1 778899 ## LightSlateGray
color2 FFA07A ## LightSalmon
color3 87CEFA ## LightSkyBlue
color4 48D1CC ## MediumTurquoise
color5 FFDEAD ## NavajoWhite
color6 00BFFF ## DeepSkyBlue
color7 B0E0E6 ## PowderBlue
color8 FFD700 ## Gold
color9 CD5C5C ## IndianRed
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 5
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background yes ## yes
imlib_cache_size 0

## Adds spaces around certain objects to stop them from moving other things
## around, this only helps if you are using a mono font
## Options: right, left or none
use_spacer none

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

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

update_interval 1

#${execi 900 bash /home/fvirgola80/1b1_accuweather_images/1b1}\
#${execi 900 bash /home/fvirgola80/4_Moon/moon}\
TEXT
${execi 600  /home/fvirgola80/1b1_accuweather_images/1b1}\
${execi 600  /home/fvirgola80/4_Moon/moon}\
${image /home/fvirgola80/images/bk_40.png -p -5,-5 -s 220x770}\
${image /home/fvirgola80/4_Moon/0.png -p 8,45}\
${image /home/fvirgola80/1b1_accuweather_images/cc.png -p 7,80 -s 200x120}\
${alignc}${time %a %d %b %Y}
${alignc}${if_match ${time %H}<12}Good Morning${else}\
${if_match ${time %H}<18}Good Afternoon${else}Good Evening${endif}${endif}
${font monofur:bold:size=16}${color8}±${execpi 600 sed -n '30p' /home/fvirgola80/1b1_accuweather_images/curr_cond}°\
${alignr}${color}${execpi 600 sed -n '29p' /home/fvirgola80/1b1_accuweather_images/curr_cond}°${font}








${font LED_mono:size=30}${goto 30}${color1}88:88:88${goto 30}${color5}${time %T}${color}${font}
${font monofur:bold:size=16}${color9}↑${execpi 600 sed -n '26p' /home/fvirgola80/1b1_accuweather_images/first_days}°\
${alignr}${color6}↓${execpi 600 sed -n '31p' /home/fvirgola80/1b1_accuweather_images/first_days}°${color}${font}
${alignc}${execpi 600 sed -n '33p' /home/fvirgola80/1b1_accuweather_images/curr_cond}
UVI ${execpi 600 sed -n '34p' /home/fvirgola80/1b1_accuweather_images/curr_cond} /11\
${alignr}Hum ${execpi 600 sed -n '32p' /home/fvirgola80/1b1_accuweather_images/curr_cond}
DP  ${execi 90 sed -n '35p' /home/fvirgola80/1b1_accuweather_images/curr_cond}°\
${alignr}Vis ${execi 90 sed -n '37p' /home/fvirgola80/1b1_accuweather_images/curr_cond}
${alignc}Cld ${execi 90 sed -n '36p' /home/fvirgola80/1b1_accuweather_images/curr_cond}
Wnd ${execi 90 sed -n '31p' /home/fvirgola80/1b1_accuweather_images/curr_cond}\
${alignr}@ ${execi 90 sed -n '38p' /home/fvirgola80/1b1_accuweather_images/curr_cond}
${color5}${alignc}Civitavecchia Sun
Rise${color7} ${execpi 600 sed -n '39p' /home/fvirgola80/1b1_accuweather_images/curr_cond}\
${alignr}${color5}Set ${color7}${execpi 600 sed -n '40p' /home/fvirgola80/1b1_accuweather_images/curr_cond}${color}
${color5}${alignc}The Northern Moon
Rise${color7} ${execpi 600 sed -n '41p' /home/fvirgola80/1b1_accuweather_images/curr_cond}${color}\
${alignr}${color5}Set ${color7}${execpi 600 sed -n '42p' /home/fvirgola80/1b1_accuweather_images/curr_cond}${color}
${alignc}${execpi 600 sed -n '7p' /home/fvirgola80/4_Moon/raw}
${alignc}${execpi 600 sed -n '1p' /home/fvirgola80/4_Moon/raw} visible @ ${execi 600 sed -n '6p' /home/fvirgola80/4_Moon/raw}°
${alignc}and ${execi 600 sed -n '5p' /home/fvirgola80/4_Moon/raw} day(s) old${font}
${color5}» » Eight Day Forecast ${membar 0}
${execi 3600 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}
${image /home/fvirgola80/1b1_accuweather_images/6.png -p 26,414 -s 70x45}\
${image /home/fvirgola80/1b1_accuweather_images/11.png -p 140,414 -s 70x45}\
${color9}${execi 90 sed -n '8p' /home/fvirgola80/1b1_accuweather_images/first_days}°${color}\
  ${goto 125}${color9}${execi 90 sed -n '13p' /home/fvirgola80/1b1_accuweather_images/first_days}°

${color7}${execi 90 sed -n '9p' /home/fvirgola80/1b1_accuweather_images/first_days}°${color}\
${goto 125}${color7}${execi 90 sed -n '14p' /home/fvirgola80/1b1_accuweather_images/first_days}°${color}${font monofur:bold:size=9}
${execpi 600 sed -n '4p' /home/fvirgola80/1b1_accuweather_images/messages}
 ${alignr}${execpi 600 sed -n '5p' /home/fvirgola80/1b1_accuweather_images/messages}
${font}${execi 3600 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="4 day" | awk '{print $1" "$3" "$2}'`}
${image /home/fvirgola80/1b1_accuweather_images/16.png -p 26,495 -s 70x45}\
${image /home/fvirgola80/1b1_accuweather_images/21.png -p 140,495 -s 70x45}\
${color9}${execi 90 sed -n '18p' /home/fvirgola80/1b1_accuweather_images/first_days}°\
 ${goto 125}${execi 90 sed -n '4p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}

${color7}${execi 90 sed -n '19p' /home/fvirgola80/1b1_accuweather_images/first_days}°${color}\
${goto 125}${color7}${execi 90 sed -n '24p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}${font monofur:bold:size=9}
${execpi 600 sed -n '6p' /home/fvirgola80/1b1_accuweather_images/messages}
 ${alignr}${execpi 600 sed -n '7p' /home/fvirgola80/1b1_accuweather_images/messages}
${font}${execi 3600 echo `date --date="5 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="6 day" | awk '{print $1" "$3" "$2}'`}
${image /home/fvirgola80/1b1_accuweather_images/last_2.png -p 26,577 -s 70x45}\
${image /home/fvirgola80/1b1_accuweather_images/last_7.png -p 140,577 -s 70x45}\
${color9}${execi 90 sed -n '4p' /home/fvirgola80/1b1_accuweather_images/last_days}°\
 ${goto 125}${execi 90 sed -n '9p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}

${color7}${execi 90 sed -n '5p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}\
${goto 125}${color7}${execi 90 sed -n '10p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}${font monofur:bold:size=9}
${execpi 600 sed -n '8p' /home/fvirgola80/1b1_accuweather_images/messages}
 ${alignr}${execpi 600 sed -n '9p' /home/fvirgola80/1b1_accuweather_images/messages}
${font}${execi 3600 echo `date --date="7 day" | awk '{print $1" "$3" "$2}'`}\
${alignr}${execi 3600 echo `date --date="8 day" | awk '{print $1" "$3" "$2}'`}
${image /home/fvirgola80/1b1_accuweather_images/last_12.png -p 26,660 -s 70x45}\
${image /home/fvirgola80/1b1_accuweather_images/last_17.png -p 140,660 -s 70x45}\
${color9}${execi 90 sed -n '14p' /home/fvirgola80/1b1_accuweather_images/last_days}°\
 ${goto 125}${execi 90 sed -n '19p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}

${color7}${execi 90 sed -n '15p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}\
${goto 125}${color7}${execi 90 sed -n '20p' /home/fvirgola80/1b1_accuweather_images/last_days}°${color}${font monofur:bold:size=9}
${execpi 600 sed -n '10p' /home/fvirgola80/1b1_accuweather_images/messages}
 ${alignr}${execpi 600 sed -n '11p' /home/fvirgola80/1b1_accuweather_images/messages}${font}

Last edited by fvirgola80 (2016-05-16 15:11:33)


Nothing happens by chance

Offline

#866 2016-05-17 08:49:06

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 one fvirgola80!


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

#867 2016-05-17 09:12:13

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

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

Hello

I think i have finish my conky-weather with Théo's wunderground script.

I ad a wind direction icon like this :

1463476293.png

that done this 

1463476192.png




@+


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

#868 2016-05-17 10:58:50

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

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

TeoBigusGeekus wrote:

Nice one fvirgola80!


wink  wink


Nothing happens by chance

Offline

#869 2016-05-17 13:36:51

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

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

WOW! Catchup time.  Didn't get emails about news posts, seems I turned "subscribe" off.  :(

@TBG - glad to see that the v1.10 script worked!

@fvirgola80 - good to see yours here.  Still surprised how close we were...

As I said I was surprised to see fvirgola80's conky as I had one very similar.  As most longtime users of Teo's scripts with know, I don't use the 'condition text' much - a picture says it all.  So I did a nine day forecast under the clock and filed it away.  When fvirgola80 sent his by PM, to see if it needed any fixing, tweaking, I couldn't believe it.  Very close to what I did.  This sits on my desktop #4 now:
2016_05_17_10_15_51_Scrot11.jpg
I'm slowly converting my other weather conkys (see bottom for one) to 1b1_accuweather_images.  I was looking at doing this with 2b_Wunderground_API but for as feature rich that script (site) is it lacks something I want in the summer here: UVI - it's usually at "extreme" here between mid/late spring and mid autumn.  But ...

The conky: The_Clock_3-9day.conky
Requirements are the same as the code here.

# pkill -xf "conky -q -c /media/5/Conky/The_Clock_3-9day.conky" &
# Working: Fri 13 May 2016 17:18:06
## ---------- Begin Window Settings

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

minimum_size 200 700
maximum_width 200

gap_x 10	## l|r
gap_y 10	## u|d
alignment tr
## ---------- End Window Settings
## ---------- Font Settings
## Use Xft (anti-aliased font and stuff)
use_xft yes
xftfont Fantasque Sans Mono:bold:size=11

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

## Force UTF8? requires XFT
override_utf8_locale yes

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

default_color f5fffa ## MintCream
color1 778899 ## LightSlateGray
color2 FFA07A ## LightSalmon
color3 87CEFA ## LightSkyBlue
color4 48D1CC ## MediumTurquoise
color5 FFDEAD ## NavajoWhite
color6 00BFFF ## DeepSkyBlue
color7 B0E0E6 ## PowderBlue
color8 FFD700 ## Gold
color9 CD5C5C ## IndianRed
## ---------- End Color Settings
## ---------- Begin Borders Section
draw_borders no
## Stippled borders?
stippled_borders 5
## border margins
border_inner_margin 5
border_outer_margin 0
## border width
border_width 2
## graph borders
draw_graph_borders yes ## no
## default_graph_size 15 40
## ---------- End Borders Secton
## ---------- Begin Miscellaneous Section
## Boolean value, if true, Conky will be forked to background when started.
background yes ## yes
imlib_cache_size 0

## Adds spaces around certain objects to stop them from moving other things
## around, this only helps if you are using a mono font
## Options: right, left or none
use_spacer none

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

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

update_interval 1

#${execi 900 bash /media/5/Conky/1b1_accuweather_images/1b1}\
#${execi 900 bash /media/5/Conky/4_Moon/moon}\
TEXT
${execi 900 bash /media/5/Conky/1b1_accuweather_images/1b1}\
${execi 900 bash /media/5/Conky/4_Moon/moon}\
${image /media/5/Conky/images/bk_40.png -p -5,-5 -s 220x770}\
${image /media/5/Conky/4_Moon/0.png -p 8,45}\
${image /media/5/Conky/1b1_accuweather_images/cc.png -p 7,80 -s 200x120}\
${alignc}${time %a %d %b %Y}
${alignc}${if_match ${time %H}<12}Good Morning${else}\
${if_match ${time %H}<18}Good Afternoon${else}Good Evening${endif}${endif}
${font monofur:bold:size=16}${color8}±${execpi 600 sed -n '30p' /media/5/Conky/1b1_accuweather_images/curr_cond}°\
${alignr}${color}${execpi 600 sed -n '29p' /media/5/Conky/1b1_accuweather_images/curr_cond}°${font}








${font LED_mono:size=30}${goto 30}${color1}88:88:88${goto 30}${color5}${time %T}${color}${font}
${font monofur:bold:size=16}${color2}↑${execpi 600 sed -n '26p' /media/5/Conky/1b1_accuweather_images/first_days}°\
${alignr}${color6}↓${execpi 600 sed -n '31p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}${font}
Bar ${execpi 600 sed -n '33p' /media/5/Conky/1b1_accuweather_images/curr_cond}\
${goto 150}Cld${alignr}${execi 90 sed -n '36p' /media/5/Conky/1b1_accuweather_images/curr_cond}
UVI ${execpi 600 sed -n '34p' /media/5/Conky/1b1_accuweather_images/curr_cond} /11\
${goto 150}Hum${alignr}${execpi 600 sed -n '32p' /media/5/Conky/1b1_accuweather_images/curr_cond}
DP  ${execi 90 sed -n '35p' /media/5/Conky/1b1_accuweather_images/curr_cond}°\
${alignr}Vis ${execi 90 sed -n '37p' /media/5/Conky/1b1_accuweather_images/curr_cond}
${alignc}Wnd ${execi 90 sed -n '31p' /media/5/Conky/1b1_accuweather_images/curr_cond}\
 @ ${execi 90 sed -n '38p' /media/5/Conky/1b1_accuweather_images/curr_cond}
${alignc}${color5}${membar 0,15} Buenos Aires Sun ${membar 0,15}${color}
Rise${color7} ${execpi 600 sed -n '39p' /media/5/Conky/1b1_accuweather_images/curr_cond}\
${alignr}${color5}Set ${color7}${execpi 600 sed -n '40p' /media/5/Conky/1b1_accuweather_images/curr_cond}${color}
${alignc}${color5}${membar 0,15} The Southern Moon ${membar 0,15}${color}
Rise${color7} ${execpi 600 sed -n '41p' /media/5/Conky/1b1_accuweather_images/curr_cond}${color}\
${alignr}${color5}Set ${color7}${execpi 600 sed -n '42p' /media/5/Conky/1b1_accuweather_images/curr_cond}${color}
${alignc}${execpi 600 sed -n '7p' /media/5/Conky/4_Moon/raw}
${alignc}${execpi 600 sed -n '1p' /media/5/Conky/4_Moon/raw} visible @ ${execi 600 sed -n '6p' /media/5/Conky/4_Moon/raw}°
${alignc}and ${execi 600 sed -n '5p' /media/5/Conky/4_Moon/raw} day(s) old${font}
${alignc}${color5}${membar 0,15} NINE DAY FORECAST ${membar 0,15}${color}
${alignc}${execi 43200 echo `date --date="1 day" | awk '{print $1" "$3" "$2}'`}
${image /media/5/Conky/1b1_accuweather_images/6.png -p 73,423 -s 80x48}\
${goto 62}${color2}${execi 90 sed -n '8p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}

${goto 62}${color7}${execi 90 sed -n '9p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
  ${execi 43200 echo `date --date="2 day" | awk '{print $1" "$3" "$2}'`}\
${alignr 10}${execi 43200 echo `date --date="3 day" | awk '{print $1" "$3" "$2}'`}
${image /media/5/Conky/1b1_accuweather_images/6.png -p 22,483 -s 80x48}\
${image /media/5/Conky/1b1_accuweather_images/11.png -p 129,483 -s 80x48}\
${goto 11}${color2}${execi 90 sed -n '13p' /media/5/Conky/1b1_accuweather_images/first_days}°\
  ${goto 118}${execi 90 sed -n '18p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}

${goto 11}${color7}${execi 90 sed -n '14p' /media/5/Conky/1b1_accuweather_images/first_days}°\
  ${goto 118}${execi 90 sed -n '19p' /media/5/Conky/1b1_accuweather_images/first_days}°${color}
  ${execi 43200 echo `date --date="4 day" | awk '{print $1" "$3" "$2}'`}\
${alignr 10}${execi 43200 echo `date --date="5 day" | awk '{print $1" "$3" "$2}'`}
${image /media/5/Conky/1b1_accuweather_images/16.png -p 22,543 -s 80x48}\
${image /media/5/Conky/1b1_accuweather_images/21.png -p 129,543 -s 80x48}\
${goto 11}${color2}${execi 90 sed -n '23p' /media/5/Conky/1b1_accuweather_images/first_days}°\
  ${goto 118}${execi 90 sed -n '4p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}

${goto 11}${color7}${execi 90 sed -n '24p' /media/5/Conky/1b1_accuweather_images/first_days}°\
 ${goto 118}${execi 90 sed -n '5p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
  ${execi 43200 echo `date --date="6 day" | awk '{print $1" "$3" "$2}'`}\
${alignr 10}${execi 43200 echo `date --date="7 day" | awk '{print $1" "$3" "$2}'`}
${image /media/5/Conky/1b1_accuweather_images/last_2.png -p 22,603 -s 80x48}\
${image /media/5/Conky/1b1_accuweather_images/last_7.png -p 129,603 -s 80x48}\
${goto 11}${color2}${execi 90 sed -n '9p' /media/5/Conky/1b1_accuweather_images/last_days}°\
  ${goto 118}${execi 90 sed -n '14p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}

${goto 11}${color7}${execi 90 sed -n '10p' /media/5/Conky/1b1_accuweather_images/last_days}°\
  ${goto 118}${execi 90 sed -n '15p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}
  ${execi 43200 echo `date --date="8 day" | awk '{print $1" "$3" "$2}'`}\
${alignr 10}${execi 43200 echo `date --date="9 day" | awk '{print $1" "$3" "$2}'`}
${image /media/5/Conky/1b1_accuweather_images/last_12.png -p 22,663 -s 80x48}\
${image /media/5/Conky/1b1_accuweather_images/last_17.png -p 129,663 -s 80x48}\
${goto 11}${color2}${execi 90 sed -n '19p' /media/5/Conky/1b1_accuweather_images/last_days}°\
  ${goto 118}${execi 90 sed -n '24p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}

${goto 11}${color7}${execi 90 sed -n '20p' /media/5/Conky/1b1_accuweather_images/last_days}°\
  ${goto 118}${execi 90 sed -n '25p' /media/5/Conky/1b1_accuweather_images/last_days}°${color}

Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#870 2016-05-17 13:39:28

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

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

@loutch

Nice touch with the blue arrow.  My favourite colour too!


Debian 12 Beardog, SoxDog and still a Conky 1.9er

Offline

#871 2016-05-17 17:04:59

fvirgola80
Member
From: Italy / Rome
Registered: 2015-10-08
Posts: 262

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

@ Sector11 - > great job friend

wink


Nothing happens by chance

Offline

#872 2016-05-17 17:33:49

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

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

Guys i need you help

i made a script to have an icon for wind direction he work great and i woud integrate it in the 2b script .

When it is integrate he doesn't work with :

wind_direction=$(sed -n 73p $HOME/2b_Wunderground_API/Conditions)

i must change it with this to have the Wind.png and the icon is not the same

wind_direction=$(sed -n 98p $HOME/2b_Wunderground_API/Simple_forecast)

any idea

here the script named 2b1 :

#!/bin/bash

# icone direction vent 
wind_direction=$(sed -n 73p $HOME/2b_Wunderground_API/Conditions)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"03.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"04.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "OSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"05.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "O" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"06.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ONO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"07.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"08.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"09.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"10.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"11.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"12.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"13.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"14.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"15.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"16.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"17.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "no wind" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"01.png" $HOME/2b_Wunderground_API/Wind.png
fi


    
	killall -CONT conky

   here the integration in the 2b with simple_forecast :


#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

# icone direction vent 
wind_direction=$(sed -n 98p $HOME/2b_Wunderground_API/Simple_Forecast)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"03.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"04.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "OSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"05.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "O" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"06.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ONO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"07.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"08.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"09.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"10.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"11.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"12.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"13.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"14.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"15.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"16.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"17.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "no wind" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"01.png" $HOME/2b_Wunderground_API/Wind.png
fi

#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

@+

Last edited by loutch (2016-05-19 06:07:21)


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

#873 2016-05-18 07:44:21

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

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

Hello guys

i have another question if that is possible to make it :
i would integrate in 2b_wunderground the weather alert when anione is or RAS when ther is nothing

here the alert today

Prossibilité de pluie Mercredi à 16h30

from this page :

https://www.wunderground.com/q/zmw:00000.35.10708

1463557347.png


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

#874 2016-05-18 08:55:31

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

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

Hello loutch,

I do not know if I understand your question correctly ...  wink

@mrpeachy has then translated these ALERTS in his Wun package with the "handwriting" of @S11.
http://conky.pitstop.free.fr/wiki/index … r_%28en%29
http://conky.pitstop.free.fr/wiki/index … s_%28en%29

The script call at www.wunderground identical Teo's 2b_Wunderground_API:

http://api.wunderground.com/api/KEY/conditions/forecast10day/astronomy/hourly/satellite/alerts/lang:DL/q/zmw:00000.27.10577.json"

and relates to the classic10day.lua
css10.th.jpg
on conky configuration file wunrc

Last edited by unklar (2016-05-18 09:15:09)

Offline

#875 2016-05-18 11:29:40

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

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

loutch wrote:
#!/bin/bash

# icone direction vent 
wind_direction=$(sed -n 73p $HOME/2b_Wunderground_API/Conditions)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"03.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"04.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "OSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"05.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "O" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"06.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ONO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"07.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"08.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"09.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"10.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"11.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"12.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"13.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"14.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"15.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"16.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"17.png" $HOME/2b_Wunderground_API/Wind.png
elif [[ $wind_direction == "no wind" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"01.png" $HOME/2b_Wunderground_API/Wind.png
fi


    
	killall -CONT conky

From what I can read, your function tests for abbreviations, ie. N, NE, SSE, etc.
The script, at least for my location, produces full wind names, ie. North, East, etc.
Also, you're testing for french wind names, are you sure they exist in your Conditions file?

As for the wunderground question, I don't quite understand what you're trying to do. Could you please elaborate?

Last edited by TeoBigusGeekus (2016-05-22 06:27:31)


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

#876 2016-05-18 11:41:16

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

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

hello Theo

sure that exit in mine condition-file wile i ad a line in 2b script to translate to french

you must change

O to W example

SSO is in english SSW
NO  is NW
Sud is South
Nord is North
Est is EAST
Ouest is West

ect


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

#877 2016-05-18 11:44:36

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

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

Well, then it should work.
Can you post your whole script?


Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!
Please make Autocad Civil 3D and Archicad work on Linux!

Offline

#878 2016-05-18 11:59:19

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

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

As for the wunderground question, I don't quite understand what you're trying to do. Could you please elaborate?

To have the icon of wind direction I must launch two scripts

${execi 1800 bash $HOME/2b_Wunderground_API/2b}${execi 1800 bash $HOME/2b_Wunderground_API/2bi}

I would want to integrate my script into yours but i have a problem with this line 

$(sed -n 73p $HOME/2b_Wunderground_API/Conditions)

he dont work i must change to simple_forecast

( when in Conditions file wind direction is N in simple_forecast it is NW)


wind_direction=$(sed -n 98p $HOME/2b_Wunderground_API/Simple_forecast)

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

#879 2016-05-18 12:01:09

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

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

2b script with french translate

#!/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/d8488adffc1bb813/conditions/forecast10day/astronomy/hourly/satellite/q/FR/Sarreguemines.json"
#http://api.wunderground.com/api/d8488adffc1bb813/conditions/forecast10day/astronomy/hourly/satellite/alerts/lang:FR/q/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

# icone direction vent 
wind_direction=$(sed -n 98p $HOME/2b_Wunderground_API/Simple_Forecast)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"02.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"03.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"04.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "OSO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"05.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "O" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"06.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "ONO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"07.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"08.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NNO" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"09.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"10.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"11.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"12.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"13.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"14.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"15.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"16.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"17.png" $HOME/2b_Wunderground_API/Wind1.png
elif [[ $wind_direction == "no wind" ]]; then
	cp $HOME/2b_Wunderground_API/vents/"01.png" $HOME/2b_Wunderground_API/Wind1.png
fi

#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
elif [[ $moon_phase == "Full" ]]; 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/A couple of showers/Averses éparses/' $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/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/breezy/Venteux/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Clouds and sun/Nuages et soleil/' $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/Clear/Clair/' $HOME/2b_Wunderground_API/Conditions-fr
        sed -i -e 's/Dense fog/Brouillard dense/' $HOME/2b_Wunderground_API/Conditions-fr
        sed -i -e 's/Drizzle/Bruine/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Fog/Brouillard/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Foggy/Brumeux/' $HOME/2b_Wunderground_API/Conditions-fr
        sed -i -e 's/Light Rain Showers/Pluie faible/' $HOME/2b_Wunderground_API/Conditions-fr	
        sed -i -e 's/Light 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/Light/Faible/' $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/Light Freezing Fog/Léger brouillard givrant/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Mist/Brume/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Mostly/Très/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Mostly cloudy/Ciel très nuageux/' $HOME/2b_Wunderground_API/Conditions-fr
        sed -i -e 's/Overcast/Couvert/' $HOME/2b_Wunderground_API/Conditions-fr
sed -i -e 's/Patches of Fog/Bancs de brouillard/' $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/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/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/Rain and drizzle/Pluie et bruine/' $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/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/Scattered Clouds/Nuages épars/' $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/Times of clouds and/Nuages épars avec soleil/' $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/West/OUEST/g' -e 's/East/EST/g' -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/East/EST/g' -e 's/West/Ouest/g' -e 's/North/Nord/g' -e 's/South/Sud/g' -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/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
	 sed -i -e 's/West/OUEST/g' -e 's/East/EST/g' -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/Hourly
	
	killall -CONT conky

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

#880 2016-05-18 12:07:04

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

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

When it is not possible to integrate it,  no problem i can launch the two scripts


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