You are not logged in.

#2351 2019-03-26 16:36:01

unklar
Member
Registered: 2015-10-31
Posts: 946

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

loutch wrote:
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value
/home/romuald/.conky/weather/lua-weather.sh: 43: /home/romuald/.conky/weather/lua-weather.sh: Syntax error: Bad for loop variable
conky: llua_do_call: function conky_main execution failed: /home/romuald/.conky/weather/weather.lua:96: attempt to perform arithmetic on a nil value

These are syntax errors from your weather.lua and lua-weather.sh scripts. They have nothing to do with the conky syntax1.10    hmm

Offline

#2352 2019-03-26 16:38:46

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

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

conky 1.10.8
liblua5.1.0
liblua5.2.0
liblua5.3.0


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2353 2019-03-26 16:42:10

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

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

line 43 lua-weather.sh

for (( i=0; i < attempts || attempts == 0; i++ )); do

weather.lua line 96

 winddir=-math.pi*(tonumber(dir))/180

Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2354 2019-03-26 16:57:20

unklar
Member
Registered: 2015-10-31
Posts: 946

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

I'm sorry loutch...  ops
I have never tried your scripts. If they are on the linked page, I have to do that first.

What I tested a year ago with manuel909 was the configuration of @damo and openweathermap, without success.
Because it itched me, I retested in August'18 myself. It worked then for 3 months and afterwards again no more. I haven't touched Openweathermap since then

Offline

#2355 2019-03-26 17:27:09

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

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

Ok

keine shade wen ehr nicht will ,will er nicht

danke schön noch und biss bald


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2356 2019-03-26 18:37:50

unklar
Member
Registered: 2015-10-31
Posts: 946

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

big_smile

fuerLoutch.png

You're a lucky guy, just tried it out and it works (again).
In the terminal I still see (my) known error messages with every update of the damo scripts.

conky: desktop window (1c00013) is subwindow of root window (6b4)
conky: window type - normal
conky: drawing to created window (0x5e00002)
conky: drawing to double buffer
datafile /tmp/weather.txt not found
/home/unklarer/damo-weather/lua-weather.sh: Zeile 100: printf: 12.93: Ungültige Zahl.
/home/unklarer/damo-weather/lua-weather.sh: Zeile 101: printf: 50.83: Ungültige Zahl.
/home/unklarer/damo-weather/lua-weather.sh: Zeile 103: printf: 4.73: Ungültige Zahl.
/home/unklarer/damo-weather/lua-weather.sh: Zeile 105: printf: 0.56: Ungültige Zahl.
/home/unklarer/damo-weather/lua-weather.sh: Zeile 106: printf: 7.22: Ungültige Zahl.
/home/unklarer/damo-weather/lua-weather.sh: Zeile 120: printf: 4.73: Ungültige Zahl.
conky: '/home/unklarer/damo-weather/.conkyrc10' modified, reloading...
conky: desktop window (1c00013) is subwindow of root window (6b4)
conky: window type - normal
conky: drawing to created window (0x5e00002)
conky: drawing to double buffer

weather.txt

270
5.1 m/s
0558
1829
4,0
Chemnitz
light rain

Offline

#2357 2019-03-27 06:46:37

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

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

Hello

i have it (modify the lua script )


console done this

omuald@RogStrix:~$ conky -c ~/.conky/weather/conkyrc
conky: desktop window (800008) is subwindow of root window (28a)
conky: window type - normal
conky: drawing to created window (0x3e00002)
conky: drawing to double buffer
conky: forked to background, pid is 27954
romuald@RogStrix:~$ 
/home/romuald/.conky/weather/lua-weather.sh: ligne 99 : printf: 7.07: nombre non valable
/home/romuald/.conky/weather/lua-weather.sh: ligne 100 : printf: 49.11: nombre non valable
/home/romuald/.conky/weather/lua-weather.sh: ligne 102 : printf: 3.81: nombre non valable
/home/romuald/.conky/weather/lua-weather.sh: ligne 104 : printf: 1.67: nombre non valable
/home/romuald/.conky/weather/lua-weather.sh: ligne 105 : printf: 5.56: nombre non valable
/home/romuald/.conky/weather/lua-weather.sh: ligne 115 : printf: 11.1: nombre non valable
/home/romuald/.conky/weather/lua-weather.sh: ligne 119 : printf: 3.81: nombre non valable

weather.txt

40
0,0 kn
0620
1853
0,0
Sarreguemines
few clouds

Last edited by loutch (2019-03-27 07:25:45)


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2358 2019-03-27 08:46:31

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

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

boouuu

Don't work very well

weather.txt 1 hour later

50
0,0 km/h
0620
1853
0,0
Sarreguemines
few clouds

no temp 0.0

no wind 0.0 km/h

sunrise work great position from sun moved in conky

Last edited by loutch (2019-03-27 08:47:44)


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2359 2019-03-27 12:31:20

unklar
Member
Registered: 2015-10-31
Posts: 946

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

loutch wrote:

Don't work very well

weather.txt 1 hour later

...

no temp 0.0

no wind 0.0 km/h

I know the problem  wink

I didn't get my own location correctly displayed with the name or the ID from the city.list.json. It was always missing the temperature, the wind or both.

Very unreliable the whole thing.
You can try the next bigger city with you. This gave me a better result with Chemnitz or Dresden. But, what interests me the weather in 50 or 100 km distance...

forLoutch.th.png

Further aggravating is that you block the data retrieval, if this does not take place in a distance of at least 10 minutes.  monkey

For me, this weather data provider is out of the question.

-------------------------
Je connais le problème  wink

Je n'ai pas eu mon propre emplacement correctement affiché avec le nom ou l'ID de la city.list.json. Il manquait toujours la température, le vent ou les deux.

C'est très peu fiable.
Vous pouvez essayer la prochaine grande ville avec vous. Cela m'a donné un meilleur résultat avec Chemnitz ou Dresde. Mais, ce qui m'intéresse c'est la météo à 50 ou 100 km de distance....
De plus, vous bloquez l'extraction des données si elle n'a pas lieu à une distance d'au moins 10 minutes.  monkey

Pour moi, ce fournisseur de données météorologiques est hors de question.

Last edited by unklar (2019-03-27 12:48:17)

Offline

#2360 2019-03-27 15:01:58

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

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

ok no problem

chearch another conky

Bis Bald


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2361 2019-03-28 11:01:18

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

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

hello

My conky-barographe work great since yesterday & no problem in console.
Modify it for accuweather.

1553770952.png

@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2362 2019-03-28 13:13:16

unklar
Member
Registered: 2015-10-31
Posts: 946

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

I'm interested.  smile
...and, would you like to publish the files as well?

Offline

#2363 2019-03-28 14:57:23

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

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

keine problem

it must be installed

bc
gnuplot

conkyrc

conky.config = {
	background = true,
	use_xft = true,
	font = 'Liberation Sans:size=7',
	xftalpha = 1,
	update_interval = 1.0,
	total_run_times = 0,
	own_window = true,
	own_window_transparent = true,
--own_window_color 000000
own_window_argb_visual = true,
--own_window_argb_value = 250,
	own_window_type = 'normal',
	own_window_hints = 'undecorated,below,skip_taskbar,skip_pager',
	double_buffer = true,
	minimum_width = 410, minimum_height = 210,
        maximum_width = 410,
	text_buffer_size = 2048,
	draw_shades = false,
	draw_outline = false,
	draw_borders = false,
	draw_graph_borders = false,
	default_color = 'white',
	default_outline_color = 'white',
	alignment = 'top_left',
	gap_x = 310,
	gap_y = 160,
	no_buffers = true,
	uppercase = false,
	cpu_avg_samples = 2,
	override_utf8_locale = true,
imlib_cache_flush_interval = 60,
	imlib_cache_size = 10000,


-- Taille des pointillés
	stippled_borders = 5,

-- Couleurs
	default_color = '#ffffff',--ffd579
	default_shade_color = '#333333',
	default_outline_color = 'black',

 lua_load = '~/.conky/lua/image.lua',

color1 = 'F5B800',
color2 = '00f5ff',
color3 = '828200',
color4 = '323200',
 
};

conky.text = [[
${voffset 1}${goto 100}${font Ubuntu:style=Bold:size=10}Pression Atmospherique
${if_gw}${execi 1200 bash ~/.conky/barographe/barognuplot.sh}${endif}#
${image ~/.conky/barographe/graph.png -s 255x120 -p 50,10 -n}#
${font Ubuntu:style=Bold:size=8}#
 ${voffset 06}${goto 50}${color1} 40 ° ${goto 290}${color2}1040mb
 ${voffset 04}${goto 50}${color1} 20 ° ${goto 290}${color2}1020mb
 ${voffset 04}${goto 50}${color1}  0 ° ${goto 290}${color2}1000mb
 ${voffset 04}${goto 50}${color1}-10 ° ${goto 290}${color2} 980mb
 ${voffset 04}${goto 50}${color1}-20 ° ${goto 290}${color2} 960mb
 ${lua fDrawImage ~/.conky/barographe/base.png 66 18 228 97}
 ${lua fDrawImage ~/.conky/barographe/white.png 74 114 214 12}
 ${voffset -800}
]];

barognuplot.sh

#!/bin/bash

## files
LOG="$HOME/.conky/barographe/ListePression.log"
GRAPH="$HOME/.conky/barographe/graph.png"

## Verifier argument 

##Infos generales
DATE=$(date +"%s")
DATE1WEEK=$(date --date="1 week ago" +"%s")

# liste des dates de releve du fichier log
EPOCH=()
while read 
do
    EPOCH+=( "$REPLY" )
done< <(awk '{print $1}' "$LOG")

# si le fichier existe et contient des valeurs de plus d'une semaine (premiere = plus vieille)
#supprimer premiere valeur
[[ -f $LOG ]] && {
    for i in $(seq 0 $(($(wc -l < $LOG)-1)))
    do
        [[ $DATE1WEEK -gt ${EPOCH[$i]} ]] && sed -i '1d' $LOG || break
    done
}


## Conversion en hectopascal et soustraction de la pression moyenne pour ramener l'axe a zero
PR_HP=`sed -n '8p' $HOME/1_accuweather/curr_cond | cut -c1-4`
TEMP=`sed -n '2p' $HOME/1_accuweather/curr_cond`
PR_CALC=$(bc << EOF
scale=0
$PR_HP - 1000
EOF
)
echo "$DATE $PR_CALC $TEMP" >> $LOG

gnuplot <<EOF
set border linewidth 2.5
set terminal png enhanced size 300,170  transparent #font "Ubuntu,10" 400,350
set term png font "URW Chancery L:style=Bold,14"
set output "$GRAPH"
unset key
set grid
set xzeroaxis lt 3 lw 1
set yzeroaxis
set ytics ("" -40, "" -20, "" 20, "" 40)
set mxtics 0
set xdata time
set timefmt "%s"
set xtics 86400
set format x "%d"
set style line 1 lw 3
set style line 2 lw 3
plot ["$DATE1WEEK":"$DATE"] [-40:50] "$LOG" using 1:3 with lines ls 2, "$LOG" using 1:2 with lines ls 1
EOF

exit 0

images pack

1553789236.png

@+

Last edited by loutch (2019-03-28 16:06:10)


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2364 2019-03-28 20:43:37

unklar
Member
Registered: 2015-10-31
Posts: 946

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

@loutch,
as always, this looks very good with the easysid wallpaper.  cool


The images pack unfortunately does not contain the required graph.png
I found this in my archive, derivantArt, at @shamen. I suppose it's the same.
graph.th.png

I rewrote the configuration file for the friends of Syntax1.9, big_smile  adapted it and took the original size of the graph.png image.

#configuration @loutch  https://forums.bunsenlabs.org/viewtopic.php?pid=84679#p84679
#modifikation @unklar 28-3-2019
	background yes
	use_xft yes
	xftfont Liberation Sans:size=7
	xftalpha 1.0
	update_interval 1
	total_run_times 0
	own_window yes
	own_window_transparent yes
#own_window_color 000000
	own_window_argb_visual yes
#own_window_argb_value 250
	own_window_type normal
	own_window_hints undecorated,below,skip_taskbar,skip_pager

	text_buffer_size 2048
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders no

#alignment top_left
	alignment br
	minimum_size 410 210
        maximum_width 410
	gap_x 10
	gap_y 360

	no_buffers yes
	double_buffer yes
	uppercase no
	cpu_avg_samples 2
	override_utf8_locale yes
	imlib_cache_flush_interval 60
	imlib_cache_size 10000

	stippled_borders 5

	default_color ffffff  #ffd579
	default_shade_color 333333
	default_outline_color black
	color1 F5B800
	color2 00f5ff
	color3 828200
	color4 323200

#--LUA--#

	lua_load ~/LUA/image.lua

TEXT
${alignc 30}${font monofur:size=12}Pressure
${if_gw}${execi 1200 bash ~/.conky/barograph_loutch/barognuploth.sh}${endif}
${image ~/.conky/barograph_loutch/images/graph.png -s 300x170 -p 50,10 -n}\
${font monofur:size=10}${voffset -8}${goto 50}${color1} 40° ${goto 335}${color2}1040 mb
${voffset 10}${goto 50}${color1} 20° ${goto 335}${color2}1020 mb
${voffset 12}${goto 50}${color1}  0° ${goto 335}${color2}1000 mb
${voffset 12}${goto 50}${color1}-10° ${goto 335}${color2} 980 mb
${voffset 12}${goto 50}${color1}-20° ${goto 335}${color2} 960 mb
${lua fDrawImage ~/.conky/barograph_loutch/images/base.png 66 18 228 97}
${lua fDrawImage ~/.conky/barograph_loutch/images/white.png 70 160 250 12}
#${voffset -800}

The terminal shows me the error

Conky: '/home/unklar/.conky/barograph_loutch/conkyrc9' modified, reloading...
Conky: desktop window (4a4) is root window
Conky: window type - normal
Conky: drawing to created window (0x3800002)
Conky: drawing to double buffer

gnuplot> set mxtics 0
                    ^
         line 0: warning: Expecting number of intervals

If I change the value from 0 to 1, the error is gone.
Nevertheless it seems to me that I have no output in the Conky...  hmm
ploth1.th.jpg

Last edited by unklar (2019-03-28 21:01:42)

Offline

#2365 2019-03-29 08:11:13

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

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

Hello

I have the same error in terminal .

The first day i launched the conky i saw  nothing .The listepression.log had just 1-2-3 line also hou have just 1-2-3 little points in the graph.png.


the graph.png is made by the script .

here my graph.png after 2 days

1553846951.png

@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2366 2019-03-31 18:25:42

unklar
Member
Registered: 2015-10-31
Posts: 946

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

Bonjour loutch,

tu avais raison. Il suffit d'être patient, alors la sortie du Conky sera aussi visible.  big_smile

Merci beaucoup pour votre travail.   smile

2019-03-31-20-14-31_scrot.th.png

Hello loutch,

you were right. You just have to be patient, then the output of the Conky will also be visible  big_smile

Thank you so much for your work.   smile

Offline

#2367 2019-04-01 14:22:34

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

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

Hello

here my complete weather-station in conky 1.10 & accuweather
(The problem with this version for 1 conky i must have 3 conkyrc (lua))

1554128629.png


@+


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2368 2019-04-01 18:11:36

unklar
Member
Registered: 2015-10-31
Posts: 946

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

Your "weather station" is excellent   big_smile

loutch wrote:

(The problem with this version for 1 conky i must have 3 conkyrc (lua)

I know the problem with the "round corners" in 1.10
manuel-909 had shown some "templates" in the "Show us your conky" thread.


loutch, for the left map I have this address in the script

https://neige.meteociel.fr/satellite/latest-ir-color.gif

I can't find the address for the right card. Can you help me out with that?

Offline

#2369 2019-04-01 18:23:23

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

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

no problem

here the adress

https://www.sat24.com/image.ashx?country=eu&type=zoom&format=640x480001001&rnd=610703

Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2370 2019-04-01 20:34:51

unklar
Member
Registered: 2015-10-31
Posts: 946

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

Thanks, loutch.   cool

sat24.th.png

Offline

#2371 2019-04-02 08:00:11

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

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

102.gif


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2372 2019-04-02 16:08:52

chepioq
Member
Registered: 2015-11-29
Posts: 69

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

1554220905-conky-meteo.png

Following my post #2339 I find a way to align vertical position with a script lua.

The conky:

conky.config = {
background = false,
use_xft = true,
font = 'DejaVuSansMono:size=8',
update_interval = 300.0,
total_run_times = 0,
own_window = true,
own_window_type = 'dock',
own_window_transparent = true,
own_window_argb_visual = true,
own_window_hints = 'undecorated,skip_taskbar,skip_pager,below',
double_buffer = true,
draw_shades = false,
draw_outline = false,
draw_borders = false,
draw_graph_borders = true,
stippled_borders = 8,
border_inner_margin = 4,
alignment = 'top_left',
minimum_width = 390,
minimum_height = 900,
gap_x = 130,
gap_y = 30,
no_buffers = false,
uppercase = false,
cpu_avg_samples = 2,
net_avg_samples = 2,
override_utf8_locale = true,
use_spacer = right,
text_buffer_size = 6144,
imlib_cache_size = 8192, 

default_outline_color = '000000',
color1 = 'F5B800',
color2 = '00f5ff',
color3 = '005fff',
color4 = 'ff4500',
lua_load = '/home/dominique/conky-meteo-dark_sky/date_position.lua', 
lua_draw_hook_pre = 'date_position',

}

conky.text = [[
${color2}${goto 90}${font DejaVuSansMono:bold:size=10}Prévisions semaine${font}
${image ~/conky-meteo-dark_sky/d1.png -p -1,35 -s 53x32}
${image ~/conky-meteo-dark_sky/d2.png -p -1,105 -s 53x32}
${image ~/conky-meteo-dark_sky/d3.png -p -1,175 -s 53x32}
${image ~/conky-meteo-dark_sky/d4.png -p -1,245 -s 53x32}
${image ~/conky-meteo-dark_sky/d5.png -p -1,315 -s 53x32}
${image ~/conky-meteo-dark_sky/d6.png -p -1,385 -s 53x32}
${image ~/conky-meteo-dark_sky/d7.png -p -1,455 -s 53x32}
${image ~/conky-meteo-dark_sky/d8.png -p -1,525 -s 53x32}
]]

And the script date_position.lua:

--[[Conky et lua pour afficher les heures de lever, coucher et zénith du soleil.
]]

require 'cairo'
require 'imlib2'


function conky_date_position()
    if conky_window == nil then return end

    local text_color={13,206,232}
    
     local text_d= conky_parse("${exec date '+%A %d %B'}")
     local text_d1= conky_parse("${exec date '+%A %d %B' --date '1 days'}")
     local text_d2= conky_parse("${exec date '+%A %d %B' --date '2 days'}")
     local text_d3= conky_parse("${exec date '+%A %d %B' --date '3 days'}")
     local text_d4= conky_parse("${exec date '+%A %d %B' --date '4 days'}")
     local text_d5= conky_parse("${exec date '+%A %d %B' --date '5 days'}")
     local text_d6= conky_parse("${exec date '+%A %d %B' --date '6 days'}")
     local text_d7= conky_parse("${exec date '+%A %d %B' --date '7 days'}")
     
     local text_p0= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p01= conky_parse("${exec jq --raw-output '.daily.data[0].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p1= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p11= conky_parse("${exec jq --raw-output '.daily.data[1].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p2= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p21= conky_parse("${exec jq --raw-output '.daily.data[2].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p3= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p31= conky_parse("${exec jq --raw-output '.daily.data[3].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p4= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p41= conky_parse("${exec jq --raw-output '.daily.data[4].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p5= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p51= conky_parse("${exec jq --raw-output '.daily.data[5].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p6= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p61= conky_parse("${exec jq --raw-output '.daily.data[6].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     local text_p7= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $1,$2,$3,$4,$5,$6}'}")
     local text_p71= conky_parse("${exec jq --raw-output '.daily.data[7].summary' $HOME/conky-meteo-dark_sky/rawdata | awk '{print $7,$8,$9,$10,$11,$12}'}")
     
     local text_th0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_th4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")   
     local text_th6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")     
     local text_th7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureHigh' $HOME/conky-meteo-dark_sky/rawdata}")
     
     local text_tm0= conky_parse("${exec jq --raw-output '.daily.data[0].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm1= conky_parse("${exec jq --raw-output '.daily.data[1].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm2= conky_parse("${exec jq --raw-output '.daily.data[2].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm3= conky_parse("${exec jq --raw-output '.daily.data[3].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm4= conky_parse("${exec jq --raw-output '.daily.data[4].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm5= conky_parse("${exec jq --raw-output '.daily.data[5].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm6= conky_parse("${exec jq --raw-output '.daily.data[6].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     local text_tm7= conky_parse("${exec jq --raw-output '.daily.data[7].temperatureLow' $HOME/conky-meteo-dark_sky/rawdata}")
     
--Police à utiliser
     local font= "DejaVuSansMono-Bold"
     local font_size= 14

    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs)

    cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)


    cairo_move_to (cr, 100.0, 60.0)
    cairo_show_text (cr, text_d)

    cairo_move_to (cr, 100.0, 130.0)
    cairo_show_text (cr, text_d1)

    cairo_move_to (cr, 100.0, 200.0)
    cairo_show_text (cr, text_d2)

    cairo_move_to (cr, 100.0, 270.0)
    cairo_show_text (cr, text_d3)

    cairo_move_to (cr, 100.0, 340.0)
    cairo_show_text (cr, text_d4)

    cairo_move_to (cr, 100.0, 410.0)
    cairo_show_text (cr, text_d5)
    
    cairo_move_to (cr, 100.0, 480.0)
    cairo_show_text (cr, text_d6)   
    
    cairo_move_to (cr, 100.0, 550.0)
    cairo_show_text (cr, text_d7)
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs)    
     local font1= "DejaVuSansMono"
     local font1_size= 11
     
    local text_color={233,149,3}
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs)


    cairo_select_font_face (cr, font1, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font1_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
    
    cairo_move_to (cr, 20.0, 80.0)
    cairo_show_text (cr, text_p0)
    cairo_move_to (cr, 20.0, 90.0)
    cairo_show_text (cr, text_p01)
    
    cairo_move_to (cr, 20.0, 150.0)
    cairo_show_text (cr, text_p1)
    cairo_move_to (cr, 20.0, 160.0)
    cairo_show_text (cr, text_p11)
    
    cairo_move_to (cr, 20.0, 220.0)
    cairo_show_text (cr, text_p2)
    cairo_move_to (cr, 20.0, 230.0)
    cairo_show_text (cr, text_p21)
    
    cairo_move_to (cr, 20.0, 290.0)
    cairo_show_text (cr, text_p3)
    cairo_move_to (cr, 20.0, 300.0)
    cairo_show_text (cr, text_p31)
    
    cairo_move_to (cr, 20.0, 360.0)
    cairo_show_text (cr, text_p4) 
        cairo_move_to (cr, 20.0, 370.0)
    cairo_show_text (cr, text_p41)

    cairo_move_to (cr, 20.0, 430.0)
    cairo_show_text (cr, text_p5)
    cairo_move_to (cr, 20.0, 440.0)
    cairo_show_text (cr, text_p51)
    
    cairo_move_to (cr, 20.0, 500.0)
    cairo_show_text (cr, text_p6)
    cairo_move_to (cr, 20.0, 510.0)
    cairo_show_text (cr, text_p61)
    
    cairo_move_to (cr, 20.0, 570.0)
    cairo_show_text (cr, text_p7)
    cairo_move_to (cr, 20.0, 580.0)
    cairo_show_text (cr, text_p71)
    
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs) 
     local font2= "DejaVuSansMono"
     local font2_size= 10

    local text_color={200,6,19}
    cr=cairo_create(cs)
    
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font2_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
        
    cairo_move_to (cr, 40.0, 110.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 110.0)
    cairo_show_text (cr, text_th0)
    
    cairo_move_to (cr, 40.0, 180.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 180.0)
    cairo_show_text (cr, text_th1)
    
    cairo_move_to (cr, 40.0, 250.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 250.0)
    cairo_show_text (cr, text_th2)
    
    cairo_move_to (cr, 40.0, 320.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 320.0)
    cairo_show_text (cr, text_th3)
    
    cairo_move_to (cr, 40.0, 390.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 390.0)
    cairo_show_text (cr, text_th4)    
    
    cairo_move_to (cr, 40.0, 460.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 460.0)
    cairo_show_text (cr, text_th5)
    
    cairo_move_to (cr, 40.0, 530.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 530.0)
    cairo_show_text (cr, text_th6)    
    
    cairo_move_to (cr, 40.0, 600.0)
    cairo_show_text (cr, "Temp Max : ")
    cairo_move_to (cr, 105.0, 600.0)
    cairo_show_text (cr, text_th7)    
    
    
    local cs=cairo_xlib_surface_create(conky_window.display, conky_window.drawable,
        conky_window.visual, conky_window.width,conky_window.height)
    cr=cairo_create(cs) 
     local font2= "DejaVuSansMono"
     local font2_size= 10

    local text_color={11,191,200}
    cr=cairo_create(cs)
    
    cairo_select_font_face (cr, font2, CAIRO_FONT_SLANT_NORMAL,
                               CAIRO_FONT_WEIGHT_NORMAL)
    cairo_set_font_size (cr, font2_size)
    cairo_set_source_rgba (cr, text_color[1]/255, text_color[2]/255, text_color[3]/255,1)
        
    cairo_move_to (cr, 160.0, 110.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 110.0)
    cairo_show_text (cr, text_tm0)
    
    cairo_move_to (cr, 140.0, 180.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 210.0, 180.0)
    cairo_show_text (cr, text_tm1)
    
    cairo_move_to (cr, 160.0, 250.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 250.0)
    cairo_show_text (cr, text_tm2)
    
    cairo_move_to (cr, 160.0, 320.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 320.0)
    cairo_show_text (cr, text_tm3)
    
    cairo_move_to (cr, 160.0, 390.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 390.0)
    cairo_show_text (cr, text_tm4)    
    
    cairo_move_to (cr, 160.0, 460.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 460.0)
    cairo_show_text (cr, text_tm5)
    
    cairo_move_to (cr, 160.0, 530.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 530.0)
    cairo_show_text (cr, text_tm6)    
    
    cairo_move_to (cr, 160.0, 600.0)
    cairo_show_text (cr, "Temp Min : ")
    cairo_move_to (cr, 230.0, 600.0)
    cairo_show_text (cr, text_tm7)    
    
    cairo_destroy(cr)
end

Offline

#2373 2019-04-04 07:09:14

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

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

Hello

Théo

Is that possible in 1_accuweather script to change in curr_cond the pression

at line 8 i have this 1000.40 mb to this 1000

For another conky i use this line in a lua script

name='exec',                arg='sed -n 8p $HOME/1_accuweather/curr_cond |cut -c1-4'

With 1000.1  1080.222 the lua work great but if the pressure is < to 1000 like this morning (998.40 mb)
the lua don't work because I have a point instead of the last number.

tanks


Linuxmint 19.1 Tessa cinnamon & mageia 7 mate on ssd hp pavilion g7
Xubuntu 18.04 lts & 19.04 xfce on ASUS Rog STRIX

Offline

#2374 2019-04-04 07:37:18

TeoBigusGeekus
BL DieHard
From: /Greece/Kastoria
Registered: 2015-10-04
Posts: 1,148

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

Try adding the following code to the current conditions section of the script

round_press=$(printf "%.0f\n" $(sed -n 8p $HOME/1_accuweather/curr_cond|sed 's/ mb//'))
sed -i "8s/.*/$round_press/" $HOME/1_accuweather/curr_cond

It will replace the currect pressure with a rounded value.


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

#2375 2019-04-04 07:42:09

chepioq
Member
Registered: 2015-11-29
Posts: 69

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

You also removes the "," in your code by adding that :
tr "," " "

name='exec',                arg='sed -n 8p $HOME/1_accuweather/curr_cond |cut -c1-4' | tr "," " "

Last edited by chepioq (2019-04-04 07:42:36)

Offline

Board footer

Powered by FluxBB