Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1776 Le 07/01/2013, à 20:23

Didier-T

Re : [Conky] Alternative à weather.com (2)

@ daniel38100,

Je dois avouer que je n'en sais rien, en plus débutant dans python sans exemple de ligne de code je suis un peut perdu tongue

Hors ligne

#1777 Le 08/01/2013, à 12:08

daniel38100

Re : [Conky] Alternative à weather.com (2)

Didier-T a écrit :

@ daniel38100,

Je dois avouer que je n'en sais rien, en plus débutant dans python sans exemple de ligne de code je suis un peut perdu tongue

en gros ca donne ca sans sans boucle des que je rentre je fait passer ce que j'ai commencer a faire

#!/usr/bin/python3
# -*-coding:UTF-8 -*-

 
import http.client , os , time

connexion = http.client.HTTPConnection("www.france-montagnes.com")
connexion.request("GET", "/station/tignes/bulletins" )
retour = connexion.getresponse()
data = retour.read()
bulletin=open("bulettin-neige", "w")
bulletin.write(str(data))
bulletin.close()
 
connexion.close()

je penche sur une météo des neiges

Dernière modification par daniel38100 (Le 08/01/2013, à 12:16)

Hors ligne

#1778 Le 09/01/2013, à 12:45

ragamatrix

Re : [Conky] Alternative à weather.com (2)

@Tous Bonne Année 2013 !
Je vois  que vous avez bien récupéré lol
Je viens de regarder votre discution sur le projet conky meteo france.

L'idée d'utiliser ce site est pour un soucis de stabilité du script ?
Dans votre futur projet sera t-il possible comme accuweather d'avoir les données de villes étrangères ?
(pour chez moi la ville recensée dans meteo france la plus proche est Zürich).
On dirait un gros chantier...Que la force soit avec vous....Prosit !

Hors ligne

#1779 Le 09/01/2013, à 14:47

ragamatrix

Re : [Conky] Alternative à weather.com (2)

@Didier-T
Je sais c'est un peu vieux; mais je voulais partager ce script à quelqu'un, mais malheureusement il ne fonctionne plus...

Didier-T a écrit :

@ ragamatrix,

Voici le script corrigé, il s'agissait bien du pattern

la ligne corrigé donne ceci

s,f,t=string.find(nowweather,"class=\"Icon\" /> (%a*(%s%a*))%s*</td>")

pour info a l'origine cette commande cherchait un mot compris entre class="Icon" /> et plusieurs espaces </td>
le soucis est que l'info qu'il trouvait était Broken Clouds, donc un mot, un espace, un mot.
la modification que j'ai fais dit de chercher un mot seul ou un mot, un espace, un mot.
Voila pour la minute éducative.

weathercircle.lua

--even more weather by mrpeachy 12/31/11
require 'cairo'
require 'imlib2'
function string:split(delimiter)
local result = { }
local from  = 1
local delim_from, delim_to = string.find( self, delimiter, from  )
while delim_from do
table.insert( result, string.sub( self, from , delim_from-1 ) )
from  = delim_to + 1
delim_from, delim_to = string.find( self, delimiter, from  )
end
table.insert( result, string.sub( self, from  ) )
return result
end

function conky_weather()
if conky_window == nil then return end
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 updates=tonumber(conky_parse('${updates}'))
if updates>5 then
local home = os.getenv("HOME")
--#########################################################################################################
--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP
secs=1800--set update interval
web="http://www.intellicast.com/Local/Forecast.aspx?unit=C&location=SZXX0014"--insert unit=C& after? for C
--get web address by going to the intellicast site and entering your location in the box
--for version 3 you must get click on "Extended Forecast" to get the necessary address
--set location of weather images
weathericons="~/v9000/additional_files/weathericons/"
weathericons=string.gsub(weathericons, "~", home)
--set defaults
default_font="mono"--font must be in quotes
default_font_size=10
default_color=0xffffff--white
default_alpha=1--fully opaque
default_image_width=50
default_image_height=50
--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP--SETUP
--#########################################################################################################
--############start of timed section#######################################################################
--#########################################################################################################
local updates=tonumber(conky_parse('${updates}'))
local timer=(updates %secs)+1
--#######################################
if timer==secs or updates==6 then--######
--#######################################
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
allweather=f:read("*a")
f:close()
if allweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
allweather=f:read("*a")
f:close()
end
if allweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A565 '10 Day Forecast' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
allweather=f:read("*a")
f:close()
end
allweather=string.gsub(allweather,"[\n\r]","")
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions&nbsp' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
nowweather=f:read("*a")
f:close()
if nowweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions&nbsp' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
nowweather=f:read("*a")
f:close()
end
if nowweather==nil then
local f=io.popen("curl --max-time 60 '"..web.."' | grep -A120 '>Current Conditions&nbsp' | sed 's/%//g'")-- > /home/climatix/v9000/weather.txt")
nowweather=f:read("*a")
f:close()
end
nowweather=string.gsub(nowweather,"[\n\r]","")
if allweather==nil then 
allweather=""
nowweather="" 
print "error curl operation failed"
end
--intellicast to conky weather icon conversion
wimage={
wx_65="32",
wx_66="30",
wx_67="26",
wx_68="32",
wx_69="28",
wx_70="20",
wx_71="32",
wx_72="21",
wx_73="36",
wx_74="14",
wx_75="28",
wx_76="18",
wx_77="14",
wx_78="23",
wx_79="05",
wx_80="15",
wx_81="15",
wx_82="11",
wx_83="16",
wx_84="00",
wx_85="32",
wx_86="25",
wx_87="09",
wx_88="05",
wx_89="18",
wx_90="18",
wx_91="39",
wx_92="39",
wx_93="39",
wx_94="39",
wx_95="37",
wx_96="37",
wx_97="31",
wx_98="29",
wx_99="27",
wx_100="47",
wx_101="47",
wx_102="33",
wx_103="26",
wx_104="20",
wx_105="45",
wx_106="45",
wx_107="11",
wx_108="46",
wx_109="46",
wx_110="06",
wx_111="18",
wx_112="06",
wx_113="46",
wx_114="46",
wx_115="31",
wx_116="47",
}--end w image table
--convert intellicast icons to weather font
wfont={
wx_65="a",
wx_66="c",
wx_67="f",
wx_68="a",
wx_69="d",
wx_70="0",
wx_71="a",
wx_72="9",
wx_73="5",
wx_74="p",
wx_75="d",
wx_76="w",
wx_77="p",
wx_78="6",
wx_79="x",
wx_80="8",
wx_81="8",
wx_82="h",
wx_83="q",
wx_84="m",
wx_85="a",
wx_86="-",
wx_87="h",
wx_88="x",
wx_89="w",
wx_90="w",
wx_91="g",
wx_92="g",
wx_93="g",
wx_94="g",
wx_95="k",
wx_96="k",
wx_97="A",
wx_98="C",
wx_99="D",
wx_100="K",
wx_101="K",
wx_102="B",
wx_103="f",
wx_104="0",
wx_105="G",
wx_106="G",
wx_107="h",
wx_108="O",
wx_109="O",
wx_110="x",
wx_111="w",
wx_112="x",
wx_113="O",
wx_114="O",
wx_115="A",
wx_116="K",
}--end w font table
--conversion day and month tables
dayshort={Monday="Mon",Tuesday="Tue",Wednesday="Wed",Thursday="Thu",Friday="Fri",Saturday="Sat",Sunday="Sun",x=""}
monthshort={January="Jan",February="Feb",March="Mar",April="Apr",May="May",June="Jun",July="Jul",August="Aug",September="Sep",October="Oct",November="Nov",December="Dec",x=""}
moonfontt={New="=",Full="@",FirstQuarter="G",LastQuarter="T",WaningGibbous="R",WaningCrescent="V",WaxingCrescent="E",WaxingGibbous="I"}
windfontt={S="9",SSW=":",SW=";",WSW="<",W="=",WNW=">",NW="?",NNW="@",N="1",NNE="2",NE="3",ENE="4",E="5",ESE="6",SE="7",SSE="8"}
--setup tables for forecast weather
forecast_day={}
forecast_day_caps={}
forecast_day_lc={}
forecast_day_short={}
forecast_day_short_caps={}
forecast_day_short_lc={}
forecast_month={}
forecast_month_caps={}
forecast_month_lc={}
forecast_month_short={}
forecast_month_short_caps={}
forecast_month_short_lc={}
forecast_date={}
weather_icon={}
weather_font={}
high_temp={}
low_temp={}
conditions={}
conditions_caps={}
conditions_lc={}
sun_rise={}
sun_rise_lc={}
moon_rise={}
moon_rise_lc={}
sun_set={}
sun_set_lc={}
moon_set={}
moon_set_lc={}
humidity={}
precipitation={}
snow={}
cloud_cover={}
moon_phase={}
moon_phase_caps={}
moon_phase_lc={}
moon_font={}
wind_mph={}
wind_km={}
wind_kts={}
wind_direction={}
wind_font={}
wind_deg={}
wind_nesw={}
uv_index_num={}
uv_index_txt={}
uv_index_txt_caps={}
uv_index_txt_lc={}
-----------------
--extract information into tables
local start=0
local f=1
while f~=nil do
--match forecast day name and date
s,f,t=string.find(allweather,"<td colspan=\"2\"><strong>([%a,%s%d]*)</strong></td>",start)
	if t~=nil then
	--split name from month and date
	a,b,day=string.find(t,"(%a*),%s")
	a,b,month=string.find(t,",%s(%a*)%s")
	a,b,date=string.find(t,"(%d*)$")
	--ser day names, regular, caps, lowercase and short
	table.insert(forecast_day,day)
	table.insert(forecast_day_caps,string.upper(day))
	table.insert(forecast_day_lc,string.lower(day))
	table.insert(forecast_day_short,dayshort[day])
	table.insert(forecast_day_short_caps,string.upper(dayshort[day]))
	table.insert(forecast_day_short_lc,string.lower(dayshort[day]))
	--set month types
	table.insert(forecast_month,month)
	table.insert(forecast_month_caps,string.upper(month))
	table.insert(forecast_month_lc,string.lower(month))
	table.insert(forecast_month_short,monthshort[month])
	table.insert(forecast_month_short_caps,string.upper(monthshort[month]))
	table.insert(forecast_month_short_lc,string.lower(monthshort[month]))
	--set date
	table.insert(forecast_date,date)
	end
--intellicast weather icon match
s,f,t=string.find(allweather,"40_white/(wx_..).png\"",start)
--convert to conkyweather icon
	if t~=nil then
	table.insert(weather_icon,weathericons..wimage[t]..".png")
	--convert to weather font
	table.insert(weather_font,wfont[t])
	end
--match conditions
s,f,t=string.find(allweather," /><br />([%a%s/]*)</td>",start)
	if t~=nil then
	table.insert(conditions,t)
	table.insert(conditions_caps,string.upper(t))
	table.insert(conditions_lc,string.lower(t))
	end
--match high temp
s,f,t=string.find(allweather,"\"Hi\">(%d*)&deg",start)
table.insert(high_temp,t)
--match low temp
s,f,t=string.find(allweather,"\"Lo\">(%d*)&deg",start)
table.insert(low_temp,t)
--match sunrise and set-- alt="Sunrise" style="vertical-align:bottom;" /><strong>Rise:</strong> 7:19 AM</td>            <td><strong>Set:</strong> 4:54 PM</td>
--match sun rise times
s,f,t=string.find(allweather,"Rise:</strong> (%d*:%d*%s%u%u)</td>",start)
	if t~=nil then
	table.insert(sun_rise,t)
	table.insert(sun_rise_lc,string.lower(t))
	end
--match sun set times
s,f,t=string.find(allweather,"Set:</strong> (%d*:%d*%s%u%u)</td>",f)
	if t~=nil then	
	table.insert(sun_set,t)
	table.insert(sun_set_lc,string.lower(t))
	end
--moon rise
s,f,t=string.find(allweather,"Rise:</strong> (%d*:%d*%s%u%u)</td>",f)
	if t~=nil then
	table.insert(moon_rise,t)
	table.insert(moon_rise_lc,string.lower(t))
	end
--moon set
s,f,t=string.find(allweather,"Set:</strong> (%d*:%d*%s%u%u)</td>",f)
	if t~=nil then
	table.insert(moon_set,t)
	table.insert(moon_set_lc,string.lower(t))
	end
--match uv index
s,f,tuv=string.find(allweather,"UV Index:</strong> (%d%s*%(%a*%)) <br />",start)
	if tuv~=nil then
	a,b,t=string.find(tuv,"(%d*)%s*%(%a*%)")
	table.insert(uv_index_num,t)
	a,b,t=string.find(tuv,"%d*%s*%((%a*)%)")
	table.insert(uv_index_txt,t)
	table.insert(uv_index_txt_caps,string.upper(t))
	table.insert(uv_index_txt_lc,string.lower(t))
	end
--match humidity
s,f,t=string.find(allweather,"Humidity:</strong> (%d*)<br />",start)
table.insert(humidity,t)
--match ppt
s,f,t=string.find(allweather,"Precipitation:</strong> (%d*)<br />",start)
table.insert(precipitation,t)
--match snow %
s,f,t=string.find(allweather,"Snow Probability:</strong>             (%d*)<br />",start)
table.insert(snow,t)
--match cloud coveage
s,f,t=string.find(allweather,"Cloud Coverage:</strong> (%d*)<br />",start)
table.insert(cloud_cover,t)
--match moon phase
s,f,t=string.find(allweather,"Moon Phase:</strong> ([%a%s]*) <br />",start)
--set moon phase text
	if t~= nil then
	table.insert(moon_phase,t)
	table.insert(moon_phase_caps,string.upper(t))
	table.insert(moon_phase_lc,string.lower(t))
	--set moon phase font
	mp=string.gsub(t," ","")
	table.insert(moon_font,moonfontt[mp])
	end
--match wind speeds
s,f,t=string.find(allweather,"Wind Speed:</strong> (%d*)Mph",start)
table.insert(wind_mph,t)
s,f,t=string.find(allweather,"Mph%s*%((%d*)Km,",start)
table.insert(wind_km,t)
s,f,t=string.find(allweather,"Km,%s*(%d*)Kts%)",start)
table.insert(wind_kts,t)
--match wind direction
s,f,twd=string.find(allweather,"Wind Direction:</strong> ([%d&;%s%(%a%)]*)        </div>",start)
	if twd~=nil then
	a,b,t=string.find(twd,"(%d*)&deg;")
	table.insert(wind_deg,t)
	--match wind font and nesw   
	a,b,t=string.find(twd,"%((%a*)%)")
	table.insert(wind_font,windfontt[t])
	table.insert(wind_nesw,t)
	end
if f==nil then break end
start=f
end--while
--#########################################################################################################################################
--end--of timed section
--format now weather
--extract current data
now={}
monthlong={Jan="January",Feb="February",Mar="March",Apr="April",May="May",Jun="June",Jul="July",Aug="August",Sep="September",Oct="October",Nov="November",Dec="December"}
s,f,tnow=string.find(nowweather,"<div style=\"float:right;color:#666;\">  As of ([%d%p%a%s]*) %(Local Time%)")
s,f,t=string.find(tnow,"(%d*%p%d*%s%a*) on")
now["time"]=t
now["time_lc"]=string.lower(t)
s,f,t=string.find(tnow,"on (%a*)%s%d*")
now["day"]=t
now["day_caps"]=string.upper(t)
now["day_lc"]=string.lower(t)
ds=dayshort[t]
now["day_short"]=ds
now["day_short_caps"]=string.upper(ds)
now["day_short_lc"]=string.lower(ds)
s,f,t=string.find(tnow,"%s(%d%d)%s")
now["date"]=t
s,f,t=string.find(tnow,"%d%d%s(%a*)%s%d")
now["month_short"]=t
now["month_short_caps"]=string.upper(t)
now["month_short_lc"]=string.lower(t)
ml=monthlong[t]
now["month"]=ml
now["month_caps"]=string.upper(ml)
now["month_lc"]=string.lower(ml)
s,f,t=string.find(tnow,"%a%a%a%s(%d%d%d%d)")
now["year"]=t
s,f,t=string.find(nowweather,"40_white/(wx_%d%d(%d)).png")
now["weather_icon"]=weathericons..wimage[t]..".png"
now["weather_font"]=wfont[t]
s,f,t=string.find(nowweather,"class=\"Icon\" /> (%a*(%s%a*))%s*</td>")
now["conditions"]=t
now["conditions_caps"]=string.upper(t)
now["conditions_lc"]=string.lower(t)
s,f,t=string.find(nowweather,"Temperature\">([%p%d]*)&deg")
now["temp"]=t
s,f,t=string.find(nowweather,">Feels Like: ([%p%d]*)&deg;</a>")
now["feels_like"]=t
s,f,t=string.find(nowweather,">Wind Chill: </a></td>%s*<td>([%p%d]*)&deg;</td>")
now["wind_chill"]=t
s,f,t=string.find(nowweather,">Ceiling: </a></td>%s*<td>([%a%d]*)</td>")
if t~="Unl" then
s,f,t=string.find(t,"(%d*)")
t=t.." mi"
end
now["ceiling"]=t
now["ceiling_caps"]=string.upper(t)
now["ceiling_lc"]=string.lower(t)
s,f,t=string.find(nowweather,">Heat Index: </a></td>%s*<td>([%p%d]*)&deg;</td>")
now["heat_index"]=t
s,f,t=string.find(nowweather,">Visibility: </a></td>%s*<td>([%a%d]*)</td>")
if t~="Unl" then
s,f,t=string.find(t,"(%d*)")
t=t.." mi"
end
now["visibility"]=t
now["visibility_caps"]=string.upper(t)
s,f,t=string.find(nowweather,">Dew Point: </a></td>%s*<td>([%p%d]*)&deg;</td>")
now["dew_point"]=t
s,f,t=string.find(nowweather,">Wind: </a></td>%s*<td>(%d*)mph</td>")
now["wind_mph"]=t.." mph"
s,f,t=string.find(nowweather,">Humidity: </a></td>%s*<td>(%d*)</td>")
now["humidity"]=t
s,f,twd=string.find(nowweather,">Direction: </a></td>%s*<td style=[%p%a]*>([%d&;%s%(%a%)]*)</td>%s*</tr>")
a,b,t=string.find(twd,"(%d*)&deg;")
now["wind_deg"]=t
a,b,t=string.find(twd,"%((%a*)%)")
now["wind_nesw"]=t
now["wind_font"]=windfontt[t]
s,f,t=string.find(nowweather,">Pressure: </a></td>%s*<td>([%d%p]*)\"</td>")
now["pressure"]=t
s,f,t=string.find(nowweather,">Gusts: </a></td>%s*<td>([%d%a]*)</td>")
if t~="NA" then
s,f,t=string.find(t,"(%d*)")
t=t.." mph"
end
now["wind_gusts"]=t
now["wind_gusts_caps"]=string.upper(t)
--###############end of data processing########################
--###########################
end--of timed section########
--###########################
--write lines here to show in conky
--these tables hold the top left coordinates for each repeat as set lower, do not edit
top_left_x_coordinate={}
top_left_y_coordinate={}
--write settings, c=color,a=alpha,f=font,fs=font size,x=x position, y=y position, txt=text or data to show
--eg out({c=0xffff00,a=1,f="Sans",fs=14,x=100,y=100,txt="hello world"})
--image settings, x=top left x position, y=top left y position, w=width of image(0=full size), h=height(0=full size),file=file location
--eg image({x=0,y=35,w=60,h=60,file=now[weather_icon]})
--########################################################
--######### write or paste setups below ##################
--########################################################
midx=160
midy=160
radouter=150
radinner=50
radforecast=90
radhilo=125
radfctxt=130
radcond=110
radsmall=25
fcangle1=0
fcangle2=45
fcangle3=90
fcangle4=135
fcangle5=180
wcr,wcg,wcb,wca=1,1,1,0.3
---------------------------------------------
cairo_set_line_width (cr,1)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
--draw outer circle
cairo_arc (cr,midx,midy,radouter,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
--draw inner circle
cairo_arc (cr,midx,midy,radinner,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
--draw forecast line and text
astr=270
aend=350
cairo_arc (cr,midx,midy,radfctxt,(math.pi/180)*(astr-90),(math.pi/180)*(aend-90))
cairo_stroke (cr)
cwt={text="FORECAST ",font="mono",fsize=16,radius=radfctxt+3,xpos=midx,ypos=midy,position=1,start=astr,finish=aend,justify=1,letterdeg=5,};cw(cwt)
--set start and end angle for conditions box
astr=205
aend=335
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
cairo_arc (cr,midx,midy,radcond,(math.pi/180)*(astr-90),(math.pi/180)*(aend-90))
cairo_stroke (cr)
cwt={text="CURRENT CONDITIONS ",font="mono",fsize=14,radius=radcond+3,xpos=midx,ypos=midy,position=1,start=astr,finish=aend,justify=1,letterdeg=5,};cw(cwt)
--print current temps
trad=radcond-16
cwt={text="TMP: "..now["temp"].."F / FL: "..now["feels_like"].."F ",font="mono",fsize=14,radius=trad,xpos=midx,ypos=midy,position=2,start=astr+5,finish=aend-5,justify=1,letterdeg=5.5,};cw(cwt)
--print current conditions wrap to length
--wrap settings
line_text=now["conditions_caps"]
max_string_len=16
indent=""
clines=to_lines(line_text,max_string_len,indent)
--set radius for conditions lines (shouldnt need more than 2)
crad1=trad-16
crad2=crad1-16
cwt={text=clines[1],font="mono",fsize=14,radius=crad1,xpos=midx,ypos=midy,position=2,start=astr+5,finish=aend-10,justify=1,letterdeg=7,};cw(cwt)
cwt={text=clines[2],font="mono",fsize=14,radius=crad2,xpos=midx,ypos=midy,position=1,start=astr+5,finish=aend-10,justify=1,letterdeg=8,};cw(cwt)
--connect lines to form curent box
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*astr
xs1=0+radcond*(math.sin(arc))
ys1=0-radcond*(math.cos(arc))
arc=(math.pi/180)*astr
xe1=0+radinner*(math.sin(arc))
ye1=0-radinner*(math.cos(arc))
cairo_move_to (cr,midx+xs1,midy+ys1)
cairo_line_to (cr,midx+xe1,midy+ye1)
cairo_stroke (cr)
arc=(math.pi/180)*aend
xs2=0+radcond*(math.sin(arc))
ys2=0-radcond*(math.cos(arc))
arc=(math.pi/180)*aend
xe2=0+radinner*(math.sin(arc))
ye2=0-radinner*(math.cos(arc))
cairo_move_to (cr,midx+xs2,midy+ys2)
cairo_line_to (cr,midx+xe2,midy+ye2)
cairo_stroke (cr)
--individual fc circles and forecast data
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle1
xfc1=0+radforecast*(math.sin(arc))
yfc1=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc1,midy+yfc1,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
radst=14
	arc=(math.pi/180)*fcangle1
	xfc1hl=0+(radsmall+radst)*(math.sin(arc))
	yfc1hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc1hl+xfc1,y=midy+yfc1hl+yfc1,txt=forecast_day_short_caps[1]})
	out({x=midx+xfc1hl+xfc1,y=midy+yfc1hl+yfc1+12,txt=high_temp[1].."F|"..low_temp[1].."F"})
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle2
xfc2=0+radforecast*(math.sin(arc))
yfc2=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc2,midy+yfc2,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle2
	xfc2hl=0+(radsmall+radst)*(math.sin(arc))
	yfc2hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc2hl+xfc2,y=midy+yfc2hl+yfc2,txt=forecast_day_short_caps[2]})
	out({x=midx+xfc2hl+xfc2,y=midy+yfc2hl+yfc2+12,txt=high_temp[2].."F|"..low_temp[2].."F"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle3
xfc3=0+radforecast*(math.sin(arc))
yfc3=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc3,midy+yfc3,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle3
	xfc3hl=0+(radsmall+radst)*(math.sin(arc))
	yfc3hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc3hl+xfc3,y=midy+yfc3hl+yfc3,txt=forecast_day_short_caps[3]})
	out({x=midx+xfc3hl+xfc3,y=midy+yfc3hl+yfc3+12,txt=high_temp[3].."F|"..low_temp[3].."F"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle4
xfc4=0+radforecast*(math.sin(arc))
yfc4=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc4,midy+yfc4,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle4
	xfc4hl=0+(radsmall+radst)*(math.sin(arc))
	yfc4hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc4hl+xfc4,y=midy+yfc4hl+yfc4,txt=forecast_day_short_caps[4]})
	out({x=midx+xfc4hl+xfc4,y=midy+yfc4hl+yfc4+12,txt=high_temp[4].."F|"..low_temp[4].."F"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
arc=(math.pi/180)*fcangle5
xfc5=0+radforecast*(math.sin(arc))
yfc5=0-radforecast*(math.cos(arc))
cairo_arc (cr,midx+xfc5,midy+yfc5,radsmall,(math.pi/180)*0,(math.pi/180)*360)
cairo_stroke (cr)
	arc=(math.pi/180)*fcangle5
	xfc5hl=0+(radsmall+radst)*(math.sin(arc))
	yfc5hl=0-(radsmall+radst)*(math.cos(arc))
	out({x=midx+xfc5hl+xfc5,y=midy+yfc5hl+yfc5,txt=forecast_day_short_caps[5]})
	out({x=midx+xfc5hl+xfc5,y=midy+yfc5hl+yfc5+12,txt=high_temp[5].."F|"..low_temp[5].."F"})	
	cairo_stroke (cr)
cairo_set_source_rgba (cr,wcr,wcg,wcb,wca)
--show weather icons
imsizel=80
image({x=midx-imsizel,y=midy-imsizel,w=imsizel,h=imsizel,file=now["weather_icon"]})
imsizes=50
image({x=midx+xfc1-imsizes,y=midy+yfc1-imsizes,w=imsizes,h=imsizes,file=weather_icon[1]})
image({x=midx+xfc2-imsizes,y=midy+yfc2-imsizes,w=imsizes,h=imsizes,file=weather_icon[2]})
image({x=midx+xfc3-imsizes,y=midy+yfc3-imsizes,w=imsizes,h=imsizes,file=weather_icon[3]})
image({x=midx+xfc4-imsizes,y=midy+yfc4-imsizes,w=imsizes,h=imsizes,file=weather_icon[4]})
image({x=midx+xfc5-imsizes,y=midy+yfc5-imsizes,w=imsizes,h=imsizes,file=weather_icon[5]})
--#########################################################
--########## end of current conditions ####################
--######### forecast weather and repeat ###################
--#########################################################
--enter number of forecast days to show
number_of_days=8
--enter coordinates of top left corner for each day
top_left_x_coordinate[1],top_left_y_coordinate[1]=270,15
top_left_x_coordinate[2],top_left_y_coordinate[2]=540,15
top_left_x_coordinate[3],top_left_y_coordinate[3]=0,190
top_left_x_coordinate[4],top_left_y_coordinate[4]=270,190
top_left_x_coordinate[5],top_left_y_coordinate[5]=540,190
top_left_x_coordinate[6],top_left_y_coordinate[6]=0,370
top_left_x_coordinate[7],top_left_y_coordinate[7]=270,370
top_left_x_coordinate[8],top_left_y_coordinate[8]=540,370
------------------------
for i=1,number_of_days do--start of day repeat, do not edit
tlx=top_left_x_coordinate[i]--sets top left position for each repeat
tly=top_left_y_coordinate[i]--sets top left position for each repeat
--write day format below, write x and y relative to top left coordinates as in the example
--write i to call day as this will be replaced with the day number for each repeat

end--of day repeat, do not edit
--##############################################################
--############## end of weather display setup ##################
--##############################################################

end-- if updates>5
cairo_destroy(cr)
cairo_surface_destroy(cs)
cr=nil
end-- end main function

function out(tx)
color=nil
color=tx.c
if color==nil then color=default_color end
alpha=nil
alpha=tx.a
if alpha==nil then alpha=default_alpha end
font=nil
font=tx.f
if font==nil then font=default_font end
fsize=nil
fsize=tx.fs
if fsize==nil then fsize=default_font_size end
xpos=nil
xpos=tx.x
if xpos==nil then xpos=0 end
ypos=nil
ypos=tx.y
if ypos==nil then ypos=0 end
text=nil
text=tx.txt
if text==nil then text="hello world" end
local function col(c)
return ( (c/0x10000) % 0x100)/255,( (c/0x100) % 0x100)/255,(c % 0x100)/255,alpha
end--local function
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,col(color))
cairo_move_to (cr,xpos,ypos)
cairo_show_text (cr,text)
cairo_stroke (cr)
end--function out

function image(im)
x=nil
x=im.x
if x==nil then x=0 end
y=nil
y=im.y
if y==nil then y=0 end
w=nil
w=im.w
if w==nil then w=default_image_width end
h=nil
h=im.h
if h==nil then h=default_image_height end
file=nil
file=tostring(im.file)
local show = imlib_load_image(file)
if show == nil then return end
imlib_context_set_image(show)
if tonumber(w)==0 then 
width=imlib_image_get_width() 
else
width=tonumber(w)
end
if tonumber(h)==0 then 
height=imlib_image_get_height() 
else
height=tonumber(h)
end
local iacross=x+(width/2)
local idown=y+(height/2)
imlib_context_set_image(show)
local scaled=imlib_create_cropped_scaled_image(0, 0, imlib_image_get_width(), imlib_image_get_height(), width, height)
imlib_free_image()
imlib_context_set_image(scaled)
imlib_render_image_on_drawable(iacross, idown)
imlib_free_image()
show=nil
end--function image

function cw(t)
--set variables and defualts
if t.text==nil then text="" else text=t.text end
if t.font==nil then font="mono" else font=t.font end
if t.fsize==nil then fsize=12 else fsize=t.fsize end
if t.radius==nil then radius=50 else radius=t.radius end
if t.xpos==nil then xpos=100 else xpos=t.xpos end
if t.ypos==nil then ypos=100 else ypos=t.ypos end
if t.position==nil then position=1 else position=t.position end
if t.start==nil then start=270 else start=t.start end
if t.finish==nil then finish=90 else finish=t.finish end
if t.justify==nil then justify=1 else justify=t.justify end
if t.letterdeg==nil then letterdeg=5 else letterdeg=t.letterdeg end
--end variables
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,1,1,1,1);
if finish<start then finish=finish+360 end
local inum=string.len(text)
---------------------------
if position==1 then
deg=(finish-start)/(inum-1)
elseif position==2 then
deg=letterdeg
	if justify==1 then
	start=start	
	elseif justify==2 then
	start=start-((letterdeg*inum)/2)
	elseif justify==3 then 
	start=start-(letterdeg*inum)
	end
end
----------------------------
local degrads=(math.pi/180)
local textcut=string.gsub(text, ".", "%1|")
texttable=string.split(textcut, "|")
for i=1,inum do
interval=(degrads*(start+(deg*(i-1))))
txs=0+radius*(math.sin(interval))
tys=0-radius*(math.cos(interval))
cairo_move_to (cr, txs+xpos, tys+ypos);
cairo_rotate (cr, interval)
cairo_show_text (cr, (texttable[i]))
cairo_stroke (cr)
cairo_rotate (cr, -interval)
end
end--circlewriting
function cwd(t)
--set variables and defualts
if t.text==nil then text="" else text=t.text end
if t.font==nil then font="mono" else font=t.font end
if t.fsize==nil then fsize=12 else fsize=t.fsize end
if t.radius==nil then radius=50 else radius=t.radius end
if t.xpos==nil then xpos=100 else xpos=t.xpos end
if t.ypos==nil then ypos=100 else ypos=t.ypos end
if t.position==nil then position=1 else position=t.position end
if t.start==nil then start=270 else start=t.start end
if t.finish==nil then finish=90 else finish=t.finish end
if t.justify==nil then justify=1 else justify=t.justify end
if t.letterdeg==nil then letterdeg=5 else letterdeg=t.letterdeg end
--end variables
cairo_select_font_face (cr, font, CAIRO_FONT_SLANT_NORMAL, CAIRO_FONT_WEIGHT_NORMAL);
cairo_set_font_size (cr, fsize)
cairo_set_source_rgba (cr,1,1,1,1);
if start<finish then start=start+360 end
local inum=string.len(text)
---------------------------
if position==1 then
deg=(start-finish)/(inum-1)
elseif position==2 then
deg=letterdeg
	if justify==1 then
	start=start	
	elseif justify==2 then
	start=start+((letterdeg*inum)/2)
	elseif justify==3 then 
	start=start+(letterdeg*inum)
	end
end
----------------------------
local degrads=(math.pi/180)
local textcut=string.gsub(text, ".", "%1<>")
texttable=string.split(textcut, "<>")
for i=1,inum do
interval=(degrads*(start-(deg*(i-1))))
txs=0+radius*(math.sin(interval))
tys=0-radius*(math.cos(interval))
cairo_move_to (cr, txs+xpos, tys+ypos);
cairo_rotate (cr, interval+(math.pi))
cairo_show_text (cr, (texttable[i]))
cairo_stroke (cr)
cairo_rotate (cr, -1*(interval+(math.pi)))
end
end--cwd 

function to_lines(line_text,max_string_len,indent)
---------------------------------------------
--set defaults for function
local default_max_length=50
local default indent=""
---------------------------------------------
if indent==nil then indent=default_indent end
if max_string_len==nil then max_string_len=default_max_length end
local i=1
text_table={line_text}
while text_table[i]~=nil do
if max_string==nil then max_string=max_string_len end
local v=text_table[i]
	if string.len(v)>max_string_len and string.find(v," ")~=nil and string.find(string.sub(v,1,max_string)," ")~=nil then
	long=string.len(v)
	splitcha=string.sub(v,max_string,max_string)	
		if splitcha~=" " then		
			while splitcha~=" " do
				if max_string>1 then
				max_string=max_string-1
				splitcha=string.sub(v,max_string,max_string)
				else
				splitcha=" "
				end
			end
		end
		local insertit=tostring(indent..string.sub(v,max_string+1,long))
		table.insert(text_table,i+1,insertit)
		text_table[i]=tostring(string.sub(v,1,max_string-1))	
	elseif string.len(v)>max_string_len and string.find(v," ")~=nil and string.find(string.sub(v,1,max_string)," ")==nil then
	long=string.len(v)
	splitcha=string.sub(v,max_string,max_string)		
		while splitcha~=" " do
			if max_string<long then
			max_string=max_string+1
			splitcha=string.sub(v,max_string,max_string)
			else
			splitcha=" "
			end
		end
		local insertit=tostring(indent..string.sub(v,max_string+1,long))
		table.insert(text_table,i+1,insertit)
		text_table[i]=tostring(string.sub(v,1,max_string-1))	
	end
i=i+1
max_string=max_string_len
end
return text_table
end--function  

conkyweathercirle

  ###  Begin Window Settings  ##################################################
# Create own window instead of using desktop (required in nautilus)
own_window yes
own_window_type override #override
own_window_transparent yes
own_window_hints below,sticky,skip_taskbar,skip_pager
own_window_argb_visual no
#own_window_colour black
own_window_class Forecast Conky
own_window_title Forecast by MrP

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

### ARGB can be used for real transparency
### NOTE that a composite manager is required for real transparency.
### This option will not work as desired (in most cases) in conjunction with
### 'own_window_type override'
own_window_argb_visual no

### When ARGB visuals are enabled, this use this to modify the alpha value
### Valid range is 0-255, where 0 is 0% opacity, and 255 is 100% opacity.
#own_window_argb_value 0

minimum_size 450 450     ## width, height
maximum_width 450 450      ## width, usually a good idea to equal minimum width

gap_x 10        ### left &right
gap_y 10        ### up & down

alignment tl
####################################################  End Window Settings  ###
###  Font Settings  ##########################################################
# Use Xft (anti-aliased font and stuff)
use_xft yes
# xftfont Anonymous Pro:bold:size=9
# xftfont Unispace:size=8
# xftfont Onuava:size=8
 #xftfont Inconsolata:bold:size=10
# xftfont Andale Mono:bold:size=9
xftfont DejVu Mono:size=9


# Alpha of Xft font. Must be a value at or between 1 and 0 ###
xftalpha 0
# Force UTF8? requires XFT ###
override_utf8_locale yes

draw_shades no
default_shade_color black

draw_outline no # amplifies text if yes
default_outline_color black

uppercase no
######################################################  End Font Settings  ###
###  Color Settings  #########################################################
default_shade_color grey
default_outline_color black

default_color DCDCDC #Gainsboro
color0 DAA520 #Goldenrod  FFFFF0 #Ivory
color1 778899 #LightSlateGrey
color2 FF8C00 #Darkorange
color3 7FFF00 #Chartreuse
color4 FFA07A #LightSalmon
color5 FFDEAD #NavajoWhite
color6 00BFFF #DeepSkyBlue
color7 00FFFF #Cyan 48D1CC #MediumTurquoise
color8 FFFF00 #Yellow
color9 FF0000 #Red
#####################################################  End Color Settings  ###
###  Borders Section  ########################################################
draw_borders no
# Stippled borders?
stippled_borders 0
# border margins
border_inner_margin 10
border_outer_margin 0
# border width
border_width 0
# graph borders
draw_graph_borders no
#####################################################  End Borders Secton  ###
###  Miscellaneous Section  ##################################################

# Boolean value, if true, Conky will be forked to background when started.
background no

# 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

# Default and Minimum size is 256 - needs more for single commands that
# "call" a lot of text IE: bash scripts
text_buffer_size 256

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

# change GiB to G and MiB to M
short_units yes

# Like it says, ot pads the decimals on % values
# doesn't seem to work since v1.7.1
pad_percents 2

##############################################  End Miscellaneous Section  ###
###  LUA Settings  ###########################################################
lua_load ~/v9000/weathercircle.lua
lua_draw_hook_pre weather #starts the lua weather data gathering function, call once at top of conkyrc



# The all important - How often conky refreshes.
# If you have a "Crey" try: 0.2 - smokin' - but watch the CPU useage go UP!
update_interval 1
top_name_width 7


TEXT
 

Edit : j'ai voulu fair tourner le script et ai trouvé quelque dificulté, j'ai donc modiifié de manière a ce que sa puisse fonctionner avec nos abitude d'alias (~ et $HOME ne veulent rien dire pour lua)
Edit : de toute évidence il y a eut du changement sur le site intellicast, il y a donc des patterns qui ne fonctionnes plus a tous les coups, je viens d'en corriger un second (ligne 404du nouveau script), donc si il y a d'autre soucis n’hésite pas.

Cette fois j'ai cette erreur :

 Conky: llua_do_call: function conky_weather execution failed: /home/climatix/v9000/weathercircle.lua:600: attempt to concatenate field '?' (a nil value) 

#ligne 600 :

 out({x=midx+xfc5hl+xfc5,y=midy+yfc5hl+yfc5+12,txt=high_temp[5].."C|"..low_temp[5].."C"}) 

merci si tu as encore du temps pour ça.

Hors ligne

#1780 Le 09/01/2013, à 23:17

maan

Re : [Conky] Alternative à weather.com (2)

Salut à tous, bonne et heureuse année 2013, et que la force soit avec vous tongue

Bon j'ai mon meteo_lua qui fait des siennes depuis hier,

Conky: llua_do_call: function conky_Meteo_enligne execution failed: /home/maan/conky/script/meteo.lua:504: field 'day' missing in date table
Conky: Unable to load image '/tmp/lune.png'

J'ai donc ma lune qui ne s'affiche plus sad  et je ne comprend pas ce qui cloche !!


Ubuntu_studio 14.04

Hors ligne

#1781 Le 10/01/2013, à 10:01

jpdipsy

Re : [Conky] Alternative à weather.com (2)

maan a écrit :

Salut à tous, bonne et heureuse année 2013, et que la force soit avec vous tongue

Bon j'ai mon meteo_lua qui fait des siennes depuis hier,

Conky: llua_do_call: function conky_Meteo_enligne execution failed: /home/maan/conky/script/meteo.lua:504: field 'day' missing in date table
Conky: Unable to load image '/tmp/lune.png'

J'ai donc ma lune qui ne s'affiche plus sad  et je ne comprend pas ce qui cloche !!

Salut

J'ai regardé un "chouilla" et apparemment  accuweather à apporté des changements radicaux donc rebelotte wait and see.

@Didier pour info detail-now n'existe plus  dans la page html donc meteo.lua  butte sur  Date = os.time{year=annee, month=mois, day=jour, hour=0} (pour que tu n'ai pas à chercher)

PS : la météo du jour - pluvieux  et froid sur le pays restez chez vous lol

Dernière modification par jpdipsy (Le 10/01/2013, à 10:10)

Hors ligne

#1782 Le 10/01/2013, à 16:54

Didier-T

Re : [Conky] Alternative à weather.com (2)

Euh... comment dire... ####@@!!! de site a la noix.

bon bien vas falloir que je mis remette, pas sur de finir un jour le python moi... pff

Edit : bon... en fait, il ne semble pas que sa ne posera de gros soucis

Dernière modification par Didier-T (Le 10/01/2013, à 17:19)

Hors ligne

#1783 Le 11/01/2013, à 14:06

ragamatrix

Re : [Conky] Alternative à weather.com (2)

Pour ceux qui veulent tester le v9000 qui devient de mieux en mieux traduit. J'ai modifier le template pour  un horizontal:
horizontal_forecast
template_meteo_barre.lua:

 --[[
 The latest script is a lua only weather script. aka: v9000
 http://crunchbang.org/forums/viewtopic.php?id=16100

 the file:
 http://dl.dropbox.com/u/19008369/weatheragain9000.lua.tar.gz

 mrppeachys LUA Tutorial
 http://crunchbang.org/forums/viewtopic.php?id=17246
]]
_G.weather_script = function()--#### DO NOT EDIT THIS LINE ##############
--these tables hold the coordinates for each repeat do not edit #########
top_left_x_coordinate={}--###############################################
top_left_y_coordinate={}--###############################################
--#######################################################################
--SET DEFAULTS ##########################################################
--set defaults do not localise these defaults if you use a seperate display script
default_font="Arial Rounded MT"--font must be in quotes
default_font_size=9
default_color=0xffffff	--white
default_alpha=1		--fully opaque
default_image_width=50
default_image_height=50
-- ## New Options ###
default_face="bold"
-- "normal" for normal/normal
-- "bold" for normal/bold
-- "italic" for italic/normal
-- "bolditalic" for italic/bold
--END OF DEFAULTS #######################################################
--START OF WEATHER CODE -- START OF WEATHER CODE -- START OF WEATHER CODE

--[[ forecast
datay=450  --375
datayy=15 --datay+(datayy*1)

datafx1=20

imgx=35
imgy=575
imgyy=60 -- imgy+(imgyy*1)
]]
-- forecast
datay=450
datayy=15 --datay+(datayy*1)

datafx1=20

imgx=45
imgy=575
imgyy=60 -- imgy+(imgyy*1)

ih=60
iw=60
-- ======================================================================
-- SUN & MOON RISE ------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=20,y=35,txt="Lever Soleil "})
      out({c=0x00BFFF,a=1,x=30,y=50,txt=sun_rise_24[1]})
   out({c=0xFAFAEC,a=1,x=90,y=35,txt=" Lever Lune"})
      out({c=0x00BFFF,a=1,x=100,y=50,txt=moon_rise_24[1]})
-- SUN & MOON SET -------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=20,y=65,txt="Coucher Soleil "})
      out({c=0xFF8C00,a=1,x=35,y=80,txt=sun_set_24[1]})
   out({c=0xFAFAEC,a=1,x=100,y=65,txt=" Coucher Lune"})
      out({c=0xFF8C00,a=1,x=110,y=80,txt=moon_set_24[1]})
-- ======================================================================
-- MOON PHASE - CENTRE --------------------------------------------------
   image({x=170,y=20,w=50,h=50,file=moon_icon[1]})
-- image({x=170,y=170,w=120,h=120,file="/media/5/Conky/images/red+.png"})
   --out({c=0xFFFFFF,a=1.0,x=190,y=235,txt=moon_phase[1]})

-- ======================================================================
-- CURRENT FOR TODAY - SEE TOP LEFT -------------------------------------
   image({x=230,y=15,w=60,h=60,file=now["weather_icon"]})
-- image({x=110,y=100,w=60,h=60,file="/media/5/Conky/images/red+.png"})
   out({c=0xFAFAEC,a=1,x=245,y=15,txt="T: "})
      out({c=0xFF8C00,fs=10,a=1,x=260,y=15,txt=now["temp"].."°"})
   out({c=0xC0C0C0,a=1,x=245,y=80,txt="± "})
      out({c=0xC0C0C0,fs=10,a=1,x=260,y=80,txt=now["feels_like"].."°"})

-- FORECAST TODAY - SEE TOP RIGHT ---------------------------------------
	out({c=0xFAFAEC,a=1,x=300,y=25,txt="Tendance journée:"})
   image({x=395,y=10,w=30,h=30,file=weather_icon[1]})
-- image({x=285,y=100,w=60,h=60,file="/media/5/Conky/images/red+.png"})
   out({c=0xFF8C00,fs=10,a=1,x=435,y=25,txt="↑ "})
     out({c=0xFF8C00,fs=10,a=1,x=447,y=25,txt=high_temp[1].."°"})
   out({c=0x6892C6,fs=10,a=1,x=465,y=25,txt="↓ "})
     out({c=0x6892C6,fs=10,a=1,x=477,y=25,txt=low_temp[1].."°"})

-- ======================================================================
-- WIND INFORMATION - SEE BOTTOM ----------------------------------------
   image({x=520,y=5,w=30,h=30,file=now["wind_icon"]})
-- image({x=185,y=290,w=90,h=90,file="/media/5/Conky/images/red+.png"})
   out({c=0xffffff,a=1,x=500,y=15,txt=now["wind_deg"]})
   out({c=0xffffff,a=1,x=500,y=35,txt=now["wind_nesw"]})
--   out({c=0xffffff,a=1,x=333,y=295,txt="@"})
      out({c=0xFF8C00,a=1,x=500,y=45,txt=now["wind_km"]..""})

-- ======================================================================
-- BOTTOM LEFT
-- Barometric Pressure
   out({c=0xFAFAEC,a=1,x=300,y=45,txt="Pression:"})
	out({c=0xFF8C00,a=1,x=345,y=45,txt=now["pressure_mb"].." mb"})
-- Humidity -------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=300,y=55,txt="Humidité:"})
      out({c=0xC0C0C0,a=1,x=350,y=55,txt=now["humidity"].."%"})
-- Dew Point ------------------------------------------------------------
   --out({c=0xFAFAEC,a=1,x=90,y=520,txt="DP:"})
      --out({c=0xC0C0C0,a=1,x=135,y=520,txt=now["dew_point"].."°"})
-- ======================================================================
-- BOTTOM RIGHT
-- Ceiling
   out({c=0xFAFAEC,a=1,x=300,y=65,txt="Plafond:"})
     out({c=0x227992,a=1,x=350,y=65,txt=now["ceiling"]})
-- Chance of Rain -------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=300,y=75,txt="Prob Préc:"})
      out({c=0xC0C0C0,a=1,x=355,y=75,txt=precipitation[1].."%"})
-- Cloud Cover
   out({c=0xFAFAEC,a=1,x=300,y=85,txt="Couv Nuages:"})
      out({c=0xC0C0C0,a=1,x=370,y=85,txt=cloud_cover[1].."%"})
-- ======================================================================
-- BOTTOM CENTRE
-- UV -------------------------------------------------------------------
   out({c=0xFAFAEC,a=1,x=170,y=84,txt="UV :"})
     out({c=0xC0C0C0,a=1,x=190,y=84,txt=uv_index_num[1]})
       out({c=0xC0C0C0,a=1,x=205,y=84,txt=uv_index_txt[1]})

-- ======================================================================
-- FORECAST FOR NEXT 3 HOURS --------------------------------------------
  --image({x=450,y=50,w=240,h=2,file="/home/climatix/.conky/conky37/red_1.png"})
out({c=0xFAFAEC,a=1,f="Arial",fs=10,x=415,y=55,txt="prochaines heures"})
 --out({c=0x227992,a=1,f="Arial",fs=16,x=400,y=30,txt="Hours"})
-- 1st hour
out({c=0xFF9600,x=410,y=65,txt=now["fc_hour1_time_24"]..":00"})
  image({w=30,h=30,x=410,y=65,file=now["fc_hour1_wicon"]})
 --image({w=60,h=60,x=20,y=475,file="/media/5/Conky/images/red+.png"})
out({c=0xAFAFAF,x=445,y=80,txt=now["fc_hour1_temp"] .."°"})
-- 2nd hour
--out({c=0xFF9600,x=212,y=470,txt=now["fc_hour2_time_24"]..":00"})
  --image({w=60,h=60,x=200,y=475,file=now["fc_hour2_wicon"]})
-- image({w=60,h=60,x=200,y=475,file="/media/5/Conky/images/red+.png"})
--out({c=0xAFAFAF,x=221,y=550,txt=now["fc_hour2_temp"] .."°"})
-- 3rd hour
out({c=0xFF9600,x=480,y=65,txt=now["fc_hour3_time_24"]..":00"})
  image({w=30,h=30,x=480,y=65,file=now["fc_hour3_wicon"]})
-- image({w=60,h=60,x=380,y=475,file="/media/5/Conky/images/red+.png"})
out({c=0xAFAFAF,x=515,y=80,txt=now["fc_hour3_temp"] .."°"})

-- ======================================================================
-- FORECAST for the next 9 days
-- Forecast day 2 -- x = l|r  y = u|d
out({c=0x9ACD32,a=1,x=573,y=20,txt=forecast_day_short[2]})
 out({c=0x9ACD32,a=1,x=595,y=20,txt=forecast_date[2]})
  --out({c=0x9ACD32,a=1,x=610,y=18,txt=forecast_month_short[2]})
image({w=40,h=40,x=570,y=25,file=weather_icon[2]})
-- image({w=iw,h=ih,x=imgx*0.6,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=615,y=35,txt=high_temp[2].."°"})
out({c=0x00BFFF,a=1,x=615,y=55,txt=low_temp[2].."°"})
 out({c=0x00BFFF,a=1,x=573,y=73,txt=sun_rise_24[2]})
 out({c=0xFF8C00,a=1,x=573,y=83,txt=sun_set_24[2]})
 -- out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*11.5),txt=moon_rise_24[2]})
  --out({c=0xC0C0C0,a=1,x=datafx1*4.6,y=datay+(datayy*12.5),txt=moon_set_24[2]})
-- Forecast day 3 -- x = l|r  y = u|d
out({c=0x9ACD32,a=1,x=660,y=20,txt=forecast_day_short[3]})
 out({c=0x9ACD32,a=1,x=685,y=20,txt=forecast_date[3]})
  --out({c=0x9ACD32,a=1,x=datafx1*12.2,y=datay+(datayy*8),txt=forecast_month_short[3]})
image({w=40,h=40,x=655,y=25,file=weather_icon[3]})
-- image({w=iw,h=ih,x=imgx*4.15,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=700,y=35,txt=high_temp[3].."°"})
out({c=0x00BFFF,a=1,x=700,y=55,txt=low_temp[3].."°"})
 out({c=0x00BFFF,a=1,x=658,y=73,txt=sun_rise_24[3]})
 out({c=0xFF8C00,a=1,x=658,y=83,txt=sun_set_24[3]})
  --out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*11.5),txt=moon_rise_24[3]})
  --out({c=0xC0C0C0,a=1,x=datafx1*12.6,y=datay+(datayy*12.5),txt=moon_set_24[3]})
-- Forecast day 4 -- x = l|r  y = u|d
out({c=0x9ACD32,a=1,x=747,y=20,txt=forecast_day_short[4]})
 out({c=0x9ACD32,a=1,x=772,y=20,txt=forecast_date[4]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=740,y=25,file=weather_icon[4]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=785,y=35,txt=high_temp[4].."°"})
out({c=0x00BFFF,a=1,x=785,y=55,txt=low_temp[4].."°"})
 out({c=0x00BFFF,a=1,x=743,y=73,txt=sun_rise_24[4]})
 out({c=0xFF8C00,a=1,x=743,y=83,txt=sun_set_24[4]})
  --out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*11.5),txt=moon_rise_24[4]})
  --out({c=0xC0C0C0,a=1,x=datafx1*20.3,y=datay+(datayy*12.5),txt=moon_set_24[4]})
-- ======================================================================
-- Forecast day 5 -- x = l|r  y = u|d
  out({c=0x9ACD32,a=1,x=832,y=20,txt=forecast_day_short[5]})
 out({c=0x9ACD32,a=1,x=857,y=20,txt=forecast_date[5]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=825,y=25,file=weather_icon[5]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=867,y=35,txt=high_temp[5].."°"})
out({c=0x00BFFF,a=1,x=867,y=55,txt=low_temp[5].."°"})
 out({c=0x00BFFF,a=1,x=830,y=73,txt=sun_rise_24[5]})
 out({c=0xFF8C00,a=1,x=830,y=83,txt=sun_set_24[5]})
-- Forecast day 6 -- x = l|r  y = u|d
 out({c=0x9ACD32,a=1,x=917,y=20,txt=forecast_day_short[6]})
 out({c=0x9ACD32,a=1,x=942,y=20,txt=forecast_date[6]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=910,y=25,file=weather_icon[6]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=952,y=35,txt=high_temp[6].."°"})
out({c=0x00BFFF,a=1,x=952,y=55,txt=low_temp[6].."°"})
 out({c=0x00BFFF,a=1,x=917,y=73,txt=sun_rise_24[6]})
 out({c=0xFF8C00,a=1,x=917,y=83,txt=sun_set_24[6]})
-- Forecast day 7 -- x = l|r  y = u|d
 out({c=0x9ACD32,a=1,x=1002,y=20,txt=forecast_day_short[7]})
 out({c=0x9ACD32,a=1,x=1027,y=20,txt=forecast_date[7]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=995,y=25,file=weather_icon[7]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=1037,y=35,txt=high_temp[7].."°"})
out({c=0x00BFFF,a=1,x=1037,y=55,txt=low_temp[7].."°"})
 out({c=0x00BFFF,a=1,x=1002,y=73,txt=sun_rise_24[7]})
 out({c=0xFF8C00,a=1,x=1002,y=83,txt=sun_set_24[7]})
-- ======================================================================
-- Forecast day 8 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=1087,y=20,txt=forecast_day_short[8]})
 out({c=0x9ACD32,a=1,x=1112,y=20,txt=forecast_date[8]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=1080,y=25,file=weather_icon[8]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=1122,y=35,txt=high_temp[8].."°"})
out({c=0x00BFFF,a=1,x=1122,y=55,txt=low_temp[8].."°"})
 out({c=0x00BFFF,a=1,x=1087,y=73,txt=sun_rise_24[8]})
 out({c=0xFF8C00,a=1,x=1087,y=83,txt=sun_set_24[8]})
-- Forecast day 9 -- x = l|r  y = u|d
    out({c=0x9ACD32,a=1,x=1172,y=20,txt=forecast_day_short[9]})
 out({c=0x9ACD32,a=1,x=1197,y=20,txt=forecast_date[9]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=1165,y=25,file=weather_icon[9]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=1207,y=35,txt=high_temp[9].."°"})
out({c=0x00BFFF,a=1,x=1207,y=55,txt=low_temp[9].."°"})
 out({c=0x00BFFF,a=1,x=1172,y=73,txt=sun_rise_24[9]})
 out({c=0xFF8C00,a=1,x=1172,y=83,txt=sun_set_24[9]})
-- Forecast day 10 -- x = l|r  y = u|d
   out({c=0x9ACD32,a=1,x=1257,y=20,txt=forecast_day_short[10]})
 out({c=0x9ACD32,a=1,x=1282,y=20,txt=forecast_date[10]})
  --out({c=0x9ACD32,a=1,x=datafx1*19.8,y=datay+(datayy*8),txt=forecast_month_short[4]})
image({w=40,h=40,x=1250,y=25,file=weather_icon[10]})
-- image({w=iw,h=ih,x=imgx*7.52,y=imgy,file="/media/5/Conky/images/red+.png"})
out({c=0xFF8C00,a=1,x=1292,y=35,txt=high_temp[10].."°"})
out({c=0x00BFFF,a=1,x=1292,y=55,txt=low_temp[10].."°"})
 out({c=0x00BFFF,a=1,x=1257,y=73,txt=sun_rise_24[10]})
 out({c=0xFF8C00,a=1,x=1257,y=83,txt=sun_set_24[10]})--]]

--#######################################################################
--END OF WEATHER CODE ----END OF WEATHER CODE ----END OF WEATHER CODE ---
--#######################################################################
end--of weather_display function do not edit this line ##################
--####################################################################### 

conkybarre_v9000:

 # -- Paramètres Conky Météo -- #
# Text alignment, other possible values are commented
alignment tl
#alignment top_right
#alignment bottom_left
#alignment bottom_right
# -- Conky settings -- #
	background yes
	update_interval 1
	cpu_avg_samples 2
	net_avg_samples 2
	override_utf8_locale yes
	double_buffer yes
	no_buffers yes
	text_buffer_size 2048
	imlib_cache_size 0
	# -- Window specifications -- #
	own_window yes
	own_window_type override
	own_window_transparent yes
	own_window_hints undecorate,sticky,skip_taskbar,skip_pager,below
	show_graph_range no
	show_graph_scale no
	short_units yes
	own_window_class Conky
	border_inner_margin 0
	border_outer_margin 0
# -- Graphics settings -- #
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders yes
# -- Couleurs -- #
default_color 645D5D
#color1 3B6702
#color2 645D5D
    color0 Cornsilk1#FFD700#GOLD#3b6702 # vert
    color1 black
    color2 white
    color3 EFEFEF # argile
    color4 LightGoldenrod3#vert_spring#645d5d # gris foncé
    color5 7FDD4C # vert clair
    color6 CC0000 # rouge
    color7 884DA7 # mauve
    color8 6892C6 # bleu ciel 2                                      
    color9 443AFF # bleu marine
# Gap between borders of screen and text
# same thing as passing -x at command line
gap_x 150
gap_y 55
# Minimum size of text area
minimum_size 1900 87  #Taille minimum (px) ; largeur / hauteur
maximum_width 1900  #Largeur maximum (px)
#out_to_console no
# Force UTF8? note that UTF8 support required XFT
#override_utf8_locale yes
# Stippled borders?
#stippled_borders 0
# This is the number of times Conky will update before quitting.
# Set to zero to run forever.
#total_run_times 0
# set to yes if you want all text to be in uppercase
uppercase no
# Add spaces to keep things from moving about?  This only affects certain objects.
#use_spacer no
# -- Text settings -- #
# Use Xft?
use_xft yes
xftalpha 0.8 #0.4
xftfont DejaVu:style=Bold:size=6 #Helvetica LT Std:size=10 #MaiandraGD:size=10##DejaVu:style=Bold:size=6

# -- Lua load -- #
lua_load ~/v9000/v9000.lua
lua_draw_hook_pre weather
lua_load ~/développement/revolutionary_clocks/template_meteo_barre.lua
lua_load ~/développement/revolutionary_clocks/draw_bg.lua
##############################################
#  Output#couleur bordeau EE0000
##############################################

TEXT

${goto 30}${font White Rabbit:style=bold:size=11}${color orange} Horgen
##### Heure #####
${voffset -17}${font Digitalk:size=75}${color DeepSkyBlue}${goto 1340}${time %H}:${goto 1480}${time %M}${font Digitalk:size=25}${color DodgerBlue3}${goto 1565} :${time %S}
${lua conky_draw_bg 15 10 5 540 87 0x000000 0.5}
${lua conky_draw_bg 15 560 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 645 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 730 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 815 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 900 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 985 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 1070 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 1155 5 75 87 0x000000 0.5}
${lua conky_draw_bg 15 1240 5 75 87 0x000000 0.5}
#${lua conky_draw_bg 15 870 5 300 87 0x000000 0.5}
#${lua conky_draw_bg 15 1180 5 300 87 0x000000 0.5}
${lua conky_draw_bg 15 1325 5 320 87 0x000000 0.5}
${voffset -500} 

Hors ligne

#1784 Le 11/01/2013, à 14:28

ragamatrix

Re : [Conky] Alternative à weather.com (2)

@Didier-T
Une petite question;
Si le graph températures et pression "bargnuplot.sh" ne réagit pas, est-ce du au récent problème du script Meteo-Lua (et changement de données sur le site) ?
J'ai aussi quelques doutes pour les données du "images_meteo.lua"...

Hors ligne

#1785 Le 11/01/2013, à 16:25

Didier-T

Re : [Conky] Alternative à weather.com (2)

@ ragamatrix,

Actuellement tous ce qui fonctionne avec meteo.lua est en rideau.
sa comprend les deux script dont tu parle.

Mais bon si j'arrive a dégager un peut de temps ce soir ou ce Week-end sa sera vite réglé.

Hors ligne

#1786 Le 11/01/2013, à 17:17

ragamatrix

Re : [Conky] Alternative à weather.com (2)

Didier-T a écrit :

@ ragamatrix,

Actuellement tous ce qui fonctionne avec meteo.lua est en rideau.
sa comprend les deux script dont tu parle.

Mais bon si j'arrive a dégager un peut de temps ce soir ou ce Week-end sa sera vite réglé.

Merci;
Peut-être qu'il faut attendre encore au cas où le site accuweather fasse de plus gros changements...? Je n'espère pas IN SHALLAH smile
No stress take your time !

Hors ligne

#1787 Le 12/01/2013, à 08:24

Didier-T

Re : [Conky] Alternative à weather.com (2)

@ tous,

le script meto.lua est corrigé version 4.9c

Hors ligne

#1788 Le 12/01/2013, à 09:15

jpdipsy

Re : [Conky] Alternative à weather.com (2)

Didier-T a écrit :

@ tous,

le script meto.lua est corrigé version 4.9c

Une journée qui commence bien quel bonheur ça roule !

Hors ligne

#1789 Le 14/01/2013, à 21:14

maan

Re : [Conky] Alternative à weather.com (2)

Didier-T a écrit :

@ tous,

le script meto.lua est corrigé version 4.9c


Merci Didier

You are the king  !!!!!


Ubuntu_studio 14.04

Hors ligne

#1790 Le 15/01/2013, à 07:50

jlfh0816

Re : [Conky] Alternative à weather.com (2)

@ Didier-T

Merci beaucoup pour la mise à jour 4.9c, elle fonctionne parfaitement !


Xubuntu - Voyager 18.04 et 22.04

Hors ligne

#1791 Le 15/01/2013, à 13:05

ragamatrix

Re : [Conky] Alternative à weather.com (2)

@Didier-T

Merci pour cette mise à jour; j'ai donc fais un conky meteo lua horizontal pour changer un peu...
Merci aussi pour l'aide concernant le script de "diaporama_ Nasa"que j'ai alléger en effet convert...
aperçu:
screen

Hors ligne

#1792 Le 16/01/2013, à 14:02

ragamatrix

Re : [Conky] Alternative à weather.com (2)

Salut daniel38100;
Je trouve très interressant le fait que tu ai integrer les prévisions à 8heures dans le images_meteo_lua.
Pourrais-tu nous faire partager ton creationmodules pour inspiration ?
Comment as tu fais pour afficher tous ces calendriers ?



daniel38100 a écrit :

http://pix.toile-libre.org/upload/img/1357154561.png

pour le script

images_meteo.lua

-- Créé par Didier-T (forum.ubuntu-fr.org), pour jpdipsy
-- Nécessite imagemagick http://apt.ubuntu.com/p/imagemagick



require "io"
require "os"


local Version = "v2.3c"
local conditionJour = {}
local conditionNuit = {}
local conditionMatin = {}
local conditionAM = {}
local conditionSoiree = {}
local conditionNoct = {}
local InfoJour = {}
local conditioncourante = {}
local huitHeures = {}
local Thermometre = {}
local ThermometresRond = {}
local init_thermo = {}
local init_thermo_res = {}
local init_rose = {}
local init_rose_raf = {}
local lunaison = {}
local Barometre = {}
local Rep, cmd, jours, matin, apresmidi, soiree, nuit, delais, r, repsauv, l, Rep_Therm, Rep_Rose, Palier, t1, MAJHold, maj1, Nb_Thermo, Rep_Lune, Rep_Barometre, Rep_ThermRond, Nb_ThermRond, palier1, palier2, palier3, palier4, mise_en_page,  fich_creationmodule
local boucle, imagecfg,meteocfg
boucle = tonumber("0")

-- Création rose des vent par jpdipsy
function Rose(i, dp, v, nom, taille, opacite)
    local angle, couleur, f ,couleurfont
    local vitesse = "'"..v.." km/h'"
    
    if v ~= nil then
        f = tonumber(v)
    else
        f = 0
    end
    
    if f <= Palier then
        couleur = palier1
        couleurfont = palier1coulfont
    elseif f <= Palier*2 then
        couleur = palier2
        couleurfont = palier2coulfont
    elseif f <= Palier*3 then
        couleur = palier3
        couleurfont = palier3coulfont
    elseif f >= (Palier*3)+1 then
        couleur = palier4
        couleurfont = palier4coulfont
    end


    if i == "Calme" then
        angle = nil
    elseif i == "N" then
        angle = 0
    elseif i == "NNE" then
        angle = 22.5
    elseif i == "NE" then
        angle = 45
    elseif i == "ENE" then
        angle = 67.5
    elseif i == "E" then
        angle = 90
    elseif i == "ESE" then
        angle = 112.5
    elseif i == "SE" then
        angle = 135
    elseif i == "SSE" then
        angle = 157.5
    elseif i == "S" then
        angle = 180
    elseif i == "SSO" then
        angle = 202.5
    elseif i == "SO" then
        angle = 225
    elseif i == "OSO" then
        angle = 247.5
    elseif i == "O" then
        angle = 270
    elseif i == "ONO" then
        angle = 292.5
    elseif i == "NO" then
        angle = 315
    elseif i == "NNO" then
        angle = 337.5
    else
        angle = nil
    end

    if angle ~= nil then

       os.execute(' convert -background transparent '..Rep_Rose..'/'..couleur..' -rotate '..angle..' '..Rep..'/dir_rot.png && composite -compose Over  -gravity Center '..Rep..'/dir_rot.png '..Rep_Rose..'/base.png '..Rep..'/'..nom..'.png')
   --os.execute(' convert -background transparent '..Rep_Rose..'/Calme.png -rotate -'..angle..' '..Rep..'/dir_rot.png && composite -compose Over  -gravity Center '..Rep..'/dir_rot.png '..Rep_Rose..'/'..couleur..' '..Rep..'/'..nom..'.png')
    else
        os.execute(' composite -compose Over  -gravity Center '..Rep_Rose..'/Calme.png '..Rep_Rose..'/base.png '..Rep..'/'..nom..'.png')
    end
    os.execute(' convert '..Rep..'/'..nom..'.png -font '..repfonts..'/AlteHaasGroteskBold.ttf   -fill '..couleurfont..' -pointsize 40 -gravity center -annotate +0+0 '..vitesse..' '..Rep..'/'..nom..'.png && mogrify -resize '..taille..'! '..Rep..'/'..nom..'.png && composite -blend 0x'..opacite..' null: '..Rep..'/'..nom..'.png -matte '..Rep..'/'..nom..'.png')
		os.execute('chmod -R o+rw- '..Rep)
		
end

-- Récupération des infos à afficher
function Recup(info)
    local num = info:match("%d+")
    if num ~= nil then
        info = string.gsub(info, num, "")
        num = tonumber(num)
    end
    info = string.gsub(info, " ", "")

    
    if info == "TempRes" then
        T1 =  conditioncourante.Tempr
    elseif info == "TempAct" then
        T1 =  conditioncourante.Temp
    elseif info == "Rose" then
        T1 =  conditioncourante.PointRosee
    elseif info == "Pression" then
        T1 =  conditioncourante.Pression
    elseif info == "Jour_Temp" then
        T1 =  conditionJour[num].Temp
    elseif info == "Jour_TempRes" then
        T1 =  conditionJour[num].TempRes
    elseif info == "Nuit_Temp" then
        T1 =  conditionNuit[num].Temp
    elseif info == "Nuit_TempRes" then
        T1 =  conditionNuit[num].TempRes
    elseif info == "Histo_Max" then
        T1 =  InfoJour[num].Histo_Max
    elseif info == "Histo_Min" then
        T1 =  InfoJour[num].Histo_Min
    elseif info == "Matin_TempMax" then
        T1 =  conditionMatin[num].TempMax
    elseif info == "Matin_TempMin" then
        T1 =  conditionMatin[num].TempMin
    elseif info == "Matin_TempMaxRes" then
        T1 =  conditionMatin[num].TempMaxR
    elseif info == "Matin_TempMinRes" then
        T1 =  conditionMatin[num].TempMinR
    elseif info == "Matin_Rose" then
        T1 =  conditionMatin[num].PointRosee
    elseif info == "AM_TempMax" then
        T1 =  conditionAM[num].TempMax
    elseif info == "AM_TempMin" then
        T1 =  conditionAM[num].TempMin
    elseif info == "AM_TempMaxRes" then
        T1 =  conditionAM[num].TempMaxR
    elseif info == "AM_TempMinRes" then
        T1 =  conditionAM[num].TempMinR
    elseif info == "AM_Rose" then
        T1 =  conditionAM[num].PointRosee
    elseif info == "Soiree_TempMax" then
        T1 =  conditionSoiree[num].TempMax
    elseif info == "Soiree_TempMin" then
        T1 =  conditionSoiree[num].TempMin
    elseif info == "Soiree_TempMaxRes" then
        T1 =  conditionSoiree[num].TempMaxR
    elseif info == "Soiree_TempMinRes" then
        T1 =  conditionSoiree[num].TempMinR
    elseif info == "Soiree_Rose" then
        T1 =  conditionSoiree[num].PointRosee
    elseif info == "Noct_TempMax" then
        T1 =  conditionNoct[num].TempMax
    elseif info == "Noct_TempMin" then
        T1 =  conditionNoct[num].TempMin
    elseif info == "Noct_TempMaxRes" then
        T1 =  conditionNoct[num].TempMaxR
    elseif info == "Noct_TempMinRes" then
        T1 =  conditionNoct[num].TempMinR
    elseif info == "Noct_Rose" then
        T1 =  conditionNoct[num].PointRosee
    elseif info == "huitHeure_TempMax" then
        T1 =  huitHeures[num].TempMax
    elseif info == "huitHeure_TempMin" then
        T1 =  huitHeures[num].TempMin
    elseif info == "huitHeure_TempMaxRes" then
        T1 =  huitHeures[num].TempMaxR
    elseif info == "huitHeure_TempMinRes" then
        T1 =  huitHeures[num].TempMinR
    elseif info == "huitHeure_Rose" then
        T1 =  huitHeures[num].PointRosee

    end
    
    T1 = tonumber(T1)
    if T1 <= -30 then
        T1 = -30
    elseif T1 >= 50 then
        T1 = 50
    end

    return T1
    
end


-- Création thermomètre par jpdipsy
function CreaThermometre(TherNb)

    local NbPlot
    local Tbase = Thermometre[TherNb].base
    local Alcool = Thermometre[TherNb].mercure
    Alcool = string.gsub(Alcool, " ", "")
    local InfoAlcool = Recup(Thermometre[TherNb].mercure_info)
    local Plot = {}
    local InfoPlot = {}
    
    if Thermometre[TherNb].plot ~= "" then
        local PlotCherche = Thermometre[TherNb].plot
        PlotCherche = string.gsub(PlotCherche, " ", "")
        local InfoPlotCherche = Thermometre[TherNb].plot_info

        local pos1 = 0
        NbPlot = 0
        while pos1 ~= nil do
            local pos2 = string.find(PlotCherche, ",", pos1+1)
            NbPlot = NbPlot+1
            if pos2 ~= nil then
                Plot[NbPlot] = string.sub(PlotCherche, pos1+1, pos2-1)
            else
                Plot[NbPlot] = string.sub(PlotCherche, pos1+1)
            end
            pos1 = pos2
        end
    
        pos1 = 0
        NbPlot = 0
        while pos1 ~= nil do
            local pos2 = string.find(InfoPlotCherche, ",", pos1+1)
            NbPlot = NbPlot+1
            if pos2 ~= nil then
                InfoPlot[NbPlot] = Recup(string.sub(InfoPlotCherche, pos1+1, pos2-1))
            else
                InfoPlot[NbPlot] = Recup(string.sub(InfoPlotCherche, pos1+1))
            end
            pos1 = pos2
        end
    end    
    

    if InfoAlcool > -30 then
      local T1 = (InfoAlcool*5)+150
      os.execute( "convert "..Rep_Therm.."/"..Alcool.." -resize 20x"..T1.."! "..Rep.."/colonne.png  && composite -compose Over -geometry -0+108 -gravity South "..Rep.."/colonne.png "..Rep_Therm.."/"..Tbase.." "..Rep.."/Thermo"..TherNb..".png" )
    else
        os.execute( "cp "..Rep_Therm.."/"..Tbase.." "..Rep.."/Thermo"..TherNb..".png" )
    end

    if NbPlot ~= nil then
        for i = 1, NbPlot do
            T2 = InfoPlot[i]
            local pos_T2 = (T2*5) +258
            os.execute("composite -compose Over  -geometry -0+"..pos_T2.."  -gravity South   "..Rep_Therm.."/"..Plot[i].." "..Rep.."/Thermo"..TherNb..".png  "..Rep.."/Thermo"..TherNb..".png")
        end
    end
    os.execute('mogrify -resize '..Thermometre[TherNb].taille..'! '..Rep..'/Thermo'..TherNb..'.png && composite -blend 0x'..Thermometre[TherNb].opacite..' null: '..Rep..'/Thermo'..TherNb..'.png -matte '..Rep..'/Thermo'..TherNb..'.png')
		os.execute('chmod -R o+rw- '..Rep)
end


function CreaThermometreRond(TherNb)
    local val
    os.execute(' cp '..Rep_ThermRond..'/base.png '..Rep..'/Thermorond'..TherNb..'.png')
    
    if ThermometresRond[TherNb].bleu ~= nil then
        val = Recup(ThermometresRond[TherNb].bleu)
        val = string.gsub(val, " ", "")
        cree("ind-bleu", val, TherNb)
    end
    if ThermometresRond[TherNb].rouge ~= nil then
        val = Recup(ThermometresRond[TherNb].rouge)
        val = string.gsub(val, " ", "")
        cree("ind-rouge", val, TherNb)
    end
    if ThermometresRond[TherNb].vert ~= nil then
        val = Recup(ThermometresRond[TherNb].vert)
        val = string.gsub(val, " ", "")
        cree("ind-vert", val, TherNb)
    end
    if ThermometresRond[TherNb].jaune ~= nil then
        val = Recup(ThermometresRond[TherNb].jaune)
        val = string.gsub(val, " ", "")
        cree("ind-jaune", val, TherNb)
    end
   if ThermometresRond[TherNb].blanc ~= nil then
        val = Recup(ThermometresRond[TherNb].blanc)
        val = string.gsub(val, " ", "")
        cree("ind-blanc", val, TherNb)
    end

    if ThermometresRond[TherNb].aiguille ~= nil then
        val = Recup(ThermometresRond[TherNb].aiguille)
        val = string.gsub(val, " ", "")
        cree("aiguille", val, TherNb)
    end
    os.execute('mogrify -resize '..ThermometresRond[TherNb].taille..'! '..Rep..'/Thermorond'..TherNb..'.png && composite -blend 0x'..ThermometresRond[TherNb].opacite..' null: '..Rep..'/Thermorond'..TherNb..'.png -matte '..Rep..'/Thermorond'..TherNb..'.png')
		os.execute('chmod -R o+rw- '..Rep)
end

function cree(aiguille, angle, TherNb)
    angle = (angle*4)-40
    os.execute(' convert -background transparent '..Rep_ThermRond..'/'..aiguille..'.png -rotate '..angle..' '..Rep..'/direction_rot.png && composite -compose Over  -gravity Center '..Rep..'/direction_rot.png '..Rep..'/Thermorond'..TherNb..'.png '..Rep..'/Thermorond'..TherNb..'.png')
		
end


function lune()
    
    local j, h, m = Age:match("(%d+) Jours (%d+)h (%d+)m")
    if j == nil then
        j, h, m = Age:match("(%d+) Jour (%d+)h (%d+)m")
        if j == nil then
            h, m = Age:match("(%d+)h (%d+)m")
            j = 0
        end
    end
    
    local angle = ((360/42524)*((((j*24)+h)*60)+m))+180

    os.execute(' convert -background transparent '..Rep_Lune..'/indicateur.png -rotate '..angle..' '..Rep..'/indicateur_rot.png && composite -compose Over  -gravity Center '..Rep..'/indicateur_rot.png '..Rep_Lune..'/lune-base.png '..Rep..'/lune.png && mogrify -resize '..lunaison.taille..'! '..Rep..'/lune.png && composite -blend 0x'..lunaison.opacite..' null: '..Rep..'/lune.png -matte '..Rep..'/lune.png')
    os.execute('chmod -R o+rw- '..Rep)
    
end


function Baro()
    
    local angle = ((conditioncourante.Pression-980)*4.5)-135

    ---- Aiguille
     os.execute('convert -background transparent '..Rep_Barometre..'/aiguille.png -rotate '..angle..' '..Rep..'/aiguille_rot.png && composite -compose Over  -gravity Center '..Rep..'/aiguille_rot.png '..Rep_Barometre..'/base.png '..Rep..'/Barometre.png && mogrify -resize '..Barometre.taille..'! '..Rep..'/Barometre.png && composite -blend 0x'..Barometre.opacite..' null: '..Rep..'/Barometre.png -matte '..Rep..'/Barometre.png')
    os.execute('chmod -R o+rw- '..Rep)
end


-- initialisation création rose des sables
function fonc_init_rose()

    for j = 1,jours do
        init_rose[j] = {CondCour=nil, Jour=nil, Nuit=nil, Matin=nil, AM=nil, Soiree=nil, Noct=nil, huitHeures=nil}
        init_rose_raf[j]= {CondCour=nil, Jour=nil, Nuit=nil, Matin=nil, AM=nil, Soiree=nil, Noct=nil, huitHeures=nil}
    end
    
end


-----Affichage Barometre
function conky_Images_Barometre(p, s, f, o)

    if Barometre.taille == nil then 
        Barometre.opacite = o
        Barometre.taille = s
        Baro()
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/Barometre.png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/Barometre.png "
    end
end


-----Affichage lune
function conky_Images_Lunaison(p, s, f, o)
    if lunaison.taille == nil then 
        lunaison.opacite = o
        lunaison.taille = s
        lune()
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/lune.png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/lune.png "
    end
end


-----Affichage Thermometre
function conky_Images_Thermo(p, s, f, n, o)


  n = tonumber(n)
    if Thermometre[n].opacite == nil then
        Thermometre[n].opacite = o
        Thermometre[n].taille = s
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/Thermo"..n..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/Thermo"..n..".png"
    end
end

function conky_Images_ThermoRond(p, s, f, n, o, a, b, c, d)

--p=position s=taille f=frequence de rafraichissement n=num therm o=opacité a=info 1 b=info 2 c=info 3 d=info 4
    n = tonumber(n)
    if ThermometresRond[n] == nil then
        ThermometresRond[n] = {}
        Nb_ThermRond = n
        local pos
        if a ~= nil then
            a = string.gsub(a, "-", " ")
            if string.find(a, 'a=') ~= nil then
                pos = string.find(a, '=')
                ThermometresRond[n].aiguille = string.sub(a, pos+1)
            elseif string.find(a, 'b=') ~= nil then
                pos = string.find(a, '=')
                ThermometresRond[n].bleu = string.sub(a, pos+1)
            elseif string.find(a, 'r=') ~= nil then
                pos = string.find(a, '=')
                ThermometresRond[n].rouge = string.sub(a, pos+1)
            elseif string.find(a, 'v=') ~= nil then
                pos = string.find(a, '=')
                ThermometresRond[n].vert = string.sub(a, pos+1)
	    elseif string.find(a, 'j=') ~= nil then
                pos = string.find(a, '=')
                ThermometresRond[n].jaune = string.sub(a, pos+1)
	    elseif string.find(a, 'w=') ~= nil then
                pos = string.find(a, '=')
                ThermometresRond[n].blanc = string.sub(a, pos+1)
            end
        end
        if b ~= nil then
            b = string.gsub(b, "-", " ")
            if string.find(b, 'a=') ~= nil then
                pos = string.find(b, '=')
                ThermometresRond[n].aiguille = string.sub(b, pos+1)
            elseif string.find(b, 'b=') ~= nil then
                pos = string.find(b, '=')
                ThermometresRond[n].bleu = string.sub(b, pos+1)
            elseif string.find(b, 'r=') ~= nil then
                pos = string.find(b, '=')
                ThermometresRond[n].rouge = string.sub(b, pos+1)
            elseif string.find(b, 'v=') ~= nil then
                pos = string.find(b, '=')
                ThermometresRond[n].vert = string.sub(b, pos+1)
	    elseif string.find(b, 'j=') ~= nil then
                pos = string.find(b, '=')
                ThermometresRond[n].jaune = string.sub(b, pos+1)
	    elseif string.find(b, 'w=') ~= nil then
                pos = string.find(b, '=')
                ThermometresRond[n].blanc = string.sub(b, pos+1)
            end
        end
        if c ~= nil then
            c = string.gsub(c, "-", " ")
            if string.find(c, 'a=') ~= nil then
                pos = string.find(c, '=')
                ThermometresRond[n].aiguille = string.sub(c, pos+1)
            elseif string.find(c, 'b=') ~= nil then
                pos = string.find(c, '=')
                ThermometresRond[n].bleu = string.sub(c, pos+1)
            elseif string.find(c, 'r=') ~= nil then
                pos = string.find(c, '=')
                ThermometresRond[n].rouge = string.sub(c, pos+1)
            elseif string.find(c, 'v=') ~= nil then
                pos = string.find(c, '=')
                ThermometresRond[n].vert = string.sub(c, pos+1)
	    elseif string.find(c, 'j=') ~= nil then
                pos = string.find(c, '=')
                ThermometresRond[n].jaune = string.sub(c, pos+1)
	    elseif string.find(c, 'w=') ~= nil then
                pos = string.find(c, '=')
                ThermometresRond[n].blanc = string.sub(c, pos+1)
            end
        end
        if d ~= nil then
            d = string.gsub(d, "-", " ")
            if string.find(d, 'a=') ~= nil then
                pos = string.find(d, '=')
                ThermometresRond[n].aiguille = string.sub(d, pos+1)
            elseif string.find(d, 'b=') ~= nil then
                pos = string.find(d, '=')
                ThermometresRond[n].bleu = string.sub(d, pos+1)
            elseif string.find(d, 'r=') ~= nil then
                pos = string.find(d, '=')
                ThermometresRond[n].rouge = string.sub(d, pos+1)
            elseif string.find(d, 'v=') ~= nil then
                pos = string.find(d, '=')
                ThermometresRond[n].vert = string.sub(d, pos+1)
	    elseif string.find(a, 'j=') ~= nil then
                pos = string.find(d, '=')
                ThermometresRond[n].jaune = string.sub(d, pos+1)
	    elseif string.find(d, 'w=') ~= nil then
                pos = string.find(d, '=')
                ThermometresRond[n].blanc = string.sub(d, pos+1)
            end
        end
        ThermometresRond[n].taille = s
        ThermometresRond[n].opacite = o
        CreaThermometreRond(n)
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/Thermorond"..n..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/Thermorond"..n..".png"
    end
end


-----Affichage rose des sables
--Condition courante
function conky_Images_Rose(p, s, f, o)
    j = 1

    if init_rose[j].CondCour == nil then
        Rose(conditioncourante.VentDir, conditioncourante.VentPlein, conditioncourante.VentForce, "Rose", s, o)
        init_rose[j].CondCour = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/Rose.png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/Rose.png"
    end
end


--Prévision sur la journée
function conky_Images_Jour_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].Jour == nil then
        Rose(conditionJour[j].VentDir, conditionJour[j].VentP, conditionJour[j].VentForce, "RoseJour"..j, s, o)
        init_rose[j].Jour = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseJour"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseJour"..j..".png"
    end
end

function conky_Images_Jour_RoseR(p, s, f, j, o)
    j = tonumber(j)

    if init_rose_raf[j].Jour == nil then
        Rose(conditionJour[j].VentDir, conditionJour[j].VentP, conditionJour[j].VentRafales, "RoseJourR"..j, s, o)
        init_rose_raf[j].Jour = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseJourR"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseJourR"..j..".png"
    end
end


--Prévision sur la nuit
function conky_Images_Nuit_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].Nuit == nil then
        Rose(conditionNuit[j].VentDir, conditionNuit[j].VentP, conditionNuit[j].VentForce, "RoseNuit"..j, s, o)
        init_rose[j].Nuit = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseNuit"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseNuit"..j..".png"
    end
end

function conky_Images_Nuit_RoseR(p, s, f, j, o)
    j = tonumber(j)

    if init_rose_raf[j].Nuit == nil then
        Rose(conditionNuit[j].VentDir, conditionNuit[j].VentP, conditionNuit[j].VentRafales, "RoseNuitR"..j, s, o)
        init_rose_raf[j].Nuit = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseNuitR"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseNuitR"..j..".png"
    end
end


--Condition Matinée
function conky_Images_Matin_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].Matin == nil then
        Rose(conditionMatin[j].VentDir, conditionMatin[j].VentP, conditionMatin[j].VentForce, "RoseMatin"..j, s, o)
        init_rose[j].Matin = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseMatin"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseMatin"..j..".png"
    end
end


--Condition Après midi
function conky_Images_AM_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].AM == nil then
        Rose(conditionAM[j].VentDir, conditionAM[j].VentP, conditionAM[j].VentForce, "RoseAM"..j, s, o)
        init_rose[j].AM = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseAM"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseAM"..j..".png"
    end
end


--Condition soirée
function conky_Images_Soiree_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].Soiree == nil then
        Rose(conditionSoiree[j].VentDir, conditionSoiree[j].VentP, conditionSoiree[j].VentForce, "RoseSoiree"..j, s, o)
        init_rose[j].Soiree = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseSoiree"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseSoiree"..j..".png"
    end
end

--Condition Nuit
function conky_Images_Noct_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].Noct == nil then
        Rose(conditionNoct[j].VentDir, conditionNoct[j].VentP, conditionNoct[j].VentForce, "RoseNoct"..j, s, o)
        init_rose[j].Noct = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RoseNoct"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RoseNoct"..j..".png"
    end
end

--huitHeures
function conky_Images_huitHeures_Rose(p, s, f, j, o)
    j = tonumber(j)

    if init_rose[j].huitHeures == nil then
        Rose(huitHeures[j].VentDir, huitHeures[j].VentP, huitHeures[j].VentForce, "RosehuitHeures"..j, s, o)
        init_rose[j].huitHeures = 1
    end
    if Mode ~= "fondecran" then
        return "${image "..Rep.."/RosehuitHeures"..j..".png -p "..p.." -s "..s.." -f "..f.."}"
    else
        return Rep.."/RosehuitHeures"..j..".png"
    end
end




--Récupération de données
function conky_Images_MAJ(cfg)


	local s = '${lua Meteo_etat_MAJ}'
	local MAJ = conky_parse( s )
		
	
	if maj1 == nil then
		init(cfg)
		maj1 = "ok"
		MAJHold = MAJ+1
		
	end
	
	if MAJ ~= MAJHold then

		MAJHold = MAJ
--Récupération dernière condition courante
		local file = assert(io.open(repsauv.."/CondCour", "r") )
		local line = file:read()
		local i = 0
		local donee = {}
		for line in file:lines() do
			i = i+1
			donee[i] = line
		end
		local t = {"Icone", "Tempr", "Temp", "Cond", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "VentDir", "VentPlein", "VentForce", "VentIcone", "Humidite", "PointRosee", "Pression", "Visibilite", "Date", "Ville", "CouvNuage", "Uv", "latitude", "longitude"}
		for i = 1,22 do
			conditioncourante[t[i]] = donee[i]
		end
		time = donee[23]
		io.close(file)
		
--Récupération prévision
		
		for j = 1,jours do
			local file = assert(io.open(repsauv.."/prevision"..j, "r"))
			local line = file:read()
			local i = 0
			local donee = {}
			for line in file:lines() do
				i = i+1
				donee[i] = line
			end
			local info = {}
			local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "Temp", "TempRes", "ProbPrec", "VentDir", "VentP", "VentForce", "VentRafales", "Uv", "ProbOrage", "NivPrec", "QPluie", "QNeige", "Icone", "VentIcone", "RafalesIcone", "EVerglas"}
			conditionJour[j] = {}
			for i = 1, 21 do
				info[t[i]] = donee[i]
			end
			conditionJour[j] = info
			local info1 = {}
			t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "Temp", "TempRes", "ProbPrec", "VentDir", "VentP", "VentForce", "VentRafales", "ProbOrage", "NivPrec", "QPluie", "QNeige", "Icone", "VentIcone", "RafalesIcone", "EVerglas"}
			conditionNuit[j] = {}
			for i = 22, 41 do
				info1[t[i-21]] = donee[i]
			end
			conditionNuit[j] = info1
			local info2 = {}
			t= {"Jour", "LeverSoleilH", "LeverSoleilM", "CoucherSoleilH", "CoucherSoleilM", "Histo_Max", "Histo_Min"}
			InfoJour[j] = {}
			for i = 42, 48 do
				info2[t[i-41]] = donee[i]
			end
			InfoJour[j] = info2
			io.close(file)
			
			if matin == "oui" then
				local file = assert(io.open(repsauv.."/matin"..j, "r"))
				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
				conditionMatin[j] = {}
				local info3 = {}
				for i = 1, 21 do
					info3[t[i]] = donee[i]
				end
				conditionMatin[j] = info3
				io.close(file)
			end

			if apresmidi == "oui" then
				local file = assert(io.open(repsauv.."/ApresMidi"..j, "r"))
				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
				conditionAM[j] = {}
				local info3 = {}
				for i = 1, 21 do
					info3[t[i]] = donee[i]
				end
				conditionAM[j] = info3
				io.close(file)
			end

			if soiree == "oui" then
				local file = assert(io.open(repsauv.."/Soiree"..j, "r"))
				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
				conditionSoiree[j] = {}
				local info3 = {}
				for i = 1, 21 do
					info3[t[i]] = donee[i]
				end
				conditionSoiree[j] = info3
				io.close(file)
			end

			if nuit == "oui" then
				local file = assert(io.open(repsauv.."/Nuit"..j, "r"))
				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				local t = {"CondMeteo", "CondMeteo1", "CondMeteo2", "CondMeteo1se", "CondMeteo2se", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "VentDir", "VentP", "VentForce", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite", "Icone", "VentIcone"}
				conditionNoct[j] = {}
				local info3 = {}
				for i = 1, 21 do
					info3[t[i]] = donee[i]
				end
				conditionNoct[j] = info3
				io.close(file)
			end

		end

		if huit == "oui" then
			for j = 1,8 do
				local file = assert(io.open(repsauv.."/huitHeures"..j, "r"))
				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				local t = {"Heure", "Icone", "TempMax", "TempMaxR", "VentDir", "VentForce", "Humidite", "CouvNuage", "PointRosee", "UV", "Pluie", "Neige", "Verglas", "VentP", "VentIcone"}
				huitHeures[j] = {}
				local info3 = {}
				for i = 1, 15 do
					info3[t[i]] = donee[i]
				end
				huitHeures[j] = info3
				io.close(file)
			end
		end			

		--Récupération lunaison
		local file = assert(io.open(repsauv.."/lunaison", "r"))
		local line = file:read()
		local i = 0
		local donee = {}
		for line in file:lines() do
			i = i+1
			donee[i] = line
		end
		ephemerides = donee[1]
		ephemerides1 = donee[2]
		ephemerides2 = donee[3]
		Visibilite = donee[4]
		Phases = donee[5]
		Phases1 = donee[6]
		Phases2 = donee[7]
		Noeud_lunaire = donee[8]
		Apogee = donee[9]
		Perigee = donee[10]
		Distance = donee[11]
		Age = donee[12]
		Lever_LuneHeure = donee[13]
		Lever_LuneMinute = donee[14]
		Coucher_LuneHeure = donee[15]
		Coucher_LuneMinute = donee[16]
		Eclipse_partielle = donee[17]
		Eclipse_total = donee[18]
		io.close(file)
			

		if Barometre.taille ~= nil then Baro() end
		if lunaison.taille ~= nil then lune() end
		fonc_init_rose()
		
		local i = 0
		while i ~= Nb_Thermo do
			i = i+1
			CreaThermometre(i)
		end
		i = 0
		while i ~= Nb_ThermRond do
			i = i+1
			CreaThermometreRond(i)
		end




		if Mode == "fondecran" then
			FondEcran_init()
		end
		if Mode == "fondinactif" then
			FondInactif_init()
		end
		
		collectgarbage()
		
	end			

	return ""
end



--initialisation paramètres
function init(cfg)
	
	local home = os.getenv("HOME")
	cfg = string.gsub(cfg, "~", home)
	cfg = string.gsub(cfg, "$HOME", home)
	imagecfg = cfg

	Nb_Thermo = 0
	Nb_ThermRond = 0
	local Thermo = false
	local ThermRond = false

	local file = assert(io.open(cfg, "rb") )

	local line = file:read()
	for line in file:lines() do
		local pos1 = string.find(line, '#')
		if pos1 ~= nil then
			line = string.sub(line, 1, pos1-1)
		end
		pos1 = string.find(line, '=')
		if string.find(line, 'Therm=') ~= nil then
			Rep_Therm = string.sub(line, pos1+1)
		elseif string.find(line, 'repfonts=') ~= nil then
			repfonts = string.sub(line, pos1+1)
		elseif string.find(line, 'ThermRond=') ~= nil then
			Rep_ThermRond = string.sub(line, pos1+1)
		elseif string.find(line, 'Rose=') ~= nil then
			Rep_Rose = string.sub(line, pos1+1)
		elseif string.find(line, 'palier1=') ~= nil then
			palier1 = string.sub(line, pos1+1)
		elseif string.find(line, 'palier2=') ~= nil then
			palier2 = string.sub(line, pos1+1)
		elseif string.find(line, 'palier3=') ~= nil then
			palier3 = string.sub(line, pos1+1)
		elseif string.find(line, 'palier4=') ~= nil then
			palier4 = string.sub(line, pos1+1)
		elseif string.find(line, 'palier1coulfont=') ~= nil then
			palier1coulfont = string.sub(line, pos1+1)
		elseif string.find(line, 'palier2coulfont=') ~= nil then
			palier2coulfont = string.sub(line, pos1+1)
		elseif string.find(line, 'palier3coulfont=') ~= nil then
			palier3coulfont = string.sub(line, pos1+1)
		elseif string.find(line, 'palier4coulfont=') ~= nil then
			palier4coulfont = string.sub(line, pos1+1)
		elseif string.find(line, 'Lune=') ~= nil then
			Rep_Lune = string.sub(line, pos1+1)
		elseif string.find(line, 'Barometre=') ~= nil then
			Rep_Barometre = string.sub(line, pos1+1)
		elseif string.find(line, 'repmeteo=') ~= nil then
			repmeteo = string.sub(line, pos1+1)
		elseif string.find(line, 'IconesRep=') ~= nil then
			IconesRep = string.sub(line, pos1+1)
		elseif string.find(line, 'Mode=') ~= nil then
			Mode = string.sub(line, pos1+1)
		elseif string.find(line, 'MiseEnPage=') ~= nil then
			mise_en_page = string.sub(line, pos1+1)
			mise_en_page = string.gsub(mise_en_page, "~", home)
			mise_en_page = string.gsub(mise_en_page, "$HOME", home)
			pos = string.find(mise_en_page, "creationmodules")
			fich_creationmodule =  string.sub(mise_en_page, pos)..".sh"
		end
		
		--debut thermomètre	mercure	
		if string.find(line, 'Thermometres=') ~= nil then
			Thermo = true
			Nb_Thermo = Nb_Thermo+1
			Thermometre[tonumber(Nb_Thermo)] = {}
		end
		
		if Thermo ~= false then
			if string.find(line, 'base=') ~= nil then
				Thermometre[Nb_Thermo].base = string.sub(line, pos1+1)
			elseif string.find(line, 'mercure=') ~= nil then
				Thermometre[Nb_Thermo].mercure = string.sub(line, pos1+1)
			elseif string.find(line, 'mercure_info=') ~= nil then
				local pos2 = string.find(line, '}')
				if pos2 ~= nil then
					Thermometre[Nb_Thermo].mercure_info = string.sub(line, pos1+1, pos2-1)
				else
					Thermometre[Nb_Thermo].mercure_info = string.sub(line, pos1+1)
				end
			elseif string.find(line, 'plot=') ~= nil then
				Thermometre[Nb_Thermo].plot = string.sub(line, pos1+1)
			elseif string.find(line, 'plot_info=') ~= nil then
				local pos2 = string.find(line, '}')
				Thermometre[Nb_Thermo].plot_info = string.sub(line, pos1+1, pos2-1)
			end
	
			pos1 = string.find(line, '}')
			if pos1 ~= nil then
				line = string.sub(line, pos1)
				if string.find(line, ',') == nil then
					Thermo = false
				else
					Nb_Thermo = Nb_Thermo+1
					Thermometre[Nb_Thermo] = {}
				end
			end
		end

		--fin thermomètre

		
	end
	io.close(file)

	
	local fichier_init = conky_parse( "${lua Meteo_fichier_init}" )
	meteocfg=fichier_init
	local file = assert(io.open(fichier_init, "rb") )
	local line = file:read()
	for line in file:lines() do
		local pos1 = string.find(line, '#')
		if pos1 ~= nil then
			line = string.sub(line, 1, pos1-1)
		end
		pos1 = string.find(line, '=')
		if string.find(line, 'repsauv=') ~= nil then
			repsauv = string.sub(line, pos1+1)
		elseif string.find(line, 'TempShell=') ~= nil then
			r = string.sub(line, pos1+1)
		elseif string.find(line, 'web=') ~= nil then
			cmd1 = string.sub(line, pos1+1)
		elseif string.find(line, 'periode=') ~= nil then
			jours = string.sub(line, pos1+1)
		elseif string.find(line, 'matinée=') ~= nil then
			matin = string.sub(line, pos1+1)
		elseif string.find(line, 'am=') ~= nil then
			apresmidi = string.sub(line, pos1+1)
		elseif string.find(line, 'soiree=') ~= nil then
			soiree = string.sub(line, pos1+1)
		elseif string.find(line, 'nuit=') ~= nil then
			nuit = string.sub(line, pos1+1)
		elseif string.find(line, 'Prev8heures=') ~= nil then
			huit = string.sub(line, pos1+1)
		elseif string.find(line, 'Therm=') ~= nil then
			Rep_Therm = string.sub(line, pos1+1)
		elseif string.find(line, 'Rose=') ~= nil then
			Rep_Rose = string.sub(line, pos1+1)
		elseif string.find(line, 'Palier=') ~= nil then
			Palier = tonumber(string.sub(line, pos1+1))
		elseif string.find(line, 'update=') ~= nil then
			delais = string.sub(line, pos1+1)
		end
	end
	io.close(file)	
	r = string.gsub(r, "~", home)
	r = string.gsub(r, "$HOME", home)
	repsauv = string.gsub(repsauv, "~", home)
	repsauv = string.gsub(repsauv, "$HOME", home)


--Création répertoire de travail
	l = cmd1:match("/(%d+)")
	if string.find(cmd1, 'forecast') ~= nil then
		pos1 = string.find(cmd1, '/weather')
		cmd = string.sub(cmd1, 0, pos1-1)
	else
		pos1 = string.find(cmd1, '/current')
		cmd = string.sub(cmd1, 0, pos1-1)
	end

	local bar, bar1
	local l1 = string.gsub(cmd, '/'..l, "" )
	local b = 1
	while bar1 == nil do
		b = b+1
		bar1 = string.find(l1, '/', -b)
	end
	l1 = string.sub(l1, bar1+1)
	Rep = r.."/"..l1.."/"..l

	MAJHold = "10"
	
	return ""
end

------------------------------------------------------------- Fond ecran --------------------------------------------------

function FondEcran_init()


if not existe(repsauv.."/fond-meteo.png") then
	boucle = boucle+1
end

if boucle ~= 0 then
	print("","Mode = "..Mode)
	-- sauvegarde fond ecran
	os.execute(repmeteo..'/scripts/fond-gestion.sh sauvegarde')
	-- creation des modules externes
	creation_module(mise_en_page)
	-- Maj du fond d'écran	
	os.execute(repmeteo..'/scripts/fond-gestion.sh integration ')

end
	boucle = boucle+1
end

function FondInactif_init()

	print("","Mode = "..Mode)
	-- creation des modules externes
	creation_module(mise_en_page)

end

function conky_extinction()
-- remise en place fond ecran-ori
os.execute(repmeteo..'/scripts/fond-gestion.sh restauration')	
end

function mise_en_forme(x)
	local pos = string.find(x, "{{")
	local Nb = 0
	local info, pos1
	while pos ~= nil do
		Nb = Nb+1
		if Nb == 1 then
			code = string.sub(x, 0, pos-1)
		else
			code = code..string.sub(x, pos1+2, pos-1)
		end
		pos1 = string.find(x, "}}", pos+2)
		info = string.sub(x, pos+2, pos1-1)
		code = code..Recup_info(info)
		pos = string.find(x, "{{", pos1+2)
	end
	if pos1 ~= nil then
		code = code..string.sub(x, pos1+2)
	else
		code = x
	end

	return code
end


function creation_module(creationmodules)
------------copie et recuperation du fichier  

	local file = io.open(creationmodules)
	local line = file:read()
	local file1 =  io.open(Rep.."/"..fich_creationmodule, "w+" )
	------------- mise en place fichier + entête 

	file1:write ("#!/bin/bash \n\n##########################################\ncheminref="..repmeteo.."\nsource "..imagecfg.." 2>/dev/null\nsource "..meteocfg.." 2>/dev/null\n")
	------------------------------------------------------------------------
		for line in file:lines() do
	---------------------------------------------------------
			file1:write (mise_en_forme(line), "\n")
	---------------------------------------------------------
		end
	------ fermeture et ecriture
	io.close(file1)
	io.close(file)
	------ execution du fichier bash
	os.execute('chmod +x '..Rep..'/'..fich_creationmodule..' && '..Rep..'/'..fich_creationmodule)
	
	
end
function Recup_info(x)
	local info, pos1, pos
	pos = string.find(x, " ")
	if pos ~= nil then
		info = string.sub(x, 0, pos-1)
		pos1 = string.find(x, " ", pos+1)
	else
		info = x
	end
	if pos ~= nil then
		if pos1 ~= nil then
			arg1 = string.sub(x, pos+1, pos1-1)
			pos = string.find(x, " ", pos1+1)
		else
			arg1 = string.sub(x, pos+1)
		end
		if pos1 ~= nil then
			if pos ~= nil then
				arg2 = string.sub(x, pos1+1, pos-1)
				pos1 = string.find(x, " ", pos+1)
			else
				arg2 = string.sub(x, pos1+1)
			end
			if pos ~= nil then
				if pos1 ~= nil then
					arg3 = string.sub(x, pos+1, pos1-1)
					pos = string.find(x, " ", pos1+1)
				else
					arg3 = string.sub(x, pos+1)
				end
				if pos1 ~= nil then
					if pos ~= nil then
						arg4 = string.sub(x, pos1+1, pos-1)
						pos1 = string.find(x, " ", pos+1)
					else
						arg4 = string.sub(x, pos1+1)
					end
					if pos ~= nil then
						if pos1 ~= nil then
							arg5 = string.sub(x, pos+1, pos1-1)
							pos = string.find(x, " ", pos1+1)
						else
							arg5 = string.sub(x, pos+1)
						end
						if pos1 ~= nil then
							if pos ~= nil then
								arg6 = string.sub(x, pos1+1, pos-1)
								pos1 = string.find(x, " ", pos+1)
							else
								arg6 = string.sub(x, pos1+1)
							end
							if pos ~= nil then
								if pos1 ~= nil then
									arg7 = string.sub(x, pos+1, pos1-1)
									pos = string.find(x, " ", pos1+1)
								else
									arg7 = string.sub(x, pos+1)
								end
								if pos1 ~= nil then
									if pos ~= nil then
										arg8 = string.sub(x, pos1+1, pos-1)
										pos1 = string.find(x, " ", pos+1)
									else
										arg8 = string.sub(x, pos1+1)
									end
									if pos ~= nil then
										if pos1 ~= nil then
											arg9 = string.sub(x, pos+1, pos1-1)
											pos = string.find(x, " ", pos1+1)
										else
											arg9 = string.sub(x, pos+1)
										end
										if pos1 ~= nil then
											if pos ~= nil then
												arg10 = string.sub(x, pos1+1, pos-1)
												pos1 = string.find(x, " ", pos+1)
											else
												arg10 = string.sub(x, pos1+1)
											end
											if pos ~= nil then
												if pos1 ~= nil then
													arg11 = string.sub(x, pos+1, pos1-1)
													pos = string.find(x, " ", pos1+1)
												else
													arg11 = string.sub(x, pos+1)
												end
											end
										end
									end
								end
							end
						end
					end
				end
			end
		end
	end
	
		
	if info == "Meteo_TempRes" then
		return conditioncourante.Tempr
	elseif info == "Meteo_TempAct" then
		return conditioncourante.Temp
	elseif info == "Meteo_CondMeteo" then
		return conditioncourante.Cond
	elseif info == "Meteo_CondMeteo1" then
		return conditioncourante.CondMeteo1
	elseif info == "Meteo_CondMeteo2" then
		return conditioncourante.CondMeteo2
	elseif info == "Meteo_CondMeteo1se" then
		return conditioncourante.CondMeteo1se
	elseif info == "Meteo_CondMeteo2se" then
		return conditioncourante.CondMeteo2se
	elseif info == "Meteo_VentDir" then
		return conditioncourante.VentDir
	elseif info == "Meteo_VentDirP" then
		return conditioncourante.VentPlein
	elseif info == "Meteo_VentForce" then
		return conditioncourante.VentForce
	elseif info == "Meteo_Humidite" then
		return conditioncourante.Humidite
	elseif info == "Meteo_Rose" then
		return conditioncourante.PointRosee
	elseif info == "Meteo_Pression" then
		return conditioncourante.Pression
	elseif info == "Meteo_Visibilite" then
		return conditioncourante.Visibilite
	elseif info == "Meteo_CouvNuage" then
		return conditioncourante.CouvNuage
	elseif info == "Meteo_Uv" then
		return conditioncourante.Uv
	elseif info == "Meteo_IconeM" then
		if os.date("%H%M", os.time()) <= InfoJour[1].CoucherSoleilH..InfoJour[1].CoucherSoleilM and os.date("%H%M", os.time()) >= InfoJour[1].LeverSoleilH..InfoJour[1].LeverSoleilM then
			return arg1.."/jour/"..conditioncourante.Icone..".png"
		else
			return arg1.."/nuit/"..conditioncourante.Icone..".png"
		end
	elseif info == "Meteo_IconeV" then
		return arg1.."/"..conditioncourante.VentIcone
	elseif info == "Meteo_Ville" then
		return conditioncourante.Ville
	elseif info == "Meteo_latitude" then
		return conditioncourante.latitude
	elseif info == "Meteo_longitude" then
		return conditioncourante.longitude
	elseif info == "Image_version" then
		return Version
	--prévision journée
	elseif info == "Meteo_Jour_CondMeteo" then
		return conditionJour[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_Jour_CondMeteo1" then
		return conditionJour[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_Jour_CondMeteo2" then
		return conditionJour[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_Jour_CondMeteo1se" then
		return conditionJour[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_Jour_CondMeteo2se" then
		return conditionJour[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_Jour_Temp" then
		return conditionJour[tonumber(arg1)].Temp
	elseif info == "Meteo_Jour_TempRes" then
		return conditionJour[tonumber(arg1)].TempRes
	elseif info == "Meteo_Jour_ProbPrec" then
		return conditionJour[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_Jour_VentDir" then
		return conditionJour[tonumber(arg1)].VentDir
	elseif info == "Meteo_Jour_VentDirP" then
		return conditionJour[tonumber(arg1)].VentP
	elseif info == "Meteo_Jour_VentForce" then
		return conditionJour[tonumber(arg1)].VentForce
	elseif info == "Meteo_Jour_VentRafales" then
		return conditionJour[tonumber(arg1)].VentRafales
	elseif info == "Meteo_Jour_Uv" then
		return conditionJour[tonumber(arg1)].Uv
	elseif info == "Meteo_Jour_ProbOrage" then
		return conditionJour[tonumber(arg1)].ProbOrage
	elseif info == "Meteo_Jour_NivPrec" then
		return conditionJour[tonumber(arg1)].NivPrec
	elseif info == "Meteo_Jour_QPluie" then
		return conditionJour[tonumber(arg1)].QPluie
	elseif info == "Meteo_Jour_QNeige" then
		return conditionJour[tonumber(arg1)].QNeige
	elseif info == "Meteo_Jour_EVerglas" then
		return conditionJour[tonumber(arg1)].EVerglas
	elseif info == "Meteo_Jour_IconeM" then
		return arg1.."/jour/"..conditionJour[tonumber(arg5)].Icone..".png"
	elseif info == "Meteo_Jour_IconeV" then
		return arg1.."/"..conditionJour[tonumber(arg5)].VentIcone
	elseif info == "Meteo_Jour_IconeR" then
		return arg1.."/"..conditionJour[tonumber(arg5)].RafalesIcone
	--prévision Nuit
	elseif info == "Meteo_Nuit_CondMeteo" then
		return conditionNuit[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_Nuit_CondMeteo1" then
		return conditionNuit[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_Nuit_CondMeteo2" then
		return conditionNuit[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_Nuit_CondMeteo1se" then
		return conditionNuit[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_Nuit_CondMeteo2se" then
		return conditionNuit[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_Nuit_Temp" then
		return conditionNuit[tonumber(arg1)].Temp
	elseif info == "Meteo_Nuit_TempRes" then
		return conditionNuit[tonumber(arg1)].TempRes
	elseif info == "Meteo_Nuit_ProbPrec" then
		return conditionNuit[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_Nuit_VentDir" then
		return conditionNuit[tonumber(arg1)].VentDir
	elseif info == "Meteo_Nuit_VentDirP" then
		return conditionNuit[tonumber(arg1)].VentP
	elseif info == "Meteo_Nuit_VentForce" then
		return conditionNuit[tonumber(arg1)].VentForce
	elseif info == "Meteo_Nuit_VentRafales" then
		return conditionNuit[tonumber(arg1)].VentRafales
	elseif info == "Meteo_Nuit_Uv" then
		return conditionNuit[tonumber(arg1)].Uv
	elseif info == "Meteo_Nuit_ProbOrage" then
		return conditionNuit[tonumber(arg1)].ProbOrage
	elseif info == "Meteo_Nuit_NivPrec" then
		return conditionNuit[tonumber(arg1)].NivPrec
	elseif info == "Meteo_Nuit_QPluie" then
		return conditionNuit[tonumber(arg1)].QPluie
	elseif info == "Meteo_Nuit_QNeige" then
		return conditionNuit[tonumber(arg1)].QNeige
	elseif info == "Meteo_Nuit_EVerglas" then
		return conditionNuit[tonumber(arg1)].EVerglas
	elseif info == "Meteo_Nuit_IconeM" then
		return arg1.."/nuit/"..conditionNuit[tonumber(arg5)].Icone..".png"
	elseif info == "Meteo_Nuit_IconeV" then
		return arg1.."/"..conditionNuit[tonumber(arg5)].VentIcone
	elseif info == "Meteo_Nuit_IconeR" then
		return arg1.."/"..conditionNuit[tonumber(arg5)].RafalesIcone
	----Prévision quart de journée
	--Matin
	elseif info == "Meteo_Matin_CondMeteo " then
		return conditionMatin[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_Matin_CondMeteo1" then
		return conditionMatin[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_Matin_CondMeteo2" then
		return conditionMatin[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_Matin_CondMeteo1se" then
		return conditionMatin[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_Matin_CondMeteo2se" then
		return conditionMatin[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_Matin_TempMax" then
		return conditionMatin[tonumber(arg1)].TempMax
	elseif info == "Meteo_Matin_TempMin" then
		return conditionMatin[tonumber(arg1)].TempMin
	elseif info == "Meteo_Matin_TempMaxRes" then
		return conditionMatin[tonumber(arg1)].TempMaxR
	elseif info == "Meteo_Matin_TempMinRes" then
		return conditionMatin[tonumber(arg1)].TempMinR
	elseif info == "Meteo_Matin_ProbPrec" then
		return conditionMatin[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_Matin_VentDir" then
		return conditionMatin[tonumber(arg1)].VentDir
	elseif info == "Meteo_Matin_VentP" then
		return conditionMatin[tonumber(arg1)].VentP
	elseif info == "Meteo_Matin_VentForce" then
		return conditionMatin[tonumber(arg1)].VentForce
	elseif info == "Meteo_Matin_QPluie" then
		return conditionMatin[tonumber(arg1)].QPluie
	elseif info == "Meteo_Matin_QNeige" then
		return conditionMatin[tonumber(arg1)].QNeige
	elseif info == "Meteo_Matin_Humidite" then
		return conditionMatin[tonumber(arg1)].Humidite
	elseif info == "Meteo_Matin_CouvNuage" then
		return conditionMatin[tonumber(arg1)].CouvNuage
	elseif info == "Meteo_Matin_Rose" then
		return conditionMatin[tonumber(arg1)].PointRosee
	elseif info == "Meteo_Matin_Visibilite" then
		return conditionMatin[tonumber(arg1)].Visibilite
	elseif info == "Meteo_Matin_IconeM" then
		return arg1.."/jour/"..conditionMatin[tonumber(arg5)].Icone..".png"
	elseif info == "Meteo_Matin_IconeV" then
		return arg1.."/"..conditionMatin[tonumber(arg5)].VentIcone
	--Après midi
	elseif info == "Meteo_AM_CondMeteo " then
		return conditionAM[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_AM_CondMeteo1" then
		return conditionAM[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_AM_CondMeteo2" then
		return conditionAM[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_AM_CondMeteo1se" then
		return conditionAM[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_AM_CondMeteo2se" then
		return conditionAM[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_AM_TempMax" then
		return conditionAM[tonumber(arg1)].TempMax
	elseif info == "Meteo_AM_TempMin" then
		return conditionAM[tonumber(arg1)].TempMin
	elseif info == "Meteo_AM_TempMaxRes" then
		return conditionAM[tonumber(arg1)].TempMaxR
	elseif info == "Meteo_AM_TempMinRes" then
		return conditionAM[tonumber(arg1)].TempMinR
	elseif info == "Meteo_AM_ProbPrec" then
		return conditionAM[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_AM_VentDir" then
		return conditionAM[tonumber(arg1)].VentDir
	elseif info == "Meteo_AM_VentP" then
		return conditionAM[tonumber(arg1)].VentP
	elseif info == "Meteo_AM_VentForce" then
		return conditionAM[tonumber(arg1)].VentForce
	elseif info == "Meteo_AM_QPluie" then
		return conditionAM[tonumber(arg1)].QPluie
	elseif info == "Meteo_AM_QNeige" then
		return conditionAM[tonumber(arg1)].QNeige
	elseif info == "Meteo_AM_Humidite" then
		return conditionAM[tonumber(arg1)].Humidite
	elseif info == "Meteo_AM_CouvNuage" then
		return conditionAM[tonumber(arg1)].CouvNuage
	elseif info == "Meteo_AM_Rose" then
		return conditionAM[tonumber(arg1)].PointRosee
	elseif info == "Meteo_AM_Visibilite" then
		return conditionAM[tonumber(arg1)].Visibilite
	elseif info == "Meteo_AM_IconeM" then
		return arg1.."/jour/"..conditionAM[tonumber(arg5)].Icone..".png"
	elseif info == "Meteo_AM_IconeV" then
		return arg1.."/"..conditionAM[tonumber(arg5)].VentIcone
	--Soirée
	elseif info == "Meteo_Soiree_CondMeteo " then
		return conditionSoiree[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_Soiree_CondMeteo1" then
		return conditionSoiree[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_Soiree_CondMeteo2" then
		return conditionSoiree[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_Soiree_CondMeteo1se" then
		return conditionSoiree[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_Soiree_CondMeteo2se" then
		return conditionSoiree[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_Soiree_TempMax" then
		return conditionSoiree[tonumber(arg1)].TempMax
	elseif info == "Meteo_Soiree_TempMin" then
		return conditionSoiree[tonumber(arg1)].TempMin
	elseif info == "Meteo_Soiree_TempMaxRes" then
		return conditionSoiree[tonumber(arg1)].TempMaxR
	elseif info == "Meteo_Soiree_TempMinRes" then
		return conditionSoiree[tonumber(arg1)].TempMinR
	elseif info == "Meteo_Soiree_ProbPrec" then
		return conditionSoiree[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_Soiree_VentDir" then
		return conditionSoiree[tonumber(arg1)].VentDir
	elseif info == "Meteo_Soiree_VentP" then
		return conditionSoiree[tonumber(arg1)].VentP
	elseif info == "Meteo_Soiree_VentForce" then
		return conditionSoiree[tonumber(arg1)].VentForce
	elseif info == "Meteo_Soiree_QPluie" then
		return conditionSoiree[tonumber(arg1)].QPluie
	elseif info == "Meteo_Soiree_QNeige" then
		return conditionSoiree[tonumber(arg1)].QNeige
	elseif info == "Meteo_Soiree_Humidite" then
		return conditionSoiree[tonumber(arg1)].Humidite
	elseif info == "Meteo_Soiree_CouvNuage" then
		return conditionSoiree[tonumber(arg1)].CouvNuage
	elseif info == "Meteo_Soiree_Rose" then
		return conditionSoiree[tonumber(arg1)].PointRosee
	elseif info == "Meteo_Soiree_Visibilite" then
		return conditionSoiree[tonumber(arg1)].Visibilite
	elseif info == "Meteo_Soiree_IconeM" then
		return arg1.."/nuit/"..conditionSoiree[tonumber(arg5)].Icone..".png"
	elseif info == "Meteo_Soiree_IconeV" then
		return arg1.."/"..conditionSoiree[tonumber(arg5)].VentIcone
	--nuit
	elseif info == "Meteo_Noct_CondMeteo " then
		return conditionNoct[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_Noct_CondMeteo1" then
		return conditionNoct[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_Noct_CondMeteo2" then
		return conditionNoct[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_Noct_CondMeteo1se" then
		return conditionNoct[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_Noct_CondMeteo2se" then
		return conditionNoct[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_Noct_TempMax" then
		return conditionNoct[tonumber(arg1)].TempMax
	elseif info == "Meteo_Noct_TempMin" then
		return conditionNoct[tonumber(arg1)].TempMin
	elseif info == "Meteo_Noct_TempMaxRes" then
		return conditionNoct[tonumber(arg1)].TempMaxR
	elseif info == "Meteo_Noct_TempMinRes" then
		return conditionNoct[tonumber(arg1)].TempMinR
	elseif info == "Meteo_Noct_ProbPrec" then
		return conditionNoct[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_Noct_VentDir" then
		return conditionNoct[tonumber(arg1)].VentDir
	elseif info == "Meteo_Noct_VentP" then
		return conditionNoct[tonumber(arg1)].VentP
	elseif info == "Meteo_Noct_VentForce" then
		return conditionNoct[tonumber(arg1)].VentForce
	elseif info == "Meteo_Noct_QPluie" then
		return conditionNoct[tonumber(arg1)].QPluie
	elseif info == "Meteo_Noct_QNeige" then
		return conditionNoct[tonumber(arg1)].QNeige
	elseif info == "Meteo_Noct_Humidite" then
		return conditionNoct[tonumber(arg1)].Humidite
	elseif info == "Meteo_Noct_CouvNuage" then
		return conditionNoct[tonumber(arg1)].CouvNuage
	elseif info == "Meteo_Noct_Rose" then
		return conditionNoct[tonumber(arg1)].PointRosee
	elseif info == "Meteo_Noct_Visibilite" then
		return conditionNoct[tonumber(arg1)].Visibilite
	elseif info == "Meteo_Noct_IconeM" then
		return arg1.."/nuit/"..conditionNoct[tonumber(arg5)].Icone..".png"
	elseif info == "Meteo_Noct_IconeV" then
		return arg1.."/"..conditionNoct[tonumber(arg5)].VentIcone
	--huitHeures
	elseif info == "Meteo_huitHeures_CondMeteo " then
		return huitHeures[tonumber(arg1)].CondMeteo
	elseif info == "Meteo_huitHeures_CondMeteo1" then
		return huitHeures[tonumber(arg1)].CondMeteo1
	elseif info == "Meteo_huitHeures_CondMeteo2" then
		return huitHeures[tonumber(arg1)].CondMeteo2
	elseif info == "Meteo_huitHeures_CondMeteo1se" then
		return huitHeures[tonumber(arg1)].CondMeteo1se
	elseif info == "Meteo_huitHeures_CondMeteo2se" then
		return huitHeures[tonumber(arg1)].CondMeteo2se
	elseif info == "Meteo_huitHeures_TempMax" then
		return huitHeures[tonumber(arg1)].TempMax
	elseif info == "Meteo_huitHeures_TempMin" then
		return huitHeures[tonumber(arg1)].TempMin
	elseif info == "Meteo_huitHeures_TempMaxRes" then
		return huitHeures[tonumber(arg1)].TempMaxR
	elseif info == "Meteo_huitHeures_TempMinRes" then
		return huitHeures[tonumber(arg1)].TempMinR
	elseif info == "Meteo_huitHeures_ProbPrec" then
		return huitHeures[tonumber(arg1)].ProbPrec
	elseif info == "Meteo_huitHeures_VentDir" then
		return huitHeures[tonumber(arg1)].VentDir
	elseif info == "Meteo_huitHeures_VentP" then
		return huitHeures[tonumber(arg1)].VentP
	elseif info == "Meteo_huitHeures_VentForce" then
		return huitHeures[tonumber(arg1)].VentForce
	elseif info == "Meteo_huitHeures_QPluie" then
		return huitHeures[tonumber(arg1)].QPluie
	elseif info == "Meteo_huitHeures_QNeige" then
		return huitHeures[tonumber(arg1)].QNeige
	elseif info == "Meteo_huitHeures_Humidite" then
		return huitHeures[tonumber(arg1)].Humidite
	elseif info == "Meteo_huitHeures_CouvNuage" then
		return huitHeures[tonumber(arg1)].CouvNuage
	elseif info == "Meteo_huitHeures_Rose" then
		return huitHeures[tonumber(arg1)].PointRosee
	elseif info == "Meteo_huitHeures_Visibilite" then
		return huitHeures[tonumber(arg1)].Visibilite
	elseif info == "Meteo_huitHeures_IconeV" then
		return arg1.."/"..huitHeures[tonumber(arg5)].VentIcone
	elseif info == "Meteo_huitHeures_IconeM" then
		if huitHeures[tonumber(arg5)].Heure <= InfoJour[1].CoucherSoleilH and huitHeures[tonumber(arg5)].Heure >= InfoJour[1].LeverSoleilH then
			return arg1.."/jour/"..huitHeures[tonumber(arg5)].Icone..".png"
		else
			return arg1.."/nuit/"..huitHeures[tonumber(arg5)].Icone..".png"
		end

	


	--lunaison
	elseif info == "Lune_ephemerides" then
		return ephemerides
	elseif info == "Lune_ephemerides1" then
		return ephemerides1
	elseif info == "Lune_ephemerides2" then
		return ephemerides2
	elseif info == "Lune_Visibilite" then
		return Visibilite
	elseif info == "Lune_Phases" then
		return Phases
	elseif info == "Lune_Phases1" then
		return Phases1
	elseif info == "Lune_Phases2" then
		return Phases2
	elseif info == "Lune_Noeudlunaire" then
		return Noeud_lunaire
	elseif info == "Lune_Apogee" then
		return Apogee
	elseif info == "Lune_Perigee" then
		return Perigee
	elseif info == "Lune_Distance" then
		return Distance
	elseif info == "Lune_Age" then
		return Age
	elseif info == "Lune_HLeverLune" then
		return Lever_LuneHeure
	elseif info == "Lune_MLeverLune" then
		return Lever_LuneMinute
	elseif info == "Lune_HCoucherLune" then
		return Coucher_LuneHeure
	elseif info == "Lune_MCoucherLune" then
		return Coucher_LuneMinute
	elseif info == "Lune_EclipsePartielle" then
		return Eclipse_partielle
	elseif info == "Lune_EclipseTotal" then
		return Eclipse_total
	elseif info == "Images_Barometre" then
		return conky_Images_Barometre(arg1, arg2, arg3, arg4)
	elseif info == "Images_Lunaison" then
		return conky_Images_Lunaison(arg1, arg2, arg3, arg4)
	elseif info == "Images_Thermo" then
		return conky_Images_Thermo(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_ThermoRond" then
		return conky_Images_ThermoRond(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9, arg10, arg11)
	elseif info == "Images_Rose" then
		return conky_Images_Rose(arg1, arg2, arg3, arg4)
	elseif info == "Images_Jour_Rose" then
		return conky_Images_Jour_Rose(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_Jour_RoseR" then
		return conky_Images_Jour_RoseR(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_Nuit_Rose" then
		return conky_Images_Nuit_Rose(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_Nuit_RoseR" then
		return conky_Images_Nuit_RoseR(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_Matin_Rose" then
		return conky_Images_Matin_Rose(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_AM_Rose" then
		return conky_Images_AM_Rose(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_Soiree_Rose" then
		return conky_Images_Soiree_Rose(arg1, arg2, arg3, arg4, arg5)
	elseif info == "Images_Noct_Rose" then
		return conky_Images_Noct_Rose(arg1, arg2, arg3, arg4, arg5)
	else
		return conky_parse( "${lua "..x.."}" )
	end
end

ca c'est fait je vais pouvoir m'attaquer a l'esthétique

Hors ligne

#1793 Le 16/01/2013, à 14:20

daniel38100

Re : [Conky] Alternative à weather.com (2)

@ragamatrix



ragamatrix a écrit :

Salut daniel38100;
Je trouve très interressant le fait que tu ai integrer les prévisions à 8heures dans le images_meteo_lua.
Pourrais-tu nous faire partager ton creationmodules pour inspiration ?
Comment as tu fais pour afficher tous ces calendriers ?

mon cretionmodules est ici avec les calendar sinon j'en ai un avec juste celuis du bas et j'y ai mis une carte de vigilance
ca donne ca  mais j'ai pas encore fini
1358343104.png

voila le cretionmodules et la carte vigilance

Dernière modification par daniel38100 (Le 16/01/2013, à 14:35)

Hors ligne

#1794 Le 16/01/2013, à 14:45

ragamatrix

Re : [Conky] Alternative à weather.com (2)

daniel38100 a écrit :

@ragamatrix



ragamatrix a écrit :

Salut daniel38100;
Je trouve très interressant le fait que tu ai integrer les prévisions à 8heures dans le images_meteo_lua.
Pourrais-tu nous faire partager ton creationmodules pour inspiration ?
Comment as tu fais pour afficher tous ces calendriers ?

mon cretionmodules est ici avec les calendar sinon j'en ai un avec juste celuis du bas et j'y ai mis une carte de vigilance
ca donne ca  mais j'ai pas encore fini
http://pix.toile-libre.org/upload/img/1358343104.png

voila le cretionmodules et la carte vigilance

Merci !!
j'ai de quoi m'occuper pour ce soir... smile

Hors ligne

#1795 Le 16/01/2013, à 15:21

ragamatrix

Re : [Conky] Alternative à weather.com (2)

@daniel38100

Joli Travail !
J'aurais moi aussi plus de temps ce soir
Bravo !

Hors ligne

#1796 Le 16/01/2013, à 17:07

daniel38100

Re : [Conky] Alternative à weather.com (2)

ragamatrix a écrit :

@daniel38100

Joli Travail !
J'aurais moi aussi plus de temps ce soir
Bravo !

merci ragamatrix fait nous par de ce que tu as fait pour inspiration aussi

Hors ligne

#1797 Le 16/01/2013, à 17:56

daniel38100

Re : [Conky] Alternative à weather.com (2)

c'est quoi le V9000 en faite ?

j'ai jamais étudier la question (vaut mieux un qui sait que dix qui cherche. )

Dernière modification par daniel38100 (Le 16/01/2013, à 17:59)

Hors ligne

#1798 Le 16/01/2013, à 18:18

ragamatrix

Re : [Conky] Alternative à weather.com (2)

daniel38100 a écrit :

c'est quoi le V9000 en faite ?

j'ai jamais étudier la question (vaut mieux un qui sait que dix qui cherche. )

Le v9000 est un script lua écrit par "Mr Peachy" qui lui aussi affiche la météo mais d'une autre manière et organisé différemment.
Les données météo son récupérées avec curl (je crois) avec les données du site intellicast.
Ce script est en Anglais donc certaines choses sont à traduire...
Tu peux jeter un coup d'oeil sur ce forum pour avoir un aperçu:
conky_weather_v9000

Je ne parviens pas à faire tourner ton creationmodules ? Il y a beaucoup de codes peut-être que je m'y suis mal pris...:rolleyes:
mon erreur:

  Conky: desktop window (ae) is root window
Conky: window type - override
Conky: drawing to created window (0x2000001)
Conky: drawing to double buffer
    version = v4.9c
    web = [url]http://www.accuweather.com/fr/ch/horgen/316407/current-weather/316407[/url]
    Pévision Nb jours = 8
    Pévision Matin = oui
    Pévision Après Midi = oui
    Pévision Soirée = oui
    Pévision Nuit = oui
    Prévision sur 8 heures = oui
    Délais = 900
    Chemin de travail = /tmp
    Palier = 10
    Chemin de sauvegarde = /home/climatix/.conky/conky40/Meteo-Lua/sauvegardes/horgen
Condition courante Ok
Prévision 1 Ok
Prévision 2 Ok
Prévision 3 Ok
Prévision 4 Ok
Prévision 5 Ok
Prévision 6 Ok
Prévision 7 Ok
Prévision 8 Ok
Matin 1 Ok
Matin 2 Ok
Matin 3 Ok
Matin 4 Ok
Matin 5 Ok
Matin 6 Ok
Matin 7 Ok
Matin 8 Ok
Apres Midi 1 Ok
Apres Midi 2 Ok
Apres Midi 3 Ok
Apres Midi 4 Ok
Apres Midi 5 Ok
Apres Midi 6 Ok
Apres Midi 7 Ok
Apres Midi 8 Ok
Soiree 1 Ok
Soiree 2 Ok
Soiree 3 Ok
Soiree 4 Ok
Soiree 5 Ok
Soiree 6 Ok
Soiree 7 Ok
Soiree 8 Ok
Nuit 1 Ok
Nuit 2 Ok
Nuit 3 Ok
Nuit 4 Ok
Nuit 5 Ok
Nuit 6 Ok
Nuit 7 Ok
Nuit 8 Ok
Huit prochaines heures Ok
lunaison Ok
25 seconde(s)
    Mode = fondecran
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: ...ix/.conky/conky40/Meteo-Lua/scripts/images_meteo.lua:1325: attempt to index field '?' (a nil value)
/home/climatix/.conky/conky40/Meteo-Lua/scripts/fond-gestion.sh: /tmp/horgen/316407/creationmodules-fondecran.sh : /bin/bash : mauvais interpréteur: Fichier texte occupé 

Dernière modification par ragamatrix (Le 16/01/2013, à 18:19)

Hors ligne

#1799 Le 16/01/2013, à 18:33

daniel38100

Re : [Conky] Alternative à weather.com (2)

ragamatrix a écrit :
daniel38100 a écrit :

c'est quoi le V9000 en faite ?

j'ai jamais étudier la question (vaut mieux un qui sait que dix qui cherche. )

Le v9000 est un script lua écrit par "Mr Peachy" qui lui aussi affiche la météo mais d'une autre manière et organisé différemment.
Les données météo son récupérées avec curl (je crois) avec les données du site intellicast.
Ce script est en Anglais donc certaines choses sont à traduire...
Tu peux jeter un coup d'oeil sur ce forum pour avoir un aperçu:
conky_weather_v9000

Je ne parviens pas à faire tourner ton creationmodules ? Il y a beaucoup de codes peut-être que je m'y suis mal pris...:rolleyes:
mon erreur:

  Conky: desktop window (ae) is root window
Conky: window type - override
Conky: drawing to created window (0x2000001)
Conky: drawing to double buffer
    version = v4.9c
    web = [url]http://www.accuweather.com/fr/ch/horgen/316407/current-weather/316407[/url]
    Pévision Nb jours = 8
    Pévision Matin = oui
    Pévision Après Midi = oui
    Pévision Soirée = oui
    Pévision Nuit = oui
    Prévision sur 8 heures = oui
    Délais = 900
    Chemin de travail = /tmp
    Palier = 10
    Chemin de sauvegarde = /home/climatix/.conky/conky40/Meteo-Lua/sauvegardes/horgen
Condition courante Ok
Prévision 1 Ok
Prévision 2 Ok
Prévision 3 Ok
Prévision 4 Ok
Prévision 5 Ok
Prévision 6 Ok
Prévision 7 Ok
Prévision 8 Ok
Matin 1 Ok
Matin 2 Ok
Matin 3 Ok
Matin 4 Ok
Matin 5 Ok
Matin 6 Ok
Matin 7 Ok
Matin 8 Ok
Apres Midi 1 Ok
Apres Midi 2 Ok
Apres Midi 3 Ok
Apres Midi 4 Ok
Apres Midi 5 Ok
Apres Midi 6 Ok
Apres Midi 7 Ok
Apres Midi 8 Ok
Soiree 1 Ok
Soiree 2 Ok
Soiree 3 Ok
Soiree 4 Ok
Soiree 5 Ok
Soiree 6 Ok
Soiree 7 Ok
Soiree 8 Ok
Nuit 1 Ok
Nuit 2 Ok
Nuit 3 Ok
Nuit 4 Ok
Nuit 5 Ok
Nuit 6 Ok
Nuit 7 Ok
Nuit 8 Ok
Huit prochaines heures Ok
lunaison Ok
25 seconde(s)
    Mode = fondecran
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: .../climatix/.conky/conky40/Meteo-Lua/scripts/meteo.lua:1610: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour execution failed: ...ix/.conky/conky40/Meteo-Lua/scripts/images_meteo.lua:1325: attempt to index field '?' (a nil value)
/home/climatix/.conky/conky40/Meteo-Lua/scripts/fond-gestion.sh: /tmp/horgen/316407/creationmodules-fondecran.sh : /bin/bash : mauvais interpréteur: Fichier texte occupé 

il faut que tu modifie ton meteo.cfg

tu doit avoir
#Prévision sur n jour (de 1 à 15)
periode=8

faut que tu change en
#Prévision sur n jour (de 1 à 15)
periode=15

edit: wai c ca je vien de tester

Dernière modification par daniel38100 (Le 16/01/2013, à 18:34)

Hors ligne

#1800 Le 16/01/2013, à 18:52

ragamatrix

Re : [Conky] Alternative à weather.com (2)

je crois que j'ai un problème avec /tmp/horgen/316407/cartouches ou /tmp/horgen/316407.
Toutes les données apparaissent bien dans /cartouches, mais rien ne s'affiche à l'écran, je dois surement modifier un autre chemin pour que ça marche ?

Hors ligne