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.

#451 Le 30/04/2013, à 13:06

jjnux

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

Je confirme que les scripts de franz256 fonctionnent parfaitement avec  Cubuntu 13.04 (Ubuntu + Cinnamon 1.7.4-1).
Merci ! big_smile

Hors ligne

#452 Le 30/04/2013, à 13:21

franz256

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

Merci à toi Jjnux. Cela fait plaisir d'avoir été utile à quelqu'un.

Jdipsy,
J'ai vérifié et j'ai bien un paquet bs4 d'installé. Il s'agit de python-bs4 et non python3-bs4. Ton problème peut-il venir de ça ?


Ubuntu 13.04-64 gnome-shell 3.6.1.3

Hors ligne

#453 Le 30/04/2013, à 13:55

jpdipsy

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

franz256 a écrit :

Merci à toi Jjnux. Cela fait plaisir d'avoir été utile à quelqu'un.

Jdipsy,
J'ai vérifié et j'ai bien un paquet bs4 d'installé. Il s'agit de python-bs4 et non python3-bs4. Ton problème peut-il venir de ça ?

J'ai essayé avec python-bs4 et sans  python3-bs4 même combat le fait de lancer sour python 2.7 comme tu le fait ne mène nul part chez moi alors comme avec python 3 on à une amélioration j'ai résolu le problème simplement:

ajout dans start-recmeteo.sh d'une vérification de recmeteo.sh en tâche de fond et relance lorsqu'il plante via cron

crontab

USER=votre_nom_utilisateur
* * * * * export DISPLAY=:0;/home/votre_nom_utilisateur/Accuweather/start-recmeteo.sh defaut.cfg status

comme çà pas besoin de modifier recmeteo
J'ai mis mon pack à jour pour ceux que çà intéresse avec les explications
Perso je préfère  rester comme çà en attendant une solution plus "a des couettes" lol
cette 13.04 me gave déjà bien avec les conky qui disparaissent au clic sur le fond ,nouveau qui ne gère pas encore les ventilos (il semblerai que dans le kernel 3.9 il y ai une solution) , et la fermeture systématique  de l'éditeur d'un script ouvert dans Files lorsque le script est lancer dans un terminal et je ne parle pas des plantages au lancement de temps en temps.

Hors ligne

#454 Le 30/04/2013, à 15:03

ragamatrix

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

@jpdipsy
Salut !
Bon je vois que je ne suis pas le seul à galérer... Je refais surface avec une debian crunchbang après avoir "testé" et "crashé" avec vsido et 13.04 voyager... Bin je crois avoir trouvé la distro correspondant à ma vieille machine; maintenant au boulot pour retrouver les conkys etc...
Je trouvais très pratique le conky control sous voyager, j'ai sauvegardé ces scripts.Pensez vous qu'il est possibble de re-parametrer cette fonction sous crunchbang (debian+openbox) ?

Hors ligne

#455 Le 30/04/2013, à 15:32

jpdipsy

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

ragamatrix a écrit :

@jpdipsy
Salut !
Bon je vois que je ne suis pas le seul à galérer... Je refais surface avec une debian crunchbang après avoir "testé" et "crashé" avec vsido et 13.04 voyager... Bin je crois avoir trouvé la distro correspondant à ma vieille machine; maintenant au boulot pour retrouver les conkys etc...
Je trouvais très pratique le conky control sous voyager, j'ai sauvegardé ces scripts.Pensez vous qu'il est possibble de re-parametrer cette fonction sous crunchbang (debian+openbox) ?

Comme çà fait plaisir d'avoir de tes nouvelles smile

Je pense qu'il ne devrait pas y avoir de problème @Didier dans son infini  sagesse avait "pondu" quelque chose de simple à la base.
Je crois qu'il y a un topic dédié conky control
A+

Hors ligne

#456 Le 30/04/2013, à 16:14

ragamatrix

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

Merci jpdpsy !
ça au moins ça fonctionne nickel chrome... Je me demande bien pourquoi. Merci Didier-T. wink
j'essaie d'intégrer des thermomètres qui changent de couleurs ecrits en lua dans un script meteo, mr peachy que je remercie mais que je ne comprend pas sur le forum...
thermo
#post 5188
pour celui-ci c'est bon j' arrive à l'intégrer et à l'afficher.
EDIT: C'est bon il fallait juste ajouter un "tonumber" dans chaque instances; reste plus que la mise en place et ça devrait rouler. Je vous montre ça bientôt smile ...
Je voudrais maintenant en afficher pour chaque jour le mini et maxi; j'ai suivi cette procédure :

val=high_temp[1]
tcol=get_color({val,{0,0x00ffff},{10,0x00ff00},{20,0xffff00},{30,0xff7f00},{40,0xff0000}})
thermometer ({x=100.5,y=300,numbers=0,lines=0,f="sans",fs=12,label=weather_location,scale=1,units="C",tcol=tcol,val=val})

val=low_temp[1]
tcol=get_color({val,{0,0x00ffff},{10,0x00ff00},{20,0xffff00},{30,0xff7f00},{40,0xff0000}})
thermometer ({x=200.5,y=300,numbers=0,lines=0,f="sans",fs=12,label=weather_location,scale=1,units="C",tcol=tcol,val=val})

val=high_temp[2]
tcol=get_color({val,{0,0x00ffff},{10,0x00ff00},{20,0xffff00},{30,0xff7f00},{40,0xff0000}})
thermometer ({x=300.5,y=300,numbers=0,lines=0,f="sans",fs=12,label=weather_location,scale=1,units="C",tcol=tcol,val=val})

val=low_temp[2]
tcol=get_color({val,{0,0x00ffff},{10,0x00ff00},{20,0xffff00},{30,0xff7f00},{40,0xff0000}})
thermometer ({x=400,y=300,numbers=0,lines=0,f="sans",fs=12,label=weather_location,scale=1,units="C",tcol=tcol,val=val})

etc  

mais j'ai des erreurs et les thermos ne s'affichent pas ?
Qu'en pensez-vous c'est dingue nan ?? lol
Si vous m'avez compris bravo ! Fallait bien que je m'y remette un peu A+

Dernière modification par ragamatrix (Le 01/05/2013, à 11:17)

Hors ligne

#457 Le 01/05/2013, à 19:59

Didier-T

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

Bonsoir a tous,
comme vous le savez, je suis actuellement en vacance, du coup, je me sert de la connexion internet de mon smartphone pour surfer sur le web, et continuer a suivre le forum. autant vous dire tout de suite que cette connexion est une vrai galère (discussion irc impossible car pas suffisamment stable)
J'ai donc été victime de bug de recmeteo.py (donc python 3), qui sont a présent réglé.
voici le script modifié, j'aimerais que vous le testiez, pour voir si sa améliore les choses sous Ubuntu.

recmeto.py

#! /usr/bin/python3
# -*- coding: utf-8 -*-
# Par Didier-T Forum Ubuntu.fr
# Ajout notification par jpdipsy Forum Ubuntu.fr
# Ajout notification via DBus par ti_tux Forum Ubuntu.fr
# Ajout création repsauv si inexistant par jpdipsy Forum Ubuntu.fr

from socket import timeout
from urllib.request import Request, urlopen, URLError
from os import path, makedirs, system
from time import time, sleep, strftime, localtime
from re import search, compile, findall
from sys import argv
from gc import collect, get_objects
from bs4 import BeautifulSoup
from subprocess import Popen

Version='1.25'

homedir = path.expanduser('~')

#### initialisation des variables
adressWeb="http://www.accuweather.com/fr/fr/belfort/133341/daily-weather-forecast/133341"
repsauv= "~/essais"
huitHeures="oui"
nbFoisHuit=1
matin="non"
apresmidi="oui"
soiree="non"
nuit="oui"
nbJour=5
interval=2
notifi="non"
externe = None
Id = "sans"

for a in argv:
    if search("adressWeb=", a) is not None:
        adressWeb=compile("adressWeb=(.*)").search(a).group(1)
    if search("repsauv=", a) is not None:
        repsauv=compile("repsauv=(.*)").search(a).group(1)
    if search("huitHeures=", a) is not None:
        huitHeures=compile("huitHeures=(.*)").search(a).group(1)
    if search("nbJour=", a) is not None:
        nbJour=compile("nbJour=(.*)").search(a).group(1)
    if search("interval=", a) is not None:
        interval=compile("interval=(.*)").search(a).group(1)
    if search("notify=", a) is not None:
        notifi=compile("notify=(.*)").search(a).group(1)
    if search("matin=", a) is not None:
        matin=compile("matin=(.*)").search(a).group(1)
    if search("apresmidi=", a) is not None:
        apresmidi=compile("apresmidi=(.*)").search(a).group(1)
    if search("soiree=", a) is not None:
        soiree=compile("soiree=(.*)").search(a).group(1)
    if search("nuit=", a) is not None:
        nuit=compile("nuit=(.*)").search(a).group(1)
    if search("externe=", a) is not None:
        externe=compile("externe=(.*)").search(a).group(1)
    if search("nbFoisHuit=", a) is not None:
        nbFoisHuit=compile("nbFoisHuit=(.*)").search(a).group(1)
    if search("id=", a) is not None:
        Id=compile("id=(.*)").search(a).group(1)

nbJour=int(nbJour)
interval=int(interval)
repsauv=repsauv.replace("~", homedir)
notifi=str.lower(notifi)
huitHeures=str.lower(huitHeures)
nbFoisHuit=int(nbFoisHuit)


#### fin initialisation des variables

#### Fonction de traitement des fichiers
def traitement(adress, fichier, repsauv):
#    fiche = open(fichier, "w")
    #pour debug
    current_balise=None
    x=1
    user_agent = 'Mozilla/5.0 (X11; Linux x86_64)'
    headers = { 'User-Agent' : user_agent }
    while current_balise is None:
        response = None
        while response is None:
            try:
                html_page = urlopen(adress, timeout=10)
            except (URLError) as error:
                print("HTML ", error)
            except timeout:
                print("erreur timeout acces HTML")
            else:
                try:
                    currentCond=html_page.read()
                except (URLError) as error:
                    print("Lecture page ", error)
                except timeout:
                    print("erreur timeout lecture page")
                else:
                    response = "ok"
        #currentCond=html_page.read()
        soup = BeautifulSoup(currentCond)
        #si autres que huit heures
        table=soup.find_all('table')
        current_balise=soup.find(id="details")
        if current_balise is None:
            sleep(1)
            x=x+1
            print("problème de récupération de donées\n essais n°"+str(x)+"\npage : "+adress)
#    print(current_balise.prettify()+"\n")
    information="\n"
    if search("huitHeures", fichier) is None:
        # recherche vent
        divs=current_balise.select("[class~=wind-box-lg]")
        if len(divs) == 0:
            divs=current_balise.select("[class~=wind-box-sm]")
        i=0
        for div in divs:
            i=i+1
            ventd=compile("var d = '(.*)';").search(str(div)).group(1).replace("W", "O")
            ventf=compile("var s = '(.*)';").search(str(div)).group(1)
            information=information+"direction"+str(i)+": "+ventd+"\n"
            information=information+"vitesse"+str(i)+": "+ventf+"\n"
        #info dans l'image
        inf=current_balise.select("[class~=info]")
        icone=current_balise.select("[class~=icon]")
        i=0
        #recherche icone
        for ic in icone:
            i=i+1
            information=information+"icone"+str(i)+": "+str(ic).replace('<div class="icon i-', '').replace('"></div>', '')+"\n"
        i=0
        #récupération date + historique
        if search("Jour", fichier) is not None or search("CC", fichier) is not None:
            histo=soup.find(id="feature-history")
            #récupération date
            date=histo.find_all('th')
            jour=compile("(.*)/(.*)/(.*)").search(date[4].get_text())
            information=information+"jour: "+jour.group(1)+"\n"
            information=information+"mois: "+jour.group(2)+"\n"
            information=information+"année: "+str(int(jour.group(3))+1)+"\n"
            #récupération historique
            hi=histo.select("[class~=hi]")
            for v in hi:
                hivalue=v.get_text().split("\n")
            information=information+"maxjour: "+hivalue[2]+"\n"
            information=information+"maxnormal: "+hivalue[3]+"\n"
            information=information+"maxrecord: "+hivalue[4]+"\n"
            information=information+"max1ans: "+hivalue[5]+"\n"
            lo=histo.select("[class~=last]")
            for v in lo:
                lovalue=v.get_text().split("\n")
            information=information+"minjour: "+lovalue[2]+"\n"
            information=information+"minnormal: "+lovalue[3]+"\n"
            information=information+"minrecord: "+lovalue[4]+"\n"
            information=information+"min1ans: "+lovalue[5]+"\n"
            #info dans l'image
            if search("Jour", fichier) is not None:
                infs=inf[0].get_text().split("\n")
                information=information+"Tempjour: "+findall('-?\d+', infs[0])[0]+"\n"
                information=information+"RealFeeljour: "+findall('-?\d+', infs[1])[0]+"\n"
                information=information+"Précipitationsjour: "+findall('-?\d+', infs[2])[0]+"\n"
                infs=inf[1].get_text().split("\n")
                information=information+"Tempnuit: "+findall('-?\d+', infs[0])[0]+"\n"
                information=information+"RealFeelnuit: "+findall('-?\d+', infs[1])[0]+"\n"
                information=information+"Précipitationsnuit: "+findall('-?\d+', infs[2])[0]+"\n"
                lever_coucher=soup.select("[class~=time-period]")
                i=0
                for p in lever_coucher:
                    spans=p.find_all('span')
                    i=i+1
                    x=0
                    for span in spans:
                        if i == 1:
                            span_nom="Soleil "
                        else:
                            span_nom="Lune "
                        if search('start', str(span)) is not None:
                            information=information+span_nom+"lever: "+span.get_text()+"\n"
                        if search('time', str(span)) is not None:
                            information=information+span_nom+"durée: "+span.get_text()+"\n"
                        if search('finish', str(span)) is not None:
                            information=information+span_nom+"coucher: "+span.get_text()+"\n"


            p=current_balise.find_all('p')
            i=0
            x=0
            for pv in p:
                i=i+1
                if i==5 or i==10:
                    x=x+1
                    information=information+"cond"+str(x)+": "+pv.get_text()+"\n"


        #localisation si condition courante
        if search("CC", fichier) is not None:
            ville=soup.select("[class~=current-city]")[0].get_text().split(",")[0]
            longi=compile("lon: '(.*)',").search(str(soup)).group(1)
            lat=compile("lat: '(.*)',").search(str(soup)).group(1)
            information=information+"ville: "+ville+"\n"
            information=information+"lat: "+lat+"\n"
            information=information+"long: "+longi+"\n"
            #info alerte
            alerte=soup.select("[class~=forecast-status]")
            if str(alerte) != "[]":
                p=alerte[0].find_all('p')
                a=p[0].find_all('a')
                clic=a[0].get_text()
                information=information+"alerte: "+p[0].get_text().replace(clic, "").replace("\n","").replace("\r", "").replace(chr(160), "").rstrip().lstrip()+"\n"
            else:
                information=information+"alerte: RAS\n"
            #info dans l'image
            inf=inf[0].get_text()
            cond=inf[:inf.find(findall('-?\d+', inf)[0])]
            inf=inf.replace(cond, "")
            infs=inf.split(" ")
            information=information+"cond:"+cond+"\n"
            information=information+"Temp: "+infs[0]+"\n"
            information=information+"RealFeel: "+infs[2]+"\n"

        if search("Matin", fichier) is not None or search("AM", fichier) is not None or search("Soiree", fichier) is not None or search("Nuit", fichier) is not None:
            infs=inf[0].get_text().split("\n")
            i=0
            infsc=["","","",""]
            for inf in infs:
                if inf!="":
                    infsc[i]=inf
                    i=i+1
            information=information+"cond:"+infsc[0]+"\n"
            information=information+"max: "+infsc[1]+"\n"
            information=information+"min: "+infsc[2].replace("Mn ", "")+"\n"
            information=information+"RealFeelmax: "+findall('-?\d+', infsc[3])[0]+"\n"
            information=information+"RealFeelmin: "+findall('-?\d+', infsc[3])[1]+"\n"
            
            #info conditions générales
            cc=current_balise.find_all('li')
            for inf in cc:
                inf=inf.get_text()
                inf=inf.replace(compile('^ *').search(inf).group(0), "").replace("\n", "")
                if search(":", inf) is not None:
                    information=information+inf+"\n"
        elif search("Jour", fichier) is not None:
            i=0
            cc=current_balise.find_all('li')
            for inf in cc:
                inf=inf.get_text()
                inf=inf.lstrip().replace("\n", "").replace(" \r", "")
                if search(": ", inf) is not None:
                    i=i+1
                    if i <= 7:
                        inf=inf.replace(":", " jour:")
                    else:
                        inf=inf.replace(":", " nuit:")
                    information=information+inf+"\n"
        else:
            cc=current_balise.find_all('li')
            for inf in cc:
                inf=inf.get_text()
                inf=inf.replace(compile('^ *').search(inf).group(0), "").replace("\n", "")
                if search(":", inf) is not None:
                    information=information+inf+"\n"
            information=information+str(int(time()))+"\n"
    else:
        #recherche icones huit heures
        rows = table[0].findAll('tr')
        x=0
        for tr in rows:
            cols = tr.findAll('td')
            texte_tr=tr.text.split("\n")[1].replace("\n", "")
            i=0
            for td in cols:
                i=i+1
#                td=td.replace("&nbsp;", "")
                texte_bu = td.text.replace("\n", "").replace(chr(160), "")
                if texte_bu != "" :
                    if texte_tr == " " and x < len(cols):
                        information=information+"Heure"+str(i)+": "+texte_bu+"\n"
                        x=x+1
                    elif texte_tr != " ":
                        information=information+texte_tr+str(i)+": "+texte_bu+"\n"
        icone=table[0].find_all('div')
        i=0
        for ic in icone:
            i=i+1
            ico="icone"+str(i)+": "+str(ic).replace('<div class="icon i-', '')
            fin=compile('">(.*)div>').search(ico).group(1)
            information=information+ico.replace('">'+fin+'div>', '')+"\n"
            if i == 8:
                break
    fiche = open(fichier, "w")
#    fiche.write(current_balise.prettify())
    fiche.write(information)
    fiche.close()
    collect()
#### fin Fonction de traitement des fichiers

#### Mise en tache de fond
def demonise(ent, id1, id2, huitHeures, nbJour, interval, nbFoisHuit, Id):
    dem=time()-(60*60)
    misajour=1
    while 1 :
        heure=time()
        if huitHeures=="oui":
            x=0
            while x<nbFoisHuit:
                h=(x*8)+int(strftime('%H', localtime()))
                x=x+1
                traitement(ent+nb1+'/hourly-weather-forecast/'+nb2+'?hour='+str(h), repsauv+"/huitHeures"+str(x), repsauv)
                print("huitHeures "+str(x)+" Ok")
        if heure-dem >= 60*60:
            x=0
            while x<nbJour:
                x=x+1
                traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
                print("Jour "+str(x)+" Ok")
                if matin=="oui":
                    traitement(ent+nb1+'/morning-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Matin"+str(x), repsauv)
                    print("Matin "+str(x)+" Ok")
                if apresmidi=="oui":
                    traitement(ent+nb1+'/afternoon-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/AM"+str(x), repsauv)
                    print("AM "+str(x)+" Ok")
                if soiree=="oui":
                    traitement(ent+nb1+'/evening-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Soiree"+str(x), repsauv)
                    print("Soiree "+str(x)+" Ok")
                if nuit=="oui":
                    traitement(ent+nb1+'/overnight-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Nuit"+str(x), repsauv)
                    print("Nuit "+str(x)+" Ok")
            dem=heure
        traitement(ent+nb1+'/current-weather/'+nb2, repsauv+"/CC", repsauv)
        print("CC Ok")
        if externe is not None:
                 system(externe)
        fin=time()
        duree=fin-heure
        if notifi == "oui":
            if heure-dem == 0:
                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour complète terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
            else:
                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour partielle terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
            mess.show()
        start=heure
        pause=60*interval-int(duree)
        if pause < 0:
            pause=interval
        print("mise a jour en : "+str(duree))
        collect()
        sleep(pause)
        if Id != "sans":
            if not path.exists("/proc/"+Id):
                exit()


### Initialiation de DBus pour les notifications
if notifi == "oui":
    import notify2
    notify2.init('Recmeteo.py')
### Vérification répertoire
if not path.exists(repsauv):
    makedirs(repsauv)
#### Lancement du script et initialisation de la tache de fond
nb1=findall('\d+', adressWeb)[0]
nb2=findall('\d+', adressWeb)[1]
ent=adressWeb[:adressWeb.find(nb1)]
fin=adressWeb.replace(ent+nb1, "")
fin=fin.replace(fin[:fin.find(nb2)]+nb2, "")
nb2=nb2+fin
print("Version =", Version)
demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id)

Hors ligne

#458 Le 01/05/2013, à 20:49

Ehcor8

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

rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ sh -c "~/Accuweather/start-recmeteo.sh"
rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ Version = 1.25
huitHeures 1 Ok
Traceback (most recent call last):
  File "/home/rg/Accuweather/scripts/recmeteo.py", line 369, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id)
  File "/home/rg/Accuweather/scripts/recmeteo.py", line 315, in demonise
    traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
  File "/home/rg/Accuweather/scripts/recmeteo.py", line 120, in traitement
    ventd=compile("var d = '(.*)';").search(str(div)).group(1).replace("W", "O")
AttributeError: 'NoneType' object has no attribute 'group'

Bjr Didier,   Merci pour votre aide. Mais ce qui m'embête c'est que vous ne profitiez pas complètement de vos vacances.... Pensez à vous.
Le message que j'ai obtenu en testant votre recmeteo.py

Hors ligne

#459 Le 01/05/2013, à 21:36

ragamatrix

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

premiers tests des thermos changeants de couleurs (sous v9000 et intellicast):
thermoses

Hors ligne

#460 Le 02/05/2013, à 05:35

jpdipsy

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

Ehcor8 a écrit :
rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ sh -c "~/Accuweather/start-recmeteo.sh"
rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ Version = 1.25
huitHeures 1 Ok
Traceback (most recent call last):
  File "/home/rg/Accuweather/scripts/recmeteo.py", line 369, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id)
  File "/home/rg/Accuweather/scripts/recmeteo.py", line 315, in demonise
    traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
  File "/home/rg/Accuweather/scripts/recmeteo.py", line 120, in traitement
    ventd=compile("var d = '(.*)';").search(str(div)).group(1).replace("W", "O")
AttributeError: 'NoneType' object has no attribute 'group'

Bjr Didier,   Merci pour votre aide. Mais ce qui m'embête c'est que vous ne profitiez pas complètement de vos vacances.... Pensez à vous.
Le message que j'ai obtenu en testant votre recmeteo.py

Pareil mais pas pas sur la même ligne

huitHeures 1 Ok
Traceback (most recent call last):
  File "/home/jp/Accuweather/scripts/recmeteo.py", line 369, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id)
  File "/home/jp/Accuweather/scripts/recmeteo.py", line 315, in demonise
    traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
  File "/home/jp/Accuweather/scripts/recmeteo.py", line 137, in traitement
    date=histo.find_all('th')
AttributeError: 'NoneType' object has no attribute 'find_all'

@Ehcor8 pour qu'on soit synchrone met bien à jour start-recmeteo.sh (si ce n'est fait).
si tu utilises la crontab pour le lancer et la vérif de lancement comme je l'explique dans IMPORTANT 1304 tu peux ajouter ceci à start-recmeteo.sh

"status")
            pid=$(ps x|grep "[r]ecmeteo.py" |cut -d ? -f1)
        if [ ! -z "$pid" ];then 
           exit 
        else 
            date +%R >>/tmp/redem.txt       #<--------------------------------------------- ajoute ceci
            notify-send  --expire-time=5000   " Redémarrage de recmeteo" 
         fi 
        ;;

comme çà tu peux vérifier si les maj se font dans le fichier /tmp/redem.txt


@Didier pour info hier sur une journée complete il arrive quelques fois qu'il n'y est pas de souci  pendant plus d'une heure (MAJ 15mn)

Dernière modification par jpdipsy (Le 02/05/2013, à 05:46)

Hors ligne

#461 Le 02/05/2013, à 06:27

Didier-T

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

Merci pour ces retours,

jpdipsy a écrit :

@Didier pour info hier sur une journée complete il arrive quelques fois qu'il n'y est pas de souci  pendant plus d'une heure (MAJ 15mn)

cette observation, viens appuyer ma théorie concernant un bug du à la gestion de la mémoire sous Ubuntu.
Je ne pourrai pas obtenir ce genre de soucis sous Manjaro. mais si je pense à une solution je vous la ferais tester.

@Ehcor8,
merci pour ta sollicitude, mais je fais sa comme ma femme fait du tricot. Sa n'est vraiment pas une contrainte pour moi au contraire.

Hors ligne

#462 Le 02/05/2013, à 07:10

Didier-T

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

re-bonjour a tous,

voici un nouveau script, il vérifiera que toute la page a été traité par beautifulsoup, si ce n'est pas le cas, vous aurez un message d'erreur, mais le programme continuera a tourner.

recmeto.py

#! /usr/bin/python3
# -*- coding: utf-8 -*-
# Par Didier-T Forum Ubuntu.fr
# Ajout notification par jpdipsy Forum Ubuntu.fr
# Ajout notification via DBus par ti_tux Forum Ubuntu.fr
# Ajout création repsauv si inexistant par jpdipsy Forum Ubuntu.fr

from socket import timeout
from urllib.request import Request, urlopen, URLError
from os import path, makedirs, system
from time import time, sleep, strftime, localtime
from re import search, compile, findall
from sys import argv
from gc import collect, get_objects
from bs4 import BeautifulSoup
from subprocess import Popen

Version='1.25a'

homedir = path.expanduser('~')

#### initialisation des variables
adressWeb="http://www.accuweather.com/fr/fr/belfort/133341/daily-weather-forecast/133341"
repsauv= "~/essais"
huitHeures="oui"
nbFoisHuit=1
matin="non"
apresmidi="oui"
soiree="non"
nuit="oui"
nbJour=5
interval=2
notifi="non"
externe = None
Id = "sans"

for a in argv:
    if search("adressWeb=", a) is not None:
        adressWeb=compile("adressWeb=(.*)").search(a).group(1)
    if search("repsauv=", a) is not None:
        repsauv=compile("repsauv=(.*)").search(a).group(1)
    if search("huitHeures=", a) is not None:
        huitHeures=compile("huitHeures=(.*)").search(a).group(1)
    if search("nbJour=", a) is not None:
        nbJour=compile("nbJour=(.*)").search(a).group(1)
    if search("interval=", a) is not None:
        interval=compile("interval=(.*)").search(a).group(1)
    if search("notify=", a) is not None:
        notifi=compile("notify=(.*)").search(a).group(1)
    if search("matin=", a) is not None:
        matin=compile("matin=(.*)").search(a).group(1)
    if search("apresmidi=", a) is not None:
        apresmidi=compile("apresmidi=(.*)").search(a).group(1)
    if search("soiree=", a) is not None:
        soiree=compile("soiree=(.*)").search(a).group(1)
    if search("nuit=", a) is not None:
        nuit=compile("nuit=(.*)").search(a).group(1)
    if search("externe=", a) is not None:
        externe=compile("externe=(.*)").search(a).group(1)
    if search("nbFoisHuit=", a) is not None:
        nbFoisHuit=compile("nbFoisHuit=(.*)").search(a).group(1)
    if search("id=", a) is not None:
        Id=compile("id=(.*)").search(a).group(1)

nbJour=int(nbJour)
interval=int(interval)
repsauv=repsauv.replace("~", homedir)
notifi=str.lower(notifi)
huitHeures=str.lower(huitHeures)
nbFoisHuit=int(nbFoisHuit)


#### fin initialisation des variables

#### Fonction de traitement des fichiers
def traitement(adress, fichier, repsauv):
#    fiche = open(fichier, "w")
    #pour debug
    current_balise=None
    x=1
    user_agent = 'Mozilla/5.0 (X11; Linux x86_64)'
    headers = { 'User-Agent' : user_agent }
    while current_balise is None:
        response = None
        while response is None:
            try:
                html_page = urlopen(adress, timeout=10)
            except (URLError) as error:
                print("HTML ", error)
            except timeout:
                print("erreur timeout acces HTML")
            else:
                try:
                    currentCond=html_page.read()
                except (URLError) as error:
                    print("Lecture page ", error)
                except timeout:
                    print("erreur timeout lecture page")
                else:
                    soup = BeautifulSoup(currentCond)
                    if soup.find(id="tracking-pixels") is not None:
                        response = "ok"
                    else:
                        print("soucis traitement mémoire traitement "+fichier)
        #si autres que huit heures
        table=soup.find_all('table')
        current_balise=soup.find(id="details")
#        if current_balise is None:
#            sleep(1)
#            x=x+1
#            print("problème de récupération de donées\n essais n°"+str(x)+"\npage : "+adress)
#    print(current_balise.prettify()+"\n")
    information="\n"
    if search("huitHeures", fichier) is None:
        # recherche vent
        divs=current_balise.select("[class~=wind-box-lg]")
        if len(divs) == 0:
            divs=current_balise.select("[class~=wind-box-sm]")
        i=0
        for div in divs:
            i=i+1
            ventd=compile("var d = '(.*)';").search(str(div)).group(1).replace("W", "O")
            ventf=compile("var s = '(.*)';").search(str(div)).group(1)
            information=information+"direction"+str(i)+": "+ventd+"\n"
            information=information+"vitesse"+str(i)+": "+ventf+"\n"
        #info dans l'image
        inf=current_balise.select("[class~=info]")
        icone=current_balise.select("[class~=icon]")
        i=0
        #recherche icone
        for ic in icone:
            i=i+1
            information=information+"icone"+str(i)+": "+str(ic).replace('<div class="icon i-', '').replace('"></div>', '')+"\n"
        i=0
        #récupération date + historique
        if search("Jour", fichier) is not None or search("CC", fichier) is not None:
            histo=soup.find(id="feature-history")
            #récupération date
            date=histo.find_all('th')
            jour=compile("(.*)/(.*)/(.*)").search(date[4].get_text())
            information=information+"jour: "+jour.group(1)+"\n"
            information=information+"mois: "+jour.group(2)+"\n"
            information=information+"année: "+str(int(jour.group(3))+1)+"\n"
            #récupération historique
            hi=histo.select("[class~=hi]")
            for v in hi:
                hivalue=v.get_text().split("\n")
            information=information+"maxjour: "+hivalue[2]+"\n"
            information=information+"maxnormal: "+hivalue[3]+"\n"
            information=information+"maxrecord: "+hivalue[4]+"\n"
            information=information+"max1ans: "+hivalue[5]+"\n"
            lo=histo.select("[class~=last]")
            for v in lo:
                lovalue=v.get_text().split("\n")
            information=information+"minjour: "+lovalue[2]+"\n"
            information=information+"minnormal: "+lovalue[3]+"\n"
            information=information+"minrecord: "+lovalue[4]+"\n"
            information=information+"min1ans: "+lovalue[5]+"\n"
            #info dans l'image
            if search("Jour", fichier) is not None:
                infs=inf[0].get_text().split("\n")
                information=information+"Tempjour: "+findall('-?\d+', infs[0])[0]+"\n"
                information=information+"RealFeeljour: "+findall('-?\d+', infs[1])[0]+"\n"
                information=information+"Précipitationsjour: "+findall('-?\d+', infs[2])[0]+"\n"
                infs=inf[1].get_text().split("\n")
                information=information+"Tempnuit: "+findall('-?\d+', infs[0])[0]+"\n"
                information=information+"RealFeelnuit: "+findall('-?\d+', infs[1])[0]+"\n"
                information=information+"Précipitationsnuit: "+findall('-?\d+', infs[2])[0]+"\n"
                lever_coucher=soup.select("[class~=time-period]")
                i=0
                for p in lever_coucher:
                    spans=p.find_all('span')
                    i=i+1
                    x=0
                    for span in spans:
                        if i == 1:
                            span_nom="Soleil "
                        else:
                            span_nom="Lune "
                        if search('start', str(span)) is not None:
                            information=information+span_nom+"lever: "+span.get_text()+"\n"
                        if search('time', str(span)) is not None:
                            information=information+span_nom+"durée: "+span.get_text()+"\n"
                        if search('finish', str(span)) is not None:
                            information=information+span_nom+"coucher: "+span.get_text()+"\n"


            p=current_balise.find_all('p')
            i=0
            x=0
            for pv in p:
                i=i+1
                if i==5 or i==10:
                    x=x+1
                    information=information+"cond"+str(x)+": "+pv.get_text()+"\n"


        #localisation si condition courante
        if search("CC", fichier) is not None:
            ville=soup.select("[class~=current-city]")[0].get_text().split(",")[0]
            longi=compile("lon: '(.*)',").search(str(soup)).group(1)
            lat=compile("lat: '(.*)',").search(str(soup)).group(1)
            information=information+"ville: "+ville+"\n"
            information=information+"lat: "+lat+"\n"
            information=information+"long: "+longi+"\n"
            #info alerte
            alerte=soup.select("[class~=forecast-status]")
            if str(alerte) != "[]":
                p=alerte[0].find_all('p')
                a=p[0].find_all('a')
                clic=a[0].get_text()
                information=information+"alerte: "+p[0].get_text().replace(clic, "").replace("\n","").replace("\r", "").replace(chr(160), "").rstrip().lstrip()+"\n"
            else:
                information=information+"alerte: RAS\n"
            #info dans l'image
            inf=inf[0].get_text()
            cond=inf[:inf.find(findall('-?\d+', inf)[0])]
            inf=inf.replace(cond, "")
            infs=inf.split(" ")
            information=information+"cond:"+cond+"\n"
            information=information+"Temp: "+infs[0]+"\n"
            information=information+"RealFeel: "+infs[2]+"\n"

        if search("Matin", fichier) is not None or search("AM", fichier) is not None or search("Soiree", fichier) is not None or search("Nuit", fichier) is not None:
            infs=inf[0].get_text().split("\n")
            i=0
            infsc=["","","",""]
            for inf in infs:
                if inf!="":
                    infsc[i]=inf
                    i=i+1
            information=information+"cond:"+infsc[0]+"\n"
            information=information+"max: "+infsc[1]+"\n"
            information=information+"min: "+infsc[2].replace("Mn ", "")+"\n"
            information=information+"RealFeelmax: "+findall('-?\d+', infsc[3])[0]+"\n"
            information=information+"RealFeelmin: "+findall('-?\d+', infsc[3])[1]+"\n"
            
            #info conditions générales
            cc=current_balise.find_all('li')
            for inf in cc:
                inf=inf.get_text()
                inf=inf.replace(compile('^ *').search(inf).group(0), "").replace("\n", "")
                if search(":", inf) is not None:
                    information=information+inf+"\n"
        elif search("Jour", fichier) is not None:
            i=0
            cc=current_balise.find_all('li')
            for inf in cc:
                inf=inf.get_text()
                inf=inf.lstrip().replace("\n", "").replace(" \r", "")
                if search(": ", inf) is not None:
                    i=i+1
                    if i <= 7:
                        inf=inf.replace(":", " jour:")
                    else:
                        inf=inf.replace(":", " nuit:")
                    information=information+inf+"\n"
        else:
            cc=current_balise.find_all('li')
            for inf in cc:
                inf=inf.get_text()
                inf=inf.replace(compile('^ *').search(inf).group(0), "").replace("\n", "")
                if search(":", inf) is not None:
                    information=information+inf+"\n"
            information=information+str(int(time()))+"\n"
    else:
        #recherche icones huit heures
        rows = table[0].findAll('tr')
        x=0
        for tr in rows:
            cols = tr.findAll('td')
            texte_tr=tr.text.split("\n")[1].replace("\n", "")
            i=0
            for td in cols:
                i=i+1
#                td=td.replace("&nbsp;", "")
                texte_bu = td.text.replace("\n", "").replace(chr(160), "")
                if texte_bu != "" :
                    if texte_tr == " " and x < len(cols):
                        information=information+"Heure"+str(i)+": "+texte_bu+"\n"
                        x=x+1
                    elif texte_tr != " ":
                        information=information+texte_tr+str(i)+": "+texte_bu+"\n"
        icone=table[0].find_all('div')
        i=0
        for ic in icone:
            i=i+1
            ico="icone"+str(i)+": "+str(ic).replace('<div class="icon i-', '')
            fin=compile('">(.*)div>').search(ico).group(1)
            information=information+ico.replace('">'+fin+'div>', '')+"\n"
            if i == 8:
                break
    fiche = open(fichier, "w")
#    fiche.write(current_balise.prettify())
    fiche.write(information)
    fiche.close()
    collect()
#### fin Fonction de traitement des fichiers

#### Mise en tache de fond
def demonise(ent, id1, id2, huitHeures, nbJour, interval, nbFoisHuit, Id):
    dem=time()-(60*60)
    misajour=1
    while 1 :
        heure=time()
        if huitHeures=="oui":
            x=0
            while x<nbFoisHuit:
                h=(x*8)+int(strftime('%H', localtime()))
                x=x+1
                traitement(ent+nb1+'/hourly-weather-forecast/'+nb2+'?hour='+str(h), repsauv+"/huitHeures"+str(x), repsauv)
                print("huitHeures "+str(x)+" Ok")
        if heure-dem >= 60*60:
            x=0
            while x<nbJour:
                x=x+1
                traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
                print("Jour "+str(x)+" Ok")
                if matin=="oui":
                    traitement(ent+nb1+'/morning-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Matin"+str(x), repsauv)
                    print("Matin "+str(x)+" Ok")
                if apresmidi=="oui":
                    traitement(ent+nb1+'/afternoon-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/AM"+str(x), repsauv)
                    print("AM "+str(x)+" Ok")
                if soiree=="oui":
                    traitement(ent+nb1+'/evening-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Soiree"+str(x), repsauv)
                    print("Soiree "+str(x)+" Ok")
                if nuit=="oui":
                    traitement(ent+nb1+'/overnight-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Nuit"+str(x), repsauv)
                    print("Nuit "+str(x)+" Ok")
            dem=heure
        traitement(ent+nb1+'/current-weather/'+nb2, repsauv+"/CC", repsauv)
        print("CC Ok")
        if externe is not None:
                 system(externe)
        fin=time()
        duree=fin-heure
        if notifi == "oui":
            if heure-dem == 0:
                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour complète terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
            else:
                mess=notify2.Notification('Recmeteo.py  v'+Version, 'Météo : mise à jour partielle terminée\n en '+str(round(duree,2))+' secondes', 'dialog-information')
            mess.show()
        start=heure
        pause=60*interval-int(duree)
        if pause < 0:
            pause=interval
        print("mise a jour en : "+str(duree))
        collect()
        sleep(pause)
        if Id != "sans":
            if not path.exists("/proc/"+Id):
                exit()


### Initialiation de DBus pour les notifications
if notifi == "oui":
    import notify2
    notify2.init('Recmeteo.py')
### Vérification répertoire
if not path.exists(repsauv):
    makedirs(repsauv)
#### Lancement du script et initialisation de la tache de fond
nb1=findall('\d+', adressWeb)[0]
nb2=findall('\d+', adressWeb)[1]
ent=adressWeb[:adressWeb.find(nb1)]
fin=adressWeb.replace(ent+nb1, "")
fin=fin.replace(fin[:fin.find(nb2)]+nb2, "")
nb2=nb2+fin
print("Version =", Version)
demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id)

Hors ligne

#463 Le 02/05/2013, à 10:42

Ehcor8

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

rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ sh -c "~/Accuweather/start-recmeteo.sh"
rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ Version = 1.25a
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
erreur timeout acces HTML
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
erreur timeout acces HTML
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1

Désolé Didier mais il bute sur Huitheures1  et à la fin nous sort timeout...   Et il continue avec le précédent traitement.  13.04 32b a été upgradée ce matin mais pareil.

Ne vous inquiétez pas, il fait beau et le soleil est enfin revenu !!!

Hors ligne

#464 Le 02/05/2013, à 10:45

ragamatrix

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

@Tous les testeurs
Je m'y suis donc mis après ré-install nouvelle distro et dépendances requises pour recmeteo:

raphix@crunchbang:~$ uname -a
Linux crunchbang 3.2.0-4-amd64 #1 SMP Debian 3.2.41-2 x86_64 GNU/Linux
  

openbox+feh

 raphix@crunchbang:~/Accuweather$ ./start-recmeteo.sh
raphix@crunchbang:~/Accuweather$ Version = 1.24
huitHeures 1 Ok
huitHeures 2 Ok
Jour 1 Ok
Matin 1 Ok
AM 1 Ok
Soiree 1 Ok
Nuit 1 Ok
Jour 2 Ok
Matin 2 Ok
AM 2 Ok
Soiree 2 Ok
Nuit 2 Ok
Jour 3 Ok
Matin 3 Ok
AM 3 Ok
Soiree 3 Ok
Nuit 3 Ok
Jour 4 Ok
Matin 4 Ok
AM 4 Ok
Soiree 4 Ok
Nuit 4 Ok
Jour 5 Ok
Matin 5 Ok
AM 5 Ok
Soiree 5 Ok
Nuit 5 Ok
Jour 6 Ok
Matin 6 Ok
AM 6 Ok
Soiree 6 Ok
Nuit 6 Ok
Jour 7 Ok
Matin 7 Ok
AM 7 Ok
Soiree 7 Ok
Nuit 7 Ok
Jour 8 Ok
Matin 8 Ok
AM 8 Ok
Soiree 8 Ok
Nuit 8 Ok
Jour 9 Ok
Matin 9 Ok
AM 9 Ok
Soiree 9 Ok
Nuit 9 Ok
Jour 10 Ok
Matin 10 Ok
AM 10 Ok
Soiree 10 Ok
Nuit 10 Ok
Jour 11 Ok
Matin 11 Ok
AM 11 Ok
Soiree 11 Ok
Nuit 11 Ok
CC Ok
 

les données s'affichent mais j'ai une erreur qui a l'air bête...

 awk: cannot open /home/climatix/Accuweather/sauvegardes/horgen/CC (No such file or directory)
awk: cannot open /home/climatix/Accuweather/sauvegardes/horgen/CC (No such file or directory)
 
 /tmp/horgen-raphix/tool_R.png
/tmp/horgen-raphix/tool_B.png
mise a jour en : 160.88773107528687
 

J'ai pourtant changé mes chemins car mon nom utilisateur a changé mais je ne trouve pas d'où cela vient ?

Dernière modification par ragamatrix (Le 02/05/2013, à 10:47)

Hors ligne

#465 Le 02/05/2013, à 10:54

Didier-T

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

Ehcor8 a écrit :
rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ sh -c "~/Accuweather/start-recmeteo.sh"
rg@rg-HP-Pavilion-dv7-Notebook-PC:~$ Version = 1.25a
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
erreur timeout acces HTML
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
erreur timeout acces HTML
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1
soucis traitement mémoire traitement /home/rg/Accuweather/sauvegardes/Charleville-Mezieres/huitHeures1

Désolé Didier mais il bute sur Huitheures1  et à la fin nous sort timeout...   Et il continue avec le précédent traitement.  13.04 32b a été upgradée ce matin mais pareil.

Ne vous inquiétez pas, il fait beau et le soleil est enfin revenu !!!

ce retour confirme que les sécurités fonctionnes, donc le nous avons le soucis de gestion de la mémoire (la page est bien chargé, mais pas entièrement traité par beautifulsoup), et la sécurité concernant l’accès au site (temps d'accès trop élevé).
mais en laissant tourner le script, il devrait réussir sa mise a jour (avec un peut de temps) cool

Hors ligne

#466 Le 02/05/2013, à 10:58

Didier-T

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

@ragamatrix,

as tu vérifié que le chemin existe ?

Hors ligne

#467 Le 02/05/2013, à 11:28

ragamatrix

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

Didier-T a écrit :

@ragamatrix,

as tu vérifié que le chemin existe ?

oops c'était dans mon script externe "barognuplot" que je n'avais pas modifié le chemin... roll sinon ton script recmeteo.py 1.24 tourne sans erreur aujourd'hui sur ma nouvelle distro... Je laisse tourner pour les mises à jour...

Hors ligne

#468 Le 02/05/2013, à 12:01

jpdipsy

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

ragamatrix a écrit :

oops c'était dans mon script externe "barognuplot" que je n'avais pas modifié le chemin... roll sinon ton script recmeteo.py 1.24 tourne sans erreur aujourd'hui sur ma nouvelle distro... Je laisse tourner pour les mises à jour...

ça c'est une bonne nouvelle.

Pour moi et @Ehcor8 c'est même combat.

Hors ligne

#469 Le 02/05/2013, à 16:05

Ehcor8

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

Mais avec l'option de jpdipsy (cron), la mise à jour s'effectue normalement. Mais depuis ce matin avec le changement de la version ubuntu des erreurs apparaissent.

page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/overnight-weather-forecast/132782?day=3
Nuit 3 Ok
Jour 4 Ok
Nuit 4 Ok
problème de récupération de données
 essais n°2
page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/daily-weather-forecast/132782?day=5
Jour 5 Ok
Nuit 5 Ok
Jour 6 Ok
problème de récupération de donées
 essais n°2
page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/overnight-weather-forecast/132782?day=6
Nuit 6 Ok
problème de récupération de donées
 essais n°2
page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/current-weather/132782
problème de récupération de donées
 essais n°3
page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/current-weather/132782
problème de récupération de donées
 essais n°4
page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/current-weather/132782
problème de récupération de donées
 essais n°5
page : http://www.accuweather.com/fr/fr/charleville-mezieres/132782/current-weather/132782
CC Ok
/tmp/charleville-mezieres-rg/Barometre_hr.png
/tmp/charleville-mezieres-rg/Rose-CC.png
mise a jour en : 69.20961809158325

Hors ligne

#470 Le 02/05/2013, à 20:22

maan

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

bonsoir @ tous
voilà depuis quelques jours mon conky meteo ne marche plus .
toutes les icones du jour et des jours à venir ainsi que les icones vent ne s'affichent plus,
et la mise à jours des conditions meteo ne se fait plus ........
voici mon retour terminal

┌─( maan ) - ( 3.2.0-41-generic ) - ( ~/.conky/conky23 )
└─> conky -c conkyrc_meteo_lua
Conky: forked to background, pid is 17258
┌─( maan ) - ( 3.2.0-41-generic ) - ( ~/.conky/conky23 )
└─> 
Conky: desktop window (1400003) is subwindow of root window (158)
Conky: window type - desktop
Conky: drawing to created window (0x1600001)
Conky: drawing to double buffer
	version = v1.08
	web = http://www.accuweather.com/fr/fr/augerolles/132213/weather-forecast/132213
	Pévision Nb jours = 5
	Pévision Matin = non
	Pévision Après Midi = oui
	Pévision Soirée = non
	Pévision Nuit = oui
	Prévision sur 8 heures = non
	nbFoisHuit= 2
	Délais = 15
	Chemin de travail = /tmp
	Palier = 20
	Chemin de sauvegarde = /home/maan/.conky/conky23/reptravail
	Chemin script = /home/maan/.conky/conky23/conky/script
	Notification = non
	ID = 17258
Condition courante Ok
Prévision 1 Ok
Apres Midi 1 Ok
Nuit 1 Ok
Prévision 2 Ok
Apres Midi 2 Ok
Nuit 2 Ok
Prévision 3 Ok
Apres Midi 3 Ok
Nuit 3 Ok
Prévision 4 Ok
Apres Midi 4 Ok
Nuit 4 Ok
Prévision 5 Ok
Apres Midi 5 Ok
Nuit 5 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Traceback (most recent call last):
  File "/home/maan/.conky/conky23/conky/script/recmeteo_python_2.py", line 17, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4
lunaison Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: received SIGINT or SIGTERM to terminate. bye!

je n'ai pourtant rien toucher...... ou est renseigner le chemin pour trouver les icones ?????


Ubuntu_studio 14.04

Hors ligne

#471 Le 02/05/2013, à 21:43

Didier-T

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

maan, il te manque python-bs4
A+

Hors ligne

#472 Le 02/05/2013, à 21:59

maan

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

merci Didier, toujours là pour aidez les nuls :-p

Donc il se mets bien à jours mais par contre j'ai toujours mes erreurs pour mes icones .......

Edit :  par contre un truc qui me chiffonne c'est que dans mon meteo-lua il me dit que j'utilise recmeteo et non pas recmeteo_python_2 ?????

Dernière modification par maan (Le 02/05/2013, à 22:01)


Ubuntu_studio 14.04

Hors ligne

#473 Le 02/05/2013, à 23:11

Ehcor8

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

@jpdipsy,   J'avais déjà mis votre version de recmeteo.py et cela fonctionne, j'y ai ajouté la visualisation dans start recmeteo. Cela fonctionne aussi. Malheureusement, je pars pour un mois dans la famille et pas d'internet, sauf le téléphone mobile alors....   
Mon bureau:     https://www.dropbox.com/sh/7pkh7es3xyjlmqf/xwSdmvzYTz

Ce ne serait pas mal un jour lors de voyages (vacances entre autres) de parler de vives voix de tous ces sujets. Les journées Ubuntu sont souvent hors de porté ou hors date mais ce doit être passionnant d'y assister.

Hors ligne

#474 Le 03/05/2013, à 02:46

Didier-T

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

@maan,
Voici le message d'erreur qui était cacher au milieux des retours de meteo2.l'UA

maan a écrit :

...
File "/home/maan/.conky/conky23/conky/script/recmeteo_python_2.py", line 17, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4
...

montre moi deux choses pour les icones.
ton retour terminal actuel, et le contenu de ton conkyrc.

A+

Hors ligne

#475 Le 03/05/2013, à 13:23

maan

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

Didier-T a écrit :

Voici le message d'erreur qui était cacher au milieux des retours de meteo2.l'UA

maan a écrit :

...
File "/home/maan/.conky/conky23/conky/script/recmeteo_python_2.py", line 17, in <module>
    from bs4 import BeautifulSoup
ImportError: No module named bs4
...

J'avais compris et je l'avais aperçu au milieu , ce que je comprend moins c'est que voilà ce qui a dans meteo2,
"utilise recmeteo.py"

-- Créé par Didier-T (forum.ubuntu-fr.org)
-- Nécessite imagemagick http://apt.ubuntu.com/p/imagemagick
-- Nécessite Curl
-- utilise recmeteo.py


require "io"
require "os"
require 'cairo'

local Version = "v1.08"
local conditionJour = {}
local conditionNuit = {}
local conditionMatin = {}
local conditionAM = {}
local conditionSoiree = {}
local conditionNoct = {}
local InfoJour = {}
local conditioncourante = {}
local huitHeures = {}
local Rep, cmd, jours, matin, apresmidi, soiree, nuit, delais, r, repsauv, l, fichier_init, MAJ, tc, dermodif, VilleAdresse, start, cmd1, ID
local Debug = "Problème Info "
local home = os.getenv("HOME")
--Liste des accents et carractère non pris en charge par les patterns
local pat="%é%è%à%ä%â%ê%ô%ç%É%È%À%Â%Ä%Ê%Ô%Ç'"


--Trouve ID
function Get_ID()
	local proc, ret
	proc=io.open("/proc/self/stat", "r")
	ret=proc:read():match("%d*")
	return ret
end

--Francisation alerte
function fran_alerte(d)
	if d:match("(attendue)") ~= nil and d:match("(entre)") ~= nil then
		d = d:gsub("entre", "au")
		d = d:gsub("attendue ", "attendue du "):gsub("attendues ", "attendues du ")
	end
	if d:match("(On s'attend à de la)") ~= nil and d:match("(entre)") ~= nil then
		d = d:gsub("entre", "et")
	end
	if d:match("(depuis)") ~= nil and d:match("(dans)") ~= nil then
		d = d:gsub("depuis", "à partir de"):gsub("jusqu'à")
	end
	
    d = d:gsub("depuis","à partir de"):gsub("tard la", "tard dans la"):gsub("lorsqu'elle deviendra de la", "se transformant en"):gsub("lorsqu'elle", "puis"):gsub("et s'accumulera de", "de"):gsub("avant de finir", "jusqu'à"):gsub("la nuit du", "dans la nuit de")
    
    return d
end

--Traduction date
function trad_date(d)
	local date = d
	date = date:gsub("Monday", "Lundi"):gsub("Tuesday", "Mardi"):gsub("Wednesday", "Mercredi"):gsub("Thursday", "Jeudi"):gsub("Friday", "Vendredi"):gsub("Saturday", "Samedi"):gsub("Sunday", "Dimanche")

	date = date:gsub("lun", "Lun"):gsub("mar", "Mar"):gsub("mer", "Mer"):gsub("jeu", "Jeu"):gsub("ven", "Ven"):gsub("sam", "Sam"):gsub("dim", "Dim")

	date = date:gsub("Mon", "Lun"):gsub("Tue", "Mar"):gsub("Wed", "Mer"):gsub("Thu", "Jeu"):gsub("Fri", "Ven"):gsub("Sat", "Sam"):gsub("Sun", "Dim")
	
	date = date:gsub("January", "Janvier"):gsub("February", "Février"):gsub("March", "Mars"):gsub("April", "Avril"):gsub("May", "Mai"):gsub("June", "Juin"):gsub("July", "Juillet"):gsub("August", "Août"):gsub("September", "Septembre"):gsub("October", "Octobre"):gsub("November", "Novembre"):gsub("December", "Décembre")

	date = date:gsub("jan", "Jan"):gsub("fev", "Fév"):gsub("mar", "Mar"):gsub("avr", "Avr"):gsub("mai", "Mai"):gsub("jui", "Jui"):gsub("aou", "Aoû"):gsub("sep", "Sep"):gsub("oct", "Oct"):gsub("nov", "Nov"):gsub("dec", "Déc")
	
	date = date:gsub("Feb", "Fév"):gsub("Apr", "Avr"):gsub("May", "Mai"):gsub("Jun", "Juin"):gsub("Jul", "Juil"):gsub("Aug", "Aoû"):gsub("Dec", "Déc")
		
	return date
end

--Vérifier l'existence d'un fichier
function existe(file) 
  local a = io.open(file, "r")
  local present
  if a then
    present = true
    io.close(a)
  else
    present = false
  end
  return present
end

--Formatage des pages web
function string.formatage(ligne)
ligne = ligne:gsub("&#244;", "ô"):gsub("&#226;", "â"):gsub("&#233;", "é"):gsub("&#232;", "è"):gsub("&#224;", "à"):gsub("&#231;", "ç"):gsub("&#234;", "ê"):gsub("&#246;", "ö"):gsub("&#238;", "î"):gsub("&#239;", "ï"):gsub("&#251;", "û"):gsub("&#252;", "ü"):gsub("&#39;", "'"):gsub("Poudreries", "Bourrasques de neige"):gsub("&#201;", "É"):gsub("&#176;",""):gsub("[\n\r]",""):gsub("&eacute;", "é")
return ligne
end

--Infos lunaison
function lunaison(r)
	local s, web, Lune
	
	web="http://www.calendrier-lunaire.net/"

	f=assert(io.popen("curl --max-time 60 --retry 3 --silent '"..web.."' | grep -A53 'ephemerides\"' | sed 's/%//g'"))
	line=f:read()
	i=0
	for line in f:lines() do
		i=i+1
		if i==3 then
			icone=line:match("src=\"([%w%p]*)\"")
		elseif i==7 then
			ephemerides1, ephemerides2=line:formatage():match(">(%a*)</span> (%a*)<")
		elseif i==11 then
			Visibilite=line:match("\">([%d%p]*) <")
		elseif i==12 then
			Phases, Phases1, Phases2=line:formatage():match("\">(([%a%p%d"..pat.."]*),%s*([%a%p%d"..pat.."]*))</s")
		elseif i==13 then
			Noeud_lunaire=line:match("\">([%a%d%p%s]*)</s")
		elseif i==14 then
			Apogee=line:match("\">([%a%d%p%s]*)</s")
		elseif i==15 then
			Perigee=line:match("\">([%a%d%p%s]*)</s")
		elseif i==16 then
			Distance=line:match("\">(%d*) %a*</s")
		elseif i==18 then
			Age=line:match("\">([%a%d%s]*)</")
		elseif i==19 then
			Lever_LuneHeure, Lever_LuneMinute, Coucher_LuneHeure, Coucher_LuneMinute=line:match("\">([%d%p]*):([%d%p]*)</span>[%a%p%s]*;\">([%d%p]*):([%d%p]*)</")
		elseif i==48 then
			Eclipse_partielle=line:match("\">([%w%s]* <br /> [%d%p]*)</a>")
		elseif i==49 then
			Eclipse_total=line:match("\">([%w%s]* <br /> [%d%p]*)</a>")
		end
	end
	f:close()	if Noeud_lunaire:match("(%d+)") ~= nil then Noeud_lunaire = Noeud_lunaire:match("(%d+)") end

	if Apogee:match("(%d+)") ~= nil then Apogee = Apogee:match("(%d+)") end
	if Perigee:match("(%d+)") ~= nil then Perigee = Perigee:match("(%d+)") end
	ephemerides = ephemerides1.." "..ephemerides2	
	Eclipse_partielle = datelune(Eclipse_partielle)
	Eclipse_total = datelune(Eclipse_total)
	s = "${exec wget --tries=3 -q -O "..r.."/lune.png http://www.calendrier-lunaire.net/"..icone.."}"
	conky_parse( s )
	conky_parse( "${exec convert "..r.."/lune.png -transparent '#091a2a' "..r.."/lune.png}" )

end

function datelune(d)
	local j, m, a, h, min = d:gsub("Janvier", "01"):gsub("Février", "02"):gsub("Mars", "03"):gsub("Avril", "04"):gsub("Mais", "05"):gsub("Juin", "06"):gsub("Juillet", "07"):gsub("Août", "08"):gsub("septembre", "09"):gsub("Octobre", "10"):gsub("Novembre", "11"):gsub("Décembre", "12"):match("(%d+) (%d+) (%d+) <br /> (%d+):(%d+)")
	d = os.time{year=a, month=m, day=j, hour=h, min=min}

	return d
	
end


--Détermine icône vent
function direction_vent(i)

	if i == "Calme" then
		return 0
	elseif i == "N" then
		return 10
	elseif i == "NNE" then
		return 11
	elseif i == "NE" then
		return 12
	elseif i == "ENE" then
		return 13
	elseif i == "E" then
		return 14
	elseif i == "ESE" then
		return 15
	elseif i == "SE" then
		return 16
	elseif i == "SSE" then
		return 17
	elseif i == "S" then
		return 2
	elseif i == "SSO" then
		return 3
	elseif i == "SO" then
		return 4
	elseif i == "OSO" then
		return 5
	elseif i == "O" then
		return 6
	elseif i == "ONO" then
		return 7
	elseif i == "NO" then
		return 8
	elseif i == "NNO" then
		return 9
	else
		return 1
	end

end


--Renvoi vent direction pleine en toute lettre
function vent_plein(d)

	local b

	if string.len(d) == 1 then
		if string.find(d, "N") ~= nil then 
			b = string.gsub(d, "N", "Nord") 
		elseif string.find(d, "S") ~= nil then 
			b = string.gsub(d, "S", "Sud") 
		elseif string.find(d, "E") ~= nil then
			b = string.gsub(d, "E", "Est") 
		elseif string.find(d, "O") ~= nil then
			b = string.gsub(d, "O", "Ouest")
		end
	else
		b = d
	end

	return b

end


--Détermine l'icône vent en tenant conte de la force du vent
function icone_vent(d, fo)

	local f = tonumber(fo)
	local n

	if f <= Palier then
		n = d
	elseif f <= Palier*2 then
		n = d + 17
	elseif f <= Palier*3 then
		n = d + 34
	elseif f >= (Palier*3)+1 then
		n = d + 51
	end

	if n <= 9 then 
		n = "0"..n
	end

	return n

end


--Découpage descriptions sur deux lignes
function decoupage(d)

	local l1, l2, n, p1, p2, n1, n2, l1b, l2b, dm, dp
	if string.len(d) >= 22 then
		n = math.ceil(string.len(d)/2)
		dm = string.sub(d, 1, n)
		dp = string.sub(d, n)
		p1 = string.find(dp, " ")
		local b = 1
		p2 = nil
		if string.find(dm, ' ') then
			while p2 == nil do
				b = b+1
				p2 = string.find(dm, ' ', -b)
			end
		end
		if p1 ~= nil then p1 = n+p1-1 end
		
		if p1 == nil and p2 == nil then p1 = string.find(d, " ") end
		if p2 == nil then p2 = p1 end
		if p1 == nil then p1 = p2 end
		if p1-n >= n-p2 then
			l1b = string.sub(d, 1, p2-1)
			l2b = string.sub(d, p2+1)
		else
			l1b = string.sub(d, 1, p1-1)
			l2b = string.sub(d, p1+1)
		end
	else
		l1b = d
		l2b = " "
	end
	n1 = math.ceil((22 - string.len(l1b))/2)
	l1 = string.rep(" ", n1)..l1b 
	n2 = math.ceil((22 - string.len(l2b))/2)
	l2 = string.rep(" ", n2)..l2b 

--Retour information avec espaces ligne 1 & 2 et sans espaces ligne 1 & 2
	return l1, l2, l1b, l2b

end


--initialisation paramètres
function conky_init(cfg)

	local pos1
	
	cfg = string.gsub(cfg, "~", home)
	cfg = string.gsub(cfg, "$HOME", home)
	fichier_init = cfg
	
	local file = assert(io.open(cfg, "rb") )
	local line = file:read()
	for line in file:lines() do
		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, 'repscript=') ~= nil then
			repscript = 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, 'Palier=') ~= nil then
			Palier = tonumber(string.sub(line, pos1+1))
		elseif string.find(line, 'update=') ~= nil then
			delais = string.sub(line, pos1+1)
		elseif string.find(line, 'notify=') ~= nil then
			notify = string.sub(line, pos1+1)
		elseif string.find(line, 'nbFoisHuit=') ~= nil then
			nbFoisHuit = string.sub(line, pos1+1)
		end
	end
	io.close(file)	
	ID = Get_ID()
	r = r:gsub("~", home):gsub("$HOME", home)
	repsauv = repsauv:gsub("~", home):gsub("$HOME", home)
	repscript = repscript:gsub("~", home):gsub("$HOME", home)
	
print("", "version = "..Version.."\n", "web = "..cmd1.."\n", "Pévision Nb jours = "..jours.."\n", "Pévision Matin = "..matin.."\n", "Pévision Après Midi = "..apresmidi.."\n", "Pévision Soirée = "..soiree.."\n", "Pévision Nuit = "..nuit.."\n","Prévision sur 8 heures = "..huit.."\n","nbFoisHuit= "..nbFoisHuit.."\n", "Délais = "..delais.."\n", "Chemin de travail = "..r.."\n","Palier = "..Palier.."\n", "Chemin de sauvegarde = "..repsauv.."\n", "Chemin script = "..repscript.."\n", "Notification = "..notify.."\n", "ID = "..ID)

--Création répertoire de travail
	cmd, l = cmd1:match("([%a%p%d]*)/[%a%p]*/([%d%p%a]*)")
	l1 = cmd:match("[%a%p]*/(%a*)/%d*")

	Rep = r.."/"..l1.."/"..l
	if os.execute("cd "..Rep) ~= 0 then
		os.execute("mkdir "..r.."/"..l1.."&& mkdir "..Rep)
	end
	
--initialisation compteurs
	t = os.time()-delais
	tc = t
	start = 1
	
--Vérification existence repsauv

	if os.execute("cd "..repsauv) ~= 0 then
--création de repsauv si inexistant
		local pos1 = 1
		local chemin = nil
		local cheminsup = nil
		while pos1 ~= nil do
			pos1 = string.find(repsauv, '/', pos1+1)
			if pos1 ~= nil then
				cheminsup = string.sub(repsauv, pos1)
				chemin = string.gsub(repsauv, cheminsup, "")
			else
				cheminsup = ""
				chemin = repsauv
			end
			if os.execute("cd "..chemin) ~= 0 then
				os.execute("mkdir "..chemin)
			end
		end
	end
	
	start=1
		
	MAJ ="0"
	
end

--Mise à jour météo
function conky_Meteo_Maj()

	local s = '${if_gw}${lua conky_Meteo_enligne}${else}${lua conky_Meteo_horsligne}${endif}'
	conky_parse( s )
	return " "
end

--hors ligne récupération de données
function conky_Meteo_horsligne()
	local value
	if dermodif2 == nil or dermodif2 ~= conky_parse("${exec date -r "..repsauv.."/CC '+%s'}") then
		dermodif2=conky_parse("${exec date -r "..repsauv.."/CC '+%s'}")
--Récupération dernière condition courante
		local file = assert(io.open(repsauv.."/CC", "r") )
		local line = file:read()
		local i = 0
		local donee = {}
		for line in file:lines() do
			i = i+1
			donee[i] = line
		end
		io.close(file)
		local t = {"VentDir", "VentForce", "Icone", "DateJour", "DateMois", "DateAnnee", "HistoMaxJour", "HistoMaxNormalJour", "HistoMaxRecordJour", "HistoMax1Ans", "HistoMinJour", "HistoMinNormalJour", "HistoMinRecordJour", "HistoMin1Ans", "Ville", "latitude", "longitude", "Alerte", "Cond", "Temp", "Tempr", "Humidite", "Pression", "Uv", "CouvNuage", "Ceiling", "PointRosee", "Visibilite"}
		i=0
		for i = 1,table.getn(t) do
			donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
			value=donee[i]:match("(%d*)")
			if value ~= "" then
				donee[i] = value
			end
			conditioncourante[t[i]] = donee[i]
		end
--Récupération de l'heure de mise a jour
		time = donee[table.getn(t)+1]
		conditioncourante.Date = os.time{year=conditioncourante.DateAnnee, month=conditioncourante.DateMois, day=conditioncourante.DateJour, hour=0}
--Traitement condition courrante
		if conditioncourante.VentDir == "CLM" then
			conditioncourante.VentDir = "Calme"
			conditioncourante.VentForce = "0"
		end
		conditioncourante.Alerte = fran_alerte(conditioncourante.Alerte)
		conditioncourante.VentIcone = icone_vent(direction_vent(conditioncourante.VentDir), conditioncourante.VentForce)
		conditioncourante.VentPlein = vent_plein(conditioncourante.VentDir)
		conditioncourante.CondMeteo1, conditioncourante.CondMeteo2, conditioncourante.CondMeteo1se, conditioncourante.CondMeteo2se = decoupage(conditioncourante.Cond)
		conditioncourante.Alerte1, conditioncourante.Alerte2, conditioncourante.Alerte1se, conditioncourante.Alerte2se = decoupage(conditioncourante.Alerte)
		print("Condition courante Ok")
		
--Récupération prévision
		
		for j = 1,jours do
			local file = assert(io.open(repsauv.."/Jour"..j, "r"))
			local line = file:read()
			local i = 0
			local donee = {}
			for line in file:lines() do
				i = i+1
				donee[i] = line
			end
			io.close(file)
			local infojournee = {}
			local t = {"VentDirJour", "VentForceJour", "VentDirNuit", "VentForceNuit", "IconeJour", "IconeNuit", "DateJour", "DateMois", "DateAnnee", "HistoMaxJour", "HistoMaxNormalJour", "HistoMaxRecordJour", "HistoMax1Ans", "HistoMinJour", "HistoMinNormalJour", "HistoMinRecordJour", "HistoMin1Ans", "TempJour", "RealFeelJour", "ProbPrecJour", "TempNuit", "RealFeelNuit", "ProbPrecNuit", "SoleilLever", "SoleilDuree", "SoleilCoucher", "LuneLever", "LuneDuree", "LuneCoucher", "CondMeteoJour", "CondMeteoNuit", "VentRafalesJour", "UvJour", "ProbOrageJour", "NivPrecJour", "QPluieJour", "QNeigeJour", "EVerglasJour", "VentRafalesNuit", "UvNuit", "ProbOrageNuit", "NivPrecNuit", "QPluieNuit", "QNeigeNuit", "EVerglasNuit"}
			i=0
			for i = 1,table.getn(t) do
				donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
				if donee[i]:find(":") == nil then
					value=donee[i]:match("(%d*)")
					if value ~= "" then
						donee[i] = value
					end
				end
				infojournee[t[i]] = donee[i]
			end

--Trie des infos
			local info = {}
			local y ={"VentDirJour", "VentForceJour", "IconeJour", "TempJour", "RealFeelJour", "ProbPrecJour", "CondMeteoJour", "VentRafalesJour", "UvJour", "ProbOrageJour", "NivPrecJour", "QPluieJour", "QNeigeJour", "EVerglasJour"}
			local t = {"VentDir", "VentForce", "Icone", "Temp", "TempRes", "ProbPrec", "CondMeteo", "VentRafales", "Uv", "ProbOrage", "NivPrec", "QPluie", "QNeige", "EVerglas"}
			conditionJour[j] = {}
			i=0
			for i = 1, table.getn(t) do
				info[t[i]] = infojournee[y[i]]
			end
			conditionJour[j] = info
			local info1 = {}
			local y = {"VentDirNuit", "VentForceNuit", "IconeNuit", "TempNuit", "RealFeelNuit", "ProbPrecNuit", "CondMeteoNuit", "VentRafalesNuit", "UvNuit", "ProbOrageNuit", "NivPrecNuit", "QPluieNuit", "QNeigeNuit", "EVerglasNuit"}
			local t = {"VentDir", "VentForce", "Icone", "Temp", "TempRes", "ProbPrec", "CondMeteo", "VentRafales", "Uv", "ProbOrage", "NivPrec", "QPluie", "QNeige", "EVerglas"}
			conditionNuit[j] = {}
			i=0
			for i = 1, table.getn(t) do
				info1[t[i]] = infojournee[y[i]]
			end
			conditionNuit[j] = info1
			local info2 = {}
			
			InfoJour[j] = {}
			InfoJour[j].Jour = os.time{year=infojournee.DateAnnee, month=infojournee.DateMois, day=infojournee.DateJour, hour=0}
			InfoJour[j].LeverSoleilH, InfoJour[j].LeverSoleilM = infojournee.SoleilLever:match("(%d*):(%d*)")
			InfoJour[j].CoucherSoleilH, InfoJour[j].CoucherSoleilM = infojournee.SoleilCoucher:match("(%d*):(%d*)")
			InfoJour[j].Histo_Max =infojournee.HistoMax1Ans
			InfoJour[j].Histo_Min =infojournee.HistoMin1Ans

--Traitement condition courrante
			if conditionJour[j].VentDir == "CLM" then
				conditionJour[j].VentDir = "Calme"
				conditionJour[j].VentForce = "0"
			end
			conditionJour[j].VentIcone = icone_vent(direction_vent(conditionJour[j].VentDir), conditionJour[j].VentForce)
			conditionJour[j].RafalesIcone = icone_vent(direction_vent(conditionJour[j].VentDir), conditionJour[j].VentRafales)
			conditionJour[j].VentP = vent_plein(conditionJour[j].VentDir)
			conditionJour[j].CondMeteo1, conditionJour[j].CondMeteo2, conditionJour[j].CondMeteo1se, conditionJour[j].CondMeteo2se = decoupage(conditionJour[j].CondMeteo)
			if conditionNuit[j].VentDir == "Calme" then
				conditionNuit[j].VentForce = "0"
			end
			conditionNuit[j].VentIcone = icone_vent(direction_vent(conditionNuit[j].VentDir), conditionNuit[j].VentForce)
			conditionNuit[j].RafalesIcone = icone_vent(direction_vent(conditionNuit[j].VentDir), conditionNuit[j].VentRafales)
			conditionNuit[j].VentP = vent_plein(conditionNuit[j].VentDir)
			conditionNuit[j].CondMeteo1, conditionNuit[j].CondMeteo2, conditionNuit[j].CondMeteo1se, conditionNuit[j].CondMeteo2se = decoupage(conditionNuit[j].CondMeteo)
			print("Prévision "..j.." Ok")
			
--Récupération quart de journée		
			local t = {"VentDir", "VentForce", "Icone", "CondMeteo", "TempMax", "TempMin", "TempMaxR", "TempMinR", "ProbPrec", "QPluie", "QNeige", "Humidite", "CouvNuage", "PointRosee", "Visibilite"}
			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
				conditionMatin[j] = {}
				local info3 = {}
				for i = 1,table.getn(t) do
					donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
					value=donee[i]:match("(%d*)")
					if value ~= "" then
						donee[i] = value
					end
					info3[t[i]] = donee[i]
				end
				conditionMatin[j] = info3
				io.close(file)
				if conditionMatin[j].VentDir == "CLM" then
					conditionMatin[j].VentDir = "Calme"
					conditionMatin[j].VentForce = "0"
				end
				conditionMatin[j].VentIcone = icone_vent(direction_vent(conditionMatin[j].VentDir), conditionMatin[j].VentForce)
				conditionMatin[j].VentP = vent_plein(conditionMatin[j].VentDir)
				conditionMatin[j].CondMeteo1, conditionMatin[j].CondMeteo2, conditionMatin[j].CondMeteo1se, conditionMatin[j].CondMeteo2se = decoupage(conditionMatin[j].CondMeteo)
				print("Matin "..j.." Ok")
			end

			
			if apresmidi == "oui" then
				local file = assert(io.open(repsauv.."/AM"..j, "r"))
				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				conditionAM[j] = {}
				local info3 = {}
				for i = 1,table.getn(t) do
					donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
					value=donee[i]:match("(%d*)")
					if value ~= "" then
						donee[i] = value
					end
					info3[t[i]] = donee[i]
				end
				conditionAM[j] = info3
				io.close(file)
				if conditionAM[j].VentDir == "CLM" then
					conditionAM[j].VentDir = "Calme"
					conditionAM[j].VentForce = "0"
				end
				conditionAM[j].VentIcone = icone_vent(direction_vent(conditionAM[j].VentDir), conditionAM[j].VentForce)
				conditionAM[j].VentP = vent_plein(conditionAM[j].VentDir)
				conditionAM[j].CondMeteo1, conditionAM[j].CondMeteo2, conditionAM[j].CondMeteo1se, conditionAM[j].CondMeteo2se = decoupage(conditionAM[j].CondMeteo)
				print("Apres Midi "..j.." Ok")
			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
				io.close(file)
				conditionSoiree[j] = {}
				local info3 = {}
				for i = 1,table.getn(t) do
					donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
					value=donee[i]:match("(%d*)")
					if value ~= "" then
						donee[i] = value
					end
					info3[t[i]] = donee[i]
				end
				conditionSoiree[j] = info3
				if conditionSoiree[j].VentDir == "CLM" then
					conditionSoiree[j].VentDir = "Calme"
					conditionSoiree[j].VentForce = "0"
				end
				conditionSoiree[j].VentIcone = icone_vent(direction_vent(conditionSoiree[j].VentDir), conditionSoiree[j].VentForce)
				conditionSoiree[j].VentP = vent_plein(conditionSoiree[j].VentDir)
				conditionSoiree[j].CondMeteo1, conditionSoiree[j].CondMeteo2, conditionSoiree[j].CondMeteo1se, conditionSoiree[j].CondMeteo2se = decoupage(conditionSoiree[j].CondMeteo)
				print("Soiree "..j.." Ok")
			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
				io.close(file)
				conditionNoct[j] = {}
				local info3 = {}
				for i = 1,table.getn(t) do
					donee[i]=donee[i]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
					value=donee[i]:match("(%d*)")
					if value ~= "" then
						donee[i] = value
					end
					info3[t[i]] = donee[i]
				end
				conditionNoct[j] = info3
				if conditionNoct[j].VentDir == "CLM" then
					conditionNoct[j].VentDir = "Calme"
					conditionNoct[j].VentForce = "0"
				end
				conditionNoct[j].VentIcone = icone_vent(direction_vent(conditionNoct[j].VentDir), conditionNoct[j].VentForce)
				conditionNoct[j].VentP = vent_plein(conditionNoct[j].VentDir)
				conditionNoct[j].CondMeteo1, conditionNoct[j].CondMeteo2, conditionNoct[j].CondMeteo1se, conditionNoct[j].CondMeteo2se = decoupage(conditionNoct[j].CondMeteo)
				print("Nuit "..j.." Ok")
			end
		end
		
		
		if huit == "oui" then
			local info4 = {}
			local info3 = {}
			for y = 1,nbFoisHuit do
				local file = assert(io.open(repsauv.."/huitHeures"..y, "r"))
				t = {"Heure", "TempMax", "TempMaxR", "Humidite", "Pluie", "Neige", "Verglas", "Vent", "UV", "CouvNuage", "PointRosee", "Icone"}

				local line = file:read()
				local i = 0
				local donee = {}
				for line in file:lines() do
					i = i+1
					donee[i] = line
				end
				io.close(file)
				for j = 1,8 do
					x=j+((y-1)*8)
					huitHeures[x] = {}
					info3[x] = {}
				end
				x=0
				for i = 1,table.getn(t) do
					for j = 1,8 do
						x=x+1
						local k=j+((y-1)*8)
						donee[x]=donee[x]:match("[%a%p%d"..pat.."]*: ([%s%a%p%d"..pat.."]*)")
						if i ~= 8 then
							value=donee[x]:match("(%d*)")
							if value ~= "" then
								donee[x] = value
							end
						end
						table.insert(info3[k],i,donee[x])
					end
				end
			end
			for j = 1,8*nbFoisHuit do
				info4 = {}
				for i = 1,table.getn(t) do
					info4[t[i]]=info3[j][i]
				end
				huitHeures[j]=info4
				huitHeures[j].VentForce, huitHeures[j].VentDir=huitHeures[j].Vent:match("(%d*) (%a*)")
				if huitHeures[j].VentDir == "CLM" then
					huitHeures[j].VentDir = "Calme"
					huitHeures[j].VentForce = "0"
				end
				huitHeures[j].VentIcone = icone_vent(direction_vent(huitHeures[j].VentDir), huitHeures[j].VentForce)
				huitHeures[j].VentP = vent_plein(huitHeures[j].VentDir)
			end
			print("huit heures Ok")
		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 MAJ == "0" then
			MAJ = "1"
		else
			MAJ = "0"
		end

		
		collectgarbage()
	end
	return ""
end

--en ligne mise à jour
function conky_Meteo_enligne()
	if start==1 then
--		os.execute("pkill -f \"python "..repscript.."/recmeteo.py adressWeb="..cmd1.." repsauv="..repsauv.." huitHeures="..huit.." nbFoisHuit="..nbFoisHuit.." nbJour="..jours.." interval="..delais.." matin="..matin.." apresmidi="..apresmidi.." soiree="..soiree.." nuit="..nuit.." notify="..notify.."\"")
		os.execute("python "..repscript.."/recmeteo_python_2.py adressWeb="..cmd1.." repsauv="..repsauv.." huitHeures="..huit.." nbFoisHuit="..nbFoisHuit.." nbJour="..jours.." interval="..delais.." matin="..matin.." apresmidi="..apresmidi.." soiree="..soiree.." nuit="..nuit.." notify="..notify.." id="..ID.." &")
	end
	if dermodif == nil or dermodif ~= conky_parse("${exec date -r "..repsauv.."/CC '+%s'}") then
		dermodif=conky_parse("${exec date -r "..repsauv.."/CC '+%s'}")
			if 3600 <= os.difftime(os.time(), tc) or start == 1 then
				start = 2
				tc = os.time()
				lunaison(r)
				print("lunaison Ok")
				if repsauv ~= nil then
--lancement sauvegarde
					sauvegarde()
				end
			end
			conky_Meteo_horsligne()

		collectgarbage()
	end
	return " "
end


--Retour d'information météo

--Condition courrante

function conky_Meteo_IconeM(r, x, y, w, h)
	conky_fDrawImage(r.."/icone_meteo/"..conditioncourante.Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_TempRes()
	return conditioncourante.Tempr
end

function conky_Meteo_TempAct()
	return conditioncourante.Temp
end

function conky_Meteo_CondMeteo()
	return conditioncourante.Cond
end

function conky_Meteo_CondMeteo1()
	return conditioncourante.CondMeteo1
end

function conky_Meteo_CondMeteo2()
	return conditioncourante.CondMeteo2
end

function conky_Meteo_CondMeteo1se()
	return conditioncourante.CondMeteo1se
end

function conky_Meteo_CondMeteo2se()
	return conditioncourante.CondMeteo2se
end

function conky_Meteo_Alerte()
	return conditioncourante.Alerte
end

function conky_Meteo_Alerte1()
	return conditioncourante.Alerte1
end

function conky_Meteo_Alerte2()
	return conditioncourante.Alerte2
end

function conky_Meteo_Alerte1se()
	return conditioncourante.Alerte1se
end

function conky_Meteo_Alerte2se()
	return conditioncourante.Alerte2se
end

function conky_Meteo_VentDir()
	return conditioncourante.VentDir
end

function conky_Meteo_VentDirP()
	return conditioncourante.VentPlein
end

function conky_Meteo_VentForce()
	return conditioncourante.VentForce
end

function conky_Meteo_IconeV(r, x, y, w, h)
	conky_fDrawImage(r.."/vent/"..conditioncourante.VentIcone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Humidite()
	return tonumber(conditioncourante.Humidite)
end

function conky_Meteo_Rose()
	return tonumber(conditioncourante.PointRosee)
end

function conky_Meteo_Pression()
	return tonumber(conditioncourante.Pression)
end

function conky_Meteo_Visibilite()
	return tonumber(conditioncourante.Visibilite)
end

function conky_Meteo_Date(format)
	format = string.gsub(format, "_", " ")
	return trad_date(os.date(format, conditioncourante.Date))
end

function conky_Meteo_Ville()
	return conditioncourante.Ville
end

function conky_Meteo_CouvNuage()
	return tonumber(conditioncourante.CouvNuage)
end

function conky_Meteo_Uv()
	return conditioncourante.Uv
end

function conky_Meteo_latitude()
	return conditioncourante.latitude
end

function conky_Meteo_longitude()
	return conditioncourante.longitude
end

function conky_Meteo_Heure()
	return os.date("%H", time)
end

function conky_Meteo_Minute()
	return os.date("%M", time)
end


--Prévision Météo

--Jour

function conky_Meteo_Jour_CondMeteo(j)
	return conditionJour[tonumber(j)].CondMeteo
end

function conky_Meteo_Jour_CondMeteo1(j)
	return conditionJour[tonumber(j)].CondMeteo1
end

function conky_Meteo_Jour_CondMeteo2(j)
	return conditionJour[tonumber(j)].CondMeteo2
end

function conky_Meteo_Jour_CondMeteo1se(j)
	return conditionJour[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Jour_CondMeteo2se(j)
	return conditionJour[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Jour_Temp(j)
	return tonumber(conditionJour[tonumber(j)].Temp)
end

function conky_Meteo_Jour_TempRes(j)
	return tonumber(conditionJour[tonumber(j)].TempRes)
end

function conky_Meteo_Jour_ProbPrec(j)
	return tonumber(conditionJour[tonumber(j)].ProbPrec)
end

function conky_Meteo_Jour_VentDir(j)
	return conditionJour[tonumber(j)].VentDir
end

function conky_Meteo_Jour_VentDirP(j)
	return conditionJour[tonumber(j)].VentP
end

function conky_Meteo_Jour_VentForce(j)
	return tonumber(conditionJour[tonumber(j)].VentForce)
end

function conky_Meteo_Jour_VentRafales(j)
	return tonumber(conditionJour[tonumber(j)].VentRafales)
end

function conky_Meteo_Jour_Uv(j)
	return tonumber(conditionJour[tonumber(j)].Uv)
end

function conky_Meteo_Jour_ProbOrage(j)
	return tonumber(conditionJour[tonumber(j)].ProbOrage)
end

function conky_Meteo_Jour_NivPrec(j)
	return tonumber(conditionJour[tonumber(j)].NivPrec)
end

function conky_Meteo_Jour_QPluie(j)
	return tonumber(conditionJour[tonumber(j)].QPluie)
end

function conky_Meteo_Jour_QNeige(j)
	return tonumber(conditionJour[tonumber(j)].QNeige)
end

function conky_Meteo_Jour_EVerglas(j)
	return tonumber(conditionJour[tonumber(j)].EVerglas)
end

function conky_Meteo_Jour_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..conditionJour[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Jour_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionJour[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Jour_IconeR(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionJour[tonumber(j)].RafalesIcone..".png", x, y, w, h)
	return ""
end


--Nuit

function conky_Meteo_Nuit_CondMeteo(j)
	return conditionNuit[tonumber(j)].CondMeteo
end

function conky_Meteo_Nuit_CondMeteo1(j)
	return conditionNuit[tonumber(j)].CondMeteo1
end

function conky_Meteo_Nuit_CondMeteo2(j)
	return conditionNuit[tonumber(j)].CondMeteo2
end

function conky_Meteo_Nuit_CondMeteo1se(j)
	return conditionNuit[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Nuit_CondMeteo2se(j)
	return conditionNuit[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Nuit_Temp(j)
	return tonumber(conditionNuit[tonumber(j)].Temp)
end

function conky_Meteo_Nuit_TempRes(j)
	return tonumber(conditionNuit[tonumber(j)].TempRes)
end

function conky_Meteo_Nuit_ProbPrec(j)
	return tonumber(conditionNuit[tonumber(j)].ProbPrec)
end

function conky_Meteo_Nuit_VentDir(j)
	return conditionNuit[tonumber(j)].VentDir
end

function conky_Meteo_Nuit_VentDirP(j)
	return conditionNuit[tonumber(j)].VentP
end

function conky_Meteo_Nuit_VentForce(j)
	return tonumber(conditionNuit[tonumber(j)].VentForce)
end

function conky_Meteo_Nuit_VentRafales(j)
	return tonumber(conditionNuit[tonumber(j)].VentRafales)
end

function conky_Meteo_Nuit_ProbOrage(j)
	return tonumber(conditionNuit[tonumber(j)].ProbOrage)
end

function conky_Meteo_Nuit_NivPrec(j)
	return tonumber(conditionNuit[tonumber(j)].NivPrec)
end

function conky_Meteo_Nuit_QPluie(j)
	return tonumber(conditionNuit[tonumber(j)].QPluie)
end

function conky_Meteo_Nuit_QNeige(j)
	return tonumber(conditionNuit[tonumber(j)].QNeige)
end

function conky_Meteo_Nuit_EVerglas(j)
	return tonumber(conditionNuit[tonumber(j)].EVerglas)
end

function conky_Meteo_Nuit_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..conditionNuit[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Nuit_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionNuit[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Nuit_IconeR(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionNuit[tonumber(j)].RafalesIcone..".png", x, y, w, h)
	return ""
end


--Infos sur la journée

function conky_Meteo_Jour(format, j)
	format = string.gsub(format, "_", " ")
	return trad_date(os.date(format, InfoJour[tonumber(j)].Jour))
end

function conky_Meteo_HLeverSoleil(j)
	return InfoJour[tonumber(j)].LeverSoleilH
end

function conky_Meteo_MLeverSoleil(j)
	return InfoJour[tonumber(j)].LeverSoleilM
end

function conky_Meteo_LeverSoleil(j)
	return tonumber((InfoJour[tonumber(j)].LeverSoleilH*60)+InfoJour[tonumber(j)].LeverSoleilM)
end

function conky_Meteo_HCoucherSoleil(j)
	return InfoJour[tonumber(j)].CoucherSoleilH
end

function conky_Meteo_MCoucherSoleil(j)
	return InfoJour[tonumber(j)].CoucherSoleilM
end

function conky_Meteo_CoucherSoleil(j)
	return tonumber((InfoJour[tonumber(j)].CoucherSoleilH*60)+InfoJour[tonumber(j)].CoucherSoleilM)
end

function conky_Meteo_HDureeJour(j)
	return InfoJour[tonumber(j)].CoucherSoleilH-InfoJour[tonumber(j)].LeverSoleilH
end

function conky_Meteo_MDureeJour(j)
	return os.date("%M", ((((InfoJour[tonumber(j)].CoucherSoleilH*3600)-3600)+(InfoJour[tonumber(j)].CoucherSoleilM*60))-(((InfoJour[tonumber(j)].LeverSoleilH*3600))+(InfoJour[tonumber(j)].LeverSoleilM*60))))
end

function conky_Meteo_Histo_Min(j)
	return InfoJour[tonumber(j)].Histo_Min
end

function conky_Meteo_Histo_Max(j)
	return InfoJour[tonumber(j)].Histo_Max
end


--Matin

function conky_Meteo_Matin_CondMeteo(j)
	return conditionMatin[tonumber(j)].CondMeteo
end

function conky_Meteo_Matin_CondMeteo1(j)
	return conditionMatin[tonumber(j)].CondMeteo1
end

function conky_Meteo_Matin_CondMeteo2(j)
	return conditionMatin[tonumber(j)].CondMeteo2
end

function conky_Meteo_Matin_CondMeteo1se(j)
	return conditionMatin[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Matin_CondMeteo2se(j)
	return conditionMatin[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Matin_TempMax(j)
	return tonumber(conditionMatin[tonumber(j)].TempMax)
end

function conky_Meteo_Matin_TempMin(j)
	return tonumber(conditionMatin[tonumber(j)].TempMin)
end

function conky_Meteo_Matin_TempMaxRes(j)
	return tonumber(conditionMatin[tonumber(j)].TempMaxR)
end

function conky_Meteo_Matin_TempMinRes(j)
	return tonumber(conditionMatin[tonumber(j)].TempMinR)
end

function conky_Meteo_Matin_ProbPrec(j)
	return tonumber(conditionMatin[tonumber(j)].ProbPrec)
end

function conky_Meteo_Matin_VentDir(j)
	return conditionMatin[tonumber(j)].VentDir
end

function conky_Meteo_Matin_VentDirP(j)
	return conditionMatin[tonumber(j)].VentP
end

function conky_Meteo_Matin_VentForce(j)
	return tonumber(conditionMatin[tonumber(j)].VentForce)
end

function conky_Meteo_Matin_QPluie(j)
	return tonumber(conditionMatin[tonumber(j)].QPluie)
end

function conky_Meteo_Matin_QNeige(j)
	return tonumber(conditionMatin[tonumber(j)].QNeige)
end

function conky_Meteo_Matin_Humidite(j)
	return tonumber(conditionMatin[tonumber(j)].Humidite)
end

function conky_Meteo_Matin_CouvNuage(j, r)
	if r == nil then r = 100 end
	local Couv = (tonumber(conditionMatin[tonumber(j)].CouvNuage) / 100) * r
	if Couv - math.floor(Couv) <= 0.5 then 
		Couv = math.floor(Couv)
	else
		Couv = math.ceil(Couv)
	end
	return Couv
end

function conky_Meteo_Matin_Rose(j)
	return tonumber(conditionMatin[tonumber(j)].PointRosee)
end

function conky_Meteo_Matin_Visibilite(j)
	return tonumber(conditionMatin[tonumber(j)].Visibilite)
end

function conky_Meteo_Matin_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..conditionMatin[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Matin_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionMatin[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end


--Après Midi

function conky_Meteo_AM_CondMeteo(j)
	return conditionAM[tonumber(j)].CondMeteo
end

function conky_Meteo_AM_CondMeteo1(j)
	return conditionAM[tonumber(j)].CondMeteo1
end

function conky_Meteo_AM_CondMeteo2(j)
	return conditionAM[tonumber(j)].CondMeteo2
end

function conky_Meteo_AM_CondMeteo1se(j)
	return conditionAM[tonumber(j)].CondMeteo1se
end

function conky_Meteo_AM_CondMeteo2se(j)
	return conditionAM[tonumber(j)].CondMeteo2se
end

function conky_Meteo_AM_TempMax(j)
	return tonumber(conditionAM[tonumber(j)].TempMax)
end

function conky_Meteo_AM_TempMin(j)
	return tonumber(conditionAM[tonumber(j)].TempMin)
end

function conky_Meteo_AM_TempMaxRes(j)
	return tonumber(conditionAM[tonumber(j)].TempMaxR)
end

function conky_Meteo_AM_TempMinRes(j)
	return tonumber(conditionAM[tonumber(j)].TempMinR)
end

function conky_Meteo_AM_ProbPrec(j)
	return tonumber(conditionAM[tonumber(j)].ProbPrec)
end

function conky_Meteo_AM_VentDir(j)
	return conditionAM[tonumber(j)].VentDir
end

function conky_Meteo_AM_VentDirP(j)
	return conditionAM[tonumber(j)].VentP
end

function conky_Meteo_AM_VentForce(j)
	return tonumber(conditionAM[tonumber(j)].VentForce)
end

function conky_Meteo_AM_QPluie(j)
	return tonumber(conditionAM[tonumber(j)].QPluie)
end

function conky_Meteo_AM_QNeige(j)
	return tonumber(conditionAM[tonumber(j)].QNeige)
end

function conky_Meteo_AM_Humidite(j)
	return tonumber(conditionAM[tonumber(j)].Humidite)
end

function conky_Meteo_AM_CouvNuage(j, r)
	if r == nil then r = 100 end
	local Couv = (tonumber(conditionAM[tonumber(j)].CouvNuage) / 100) * r
	if Couv - math.floor(Couv) <= 0.5 then 
		Couv = math.floor(Couv)
	else
		Couv = math.ceil(Couv)
	end
	return Couv
end

function conky_Meteo_AM_Rose(j)
	return tonumber(conditionAM[tonumber(j)].PointRosee)
end

function conky_Meteo_AM_Visibilite(j)
	return tonumber(conditionAM[tonumber(j)].Visibilite)
end

function conky_Meteo_AM_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..conditionAM[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_AM_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionAM[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end


--Soirée

function conky_Meteo_Soiree_CondMeteo(j)
	return conditionSoiree[tonumber(j)].CondMeteo
end

function conky_Meteo_Soiree_CondMeteo1(j)
	return conditionSoiree[tonumber(j)].CondMeteo1
end

function conky_Meteo_Soiree_CondMeteo2(j)
	return conditionSoiree[tonumber(j)].CondMeteo2
end

function conky_Meteo_Soiree_CondMeteo1se(j)
	return conditionSoiree[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Soiree_CondMeteo2se(j)
	return conditionSoiree[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Soiree_TempMax(j)
	return tonumber(conditionSoiree[tonumber(j)].TempMax)
end

function conky_Meteo_Soiree_TempMin(j)
	return tonumber(conditionSoiree[tonumber(j)].TempMin)
end

function conky_Meteo_Soiree_TempMaxRes(j)
	return tonumber(conditionSoiree[tonumber(j)].TempMaxR)
end

function conky_Meteo_Soiree_TempMinRes(j)
	return tonumber(conditionSoiree[tonumber(j)].TempMinR)
end

function conky_Meteo_Soiree_ProbPrec(j)
	return tonumber(conditionSoiree[tonumber(j)].ProbPrec)
end

function conky_Meteo_Soiree_VentDir(j)
	return conditionSoiree[tonumber(j)].VentDir
end

function conky_Meteo_Soiree_VentDirP(j)
	return conditionSoiree[tonumber(j)].VentP
end

function conky_Meteo_Soiree_VentForce(j)
	return tonumber(conditionSoiree[tonumber(j)].VentForce)
end

function conky_Meteo_Soiree_QPluie(j)
	return tonumber(conditionSoiree[tonumber(j)].QPluie)
end

function conky_Meteo_Soiree_QNeige(j)
	return tonumber(conditionSoiree[tonumber(j)].QNeige)
end

function conky_Meteo_Soiree_Humidite(j)
	return tonumber(conditionSoiree[tonumber(j)].Humidite)
end

function conky_Meteo_Soiree_CouvNuage(j, r)
	if r == nil then r = 100 end
	local Couv = (tonumber(conditionSoiree[tonumber(j)].CouvNuage) / 100) * r
	if Couv - math.floor(Couv) <= 0.5 then 
		Couv = math.floor(Couv)
	else
		Couv = math.ceil(Couv)
	end
	return Couv
end

function conky_Meteo_Soiree_Rose(j)
	return tonumber(conditionSoiree[tonumber(j)].PointRosee)
end

function conky_Meteo_Soiree_Visibilite(j)
	return tonumber(conditionSoiree[tonumber(j)].Visibilite)
end

function conky_Meteo_Soiree_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..conditionSoiree[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Soiree_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionSoiree[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end


--Nuit

function conky_Meteo_Noct_CondMeteo(j)
	return conditionNoct[tonumber(j)].CondMeteo
end

function conky_Meteo_Noct_CondMeteo1(j)
	return conditionNoct[tonumber(j)].CondMeteo1
end

function conky_Meteo_Noct_CondMeteo2(j)
	return conditionNoct[tonumber(j)].CondMeteo2
end

function conky_Meteo_Noct_CondMeteo1se(j)
	return conditionNoct[tonumber(j)].CondMeteo1se
end

function conky_Meteo_Noct_CondMeteo2se(j)
	return conditionNoct[tonumber(j)].CondMeteo2se
end

function conky_Meteo_Noct_TempMax(j)
	return tonumber(conditionNoct[tonumber(j)].TempMax)
end

function conky_Meteo_Noct_TempMin(j)
	return tonumber(conditionNoct[tonumber(j)].TempMin)
end

function conky_Meteo_Noct_TempMaxRes(j)
	return tonumber(conditionNoct[tonumber(j)].TempMaxR)
end

function conky_Meteo_Noct_TempMinRes(j)
	return tonumber(conditionNoct[tonumber(j)].TempMinR)
end

function conky_Meteo_Noct_ProbPrec(j)
	return tonumber(conditionNoct[tonumber(j)].ProbPrec)
end

function conky_Meteo_Noct_VentDir(j)
	return conditionNoct[tonumber(j)].VentDir
end

function conky_Meteo_Noct_VentDirP(j)
	return conditionNoct[tonumber(j)].VentP
end

function conky_Meteo_Noct_VentForce(j)
	return tonumber(conditionNoct[tonumber(j)].VentForce)
end

function conky_Meteo_Noct_QPluie(j)
	return tonumber(conditionNoct[tonumber(j)].QPluie)
end

function conky_Meteo_Noct_QNeige(j)
	return tonumber(conditionNoct[tonumber(j)].QNeige)
end

function conky_Meteo_Noct_Humidite(j)
	return tonumber(conditionNoct[tonumber(j)].Humidite)
end

function conky_Meteo_Noct_CouvNuage(j, r)
	if r == nil then r = 100 end
	local Couv = (tonumber(conditionNoct[tonumber(j)].CouvNuage) / 100) * r
	if Couv - math.floor(Couv) <= 0.5 then 
		Couv = math.floor(Couv)
	else
		Couv = math.ceil(Couv)
	end
	return Couv
end

function conky_Meteo_Noct_Rose(j)
	return tonumber(conditionNoct[tonumber(j)].PointRosee)
end

function conky_Meteo_Noct_Visibilite(j)
	return tonumber(conditionNoct[tonumber(j)].Visibilite)
end

function conky_Meteo_Noct_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..conditionNoct[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_Noct_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..conditionNoct[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end

--Huit prochaines heures


function conky_Meteo_huitHeures_VentDirP(j)
	return huitHeures[tonumber(j)].VentP
end

function conky_Meteo_huitHeures_IconeV(r, x, y, w, h, j)
	conky_fDrawImage(r.."/vent/"..huitHeures[tonumber(j)].VentIcone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_huitHeures_Heure(j)
	return tonumber(huitHeures[tonumber(j)].Heure)
end

function conky_Meteo_huitHeures_IconeM(r, x, y, w, h, j)
	conky_fDrawImage(r.."/icone_meteo/"..huitHeures[tonumber(j)].Icone..".png", x, y, w, h)
	return ""
end

function conky_Meteo_huitHeures_Temp(j)
	return tonumber(huitHeures[tonumber(j)].TempMax)
end

function conky_Meteo_huitHeures_TempR(j)
	return tonumber(huitHeures[tonumber(j)].TempMaxR)
end

function conky_Meteo_huitHeures_VentDir(j)
	return huitHeures[tonumber(j)].VentDir
end

function conky_Meteo_huitHeures_VentForce(j)
	return tonumber(huitHeures[tonumber(j)].VentForce)
end

function conky_Meteo_huitHeures_Humidite(j)
	return tonumber(huitHeures[tonumber(j)].Humidite)
end

function conky_Meteo_huitHeures_CouvNuage(j)
	return tonumber(huitHeures[tonumber(j)].CouvNuage)
end

function conky_Meteo_huitHeures_Rose(j)
	return tonumber(huitHeures[tonumber(j)].PointRosee)
end

function conky_Meteo_huitHeures_ProbPluie(j)
	return tonumber(huitHeures[tonumber(j)].Pluie)
end

function conky_Meteo_huitHeures_ProbNeige(j)
	return tonumber(huitHeures[tonumber(j)].Neige)
end

function conky_Meteo_huitHeures_ProbVerglas(j)
	return tonumber(huitHeures[tonumber(j)].Verglas)
end

function conky_Meteo_huitHeures_Uv(j)
	return tonumber(huitHeures[tonumber(j)].UV)
end

--Lunaison

function conky_Lune_ephemerides()
	return ephemerides
end

function conky_Lune_ephemerides1()
	return ephemerides1
end

function conky_Lune_ephemerides2()
	return ephemerides2
end

function conky_Lune_Visibilite()
	return Visibilite
end

function conky_Lune_Phases()
	return Phases
end

function conky_Lune_Phases1()
	return Phases1
end

function conky_Lune_Phases2()
	return Phases2
end

function conky_Lune_Noeudlunaire()
	return Noeud_lunaire
end

function conky_Lune_Apogee()
	return Apogee
end

function conky_Lune_Perigee()
	return Perigee
end

function conky_Lune_Distance()
	return Distance
end

function conky_Lune_Age()
	return Age
end

function conky_Lune_HLeverLune()
	return Lever_LuneHeure
end

function conky_Lune_MLeverLune()
	return Lever_LuneMinute
end

function conky_Lune_HCoucherLune()
	return Coucher_LuneHeure
end

function conky_Lune_MCoucherLune()
	return Coucher_LuneMinute
end

function conky_Lune_EclipsePartielle(format)
	if format == nil then format = "%A_%d_%B_%Y_à_%H:%M" end
	format = string.gsub(format, "_", " ")
	return trad_date(os.date(format, Eclipse_partielle))
end

function conky_Lune_EclipseTotal()
	if format == nil then format = "%A_%d_%B_%Y_à_%H:%M" end
	format = string.gsub(format, "_", " ")
	return trad_date(os.date(format, Eclipse_total))
end

--Fonction d'affichage
function conky_fDrawImage(path,x,y,w,h,arc)

	path = string.gsub(path, "~", home)
	path = string.gsub(path, "$HOME", home)

	local cs = cairo_xlib_surface_create(conky_window.display, conky_window.drawable, conky_window.visual, conky_window.width, conky_window.height)
	
	local function fDrawImage(path,x,y,w,h,arc)
		x=x+(w/2)
		y=y+(h/2)
		local img =  cairo_image_surface_create_from_png(path)
		local w_img, h_img = cairo_image_surface_get_width (img), cairo_image_surface_get_height (img)

		local cr = cairo_create (cs)
		cairo_translate (cr, x, y)

		if arc then
			cairo_rotate (cr, arc)
		end

		cairo_scale (cr, w/w_img, h/h_img)
		cairo_set_source_surface (cr, img, -w_img/2, -h_img/2)
		cairo_paint (cr)
		cairo_destroy(cr)
		cairo_surface_destroy (img)
	end
	fDrawImage(path,x,y,w,h,arc)
	cairo_surface_destroy(cs)
	return ""
end


--Informations sur le lua
function conky_Version()
	return Version
end

function conky_Meteo_fichier_init()
	return fichier_init
end

function conky_Meteo_etat_MAJ()
	return MAJ
end


--Sauvegarde des données
function sauvegarde()

--sauvegarde lunaison
	local file = assert(io.open(repsauv.."/lunaison", "w+"))
	file:write ("\n", ephemerides, "\n")
	file:write (ephemerides1, "\n")
	file:write (ephemerides2, "\n")
	file:write (Visibilite, "\n")
	file:write (Phases, "\n")
	file:write (Phases1, "\n")
	file:write (Phases2, "\n")
	file:write (Noeud_lunaire, "\n")
	file:write (Apogee, "\n")
	file:write (Perigee, "\n")
	file:write (Distance, "\n")
	file:write (Age, "\n")
	file:write (Lever_LuneHeure, "\n")
	file:write (Lever_LuneMinute, "\n")
	file:write (Coucher_LuneHeure, "\n")
	file:write (Coucher_LuneMinute, "\n")
	file:write (Eclipse_partielle, "\n")
	file:write (Eclipse_total, "\n")
	io.close(file)
	
--modification des droits utilisateur
	os.execute('chmod o+rw- '..r..'/*lun*')
	os.execute('chmod -R o+rw- '..repsauv)
	os.execute('chmod -R o+rw- '..Rep)
end
Didier-T a écrit :

montre moi deux choses pour les icones.
ton retour terminal actuel, et le contenu de ton conkyrc.

retour terminal

└─> 
Conky: desktop window (1400003) is subwindow of root window (158)
Conky: window type - desktop
Conky: drawing to created window (0x3a00001)
Conky: drawing to double buffer
	version = v1.08
	web = http://www.accuweather.com/fr/fr/augerolles/132213/weather-forecast/132213
	Pévision Nb jours = 5
	Pévision Matin = non
	Pévision Après Midi = oui
	Pévision Soirée = non
	Pévision Nuit = oui
	Prévision sur 8 heures = non
	nbFoisHuit= 2
	Délais = 15
	Chemin de travail = /tmp
	Palier = 20
	Chemin de sauvegarde = /home/maan/.conky/conky-meteo/meteo/reptravail
	Chemin script = /home/maan/.conky/conky23/conky/script
	Notification = non
	ID = 4610
Condition courante Ok
Prévision 1 Ok
Apres Midi 1 Ok
Nuit 1 Ok
Prévision 2 Ok
Apres Midi 2 Ok
Nuit 2 Ok
Prévision 3 Ok
Apres Midi 3 Ok
Nuit 3 Ok
Prévision 4 Ok
Apres Midi 4 Ok
Nuit 4 Ok
Prévision 5 Ok
Apres Midi 5 Ok
Nuit 5 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Version = 1.03
Jour 1 Ok
lunaison Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
AM 1 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Nuit 1 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Jour 2 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
AM 2 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Nuit 2 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Jour 3 Ok
AM 3 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Nuit 3 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Jour 4 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
AM 4 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Nuit 4 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Jour 5 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
AM 5 Ok
Nuit 5 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
CC Ok
mise a jour en : 14.2211539745
Condition courante Ok
Prévision 1 Ok
Apres Midi 1 Ok
Nuit 1 Ok
Prévision 2 Ok
Apres Midi 2 Ok
Nuit 2 Ok
Prévision 3 Ok
Apres Midi 3 Ok
Nuit 3 Ok
Prévision 4 Ok
Apres Midi 4 Ok
Nuit 4 Ok
Prévision 5 Ok
Apres Midi 5 Ok
Nuit 5 Ok
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_AM_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1287: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Jour_IconeR execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:966: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_Noct_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1479: attempt to index field '?' (a nil value)
Conky: llua_do_call: function conky_Meteo_IconeM execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)
Conky: llua_do_call: function conky_Meteo_IconeV execution failed: /home/maan/.conky/conky23/conky/script/meteo2.lua:1640: attempt to perform arithmetic on local 'x' (a string value)

et mon conkyrc

	# -- 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
	# -- Window specifications -- #

	own_window yes
	own_window_type desktop
	own_window_transparent yes
	own_window_hints undecorate,below,sticky,skip_taskbar,skip_pager

	border_inner_margin 0
	border_outer_margin 0

	minimum_size 100 100
	maximum_width 1440
	

	alignment tm
	gap_x -14
	gap_y 20

	# -- Graphics settings -- #
	draw_shades no
	draw_outline no
	draw_borders no
	draw_graph_borders no

	# -- Text settings -- #
	use_xft yes
	xftfont MaiandraGD:size=24
	xftalpha 0.4

	uppercase no

	default_color 8b8b8b
	# -- Déclaration template -- #
	template0 ${lua fDrawImage ~/.conky/conky23/meteo/images/\1 \2 \3 \4 \5} # -- images fond -- #
	template1 ${lua Meteo_\1 \2 \3 \4 \5 \6} # -- gestion météo --#
	template2 ${lua Meteo_\1 \2 \3 \4 \5 \6 \7} # -- icônes météo -- \2=répertoire icônes \3=position \4=taille \5=jour (pour les prévisions) #
	template3 ${lua Lune_\1} 
	template4 ${lua_parse Images_\1 \2 \3 60 \4} # -- Appelle image -- \2=position \3=taille \4=jour (pour les prévisions) #

	
	lua_load ~/.conky/conky23/conky/script/meteo2.lua

	lua_startup_hook init ~/.conky/conky23/conky/script/meteo.cfg
	lua_load ~/.conky/conky23/conky/script/ring_chrono.lua
	lua_draw_hook_post main_rings
	lua_load ~/.conky/conky23/conky/script/chrono.lua
	lua_draw_hook_pre conky_main
	
	
	TEXT
#### Lancement du script récupérant les données météo ####
${template1 Maj}
#### Version recmeteo #####
${color FF6600}${goto 450}${voffset -10}${font Syndrome BRK:size=12}recmeteo
${goto 462.5}${voffset 5}v.1.20
#### Heure #####
${voffset 127}${goto 445}${font Zoidal BRK:size=10}${color 0602FF}${time %H}${goto 497}${time %M}${voffset -08}${goto 487}${font Zoidal BRK:size=05}h
${voffset -45}${goto 472}${font Zoidal BRK:size=10}${time %S}
##### ville #####
${voffset 205}${goto 380}${color FF6600}${font Syndrome BRK:size=25}${template1 Ville}
##### température actuelle #####
${voffset -190}${goto 605}${font URW Chancery L:style=Bold:size=25}${if_match ${template1 TempAct}<4}${color red}${blink ${template1 TempAct}°}${else}${color FF6600}${blink ${template1 TempAct}°}${endif}
${font URW Chancery L:style=Bold:size=10}${color white}${goto 623}Ressentit
${goto 605}${font URW Chancery L:style=Bold:size=25}${if_match ${template1 TempRes 1}<4}${color 0602FF}${blink ${template1 TempRes 1}°}${else}${color 66FFFF}${blink ${template1 TempRes 1}°}${endif}
##### Affichage conditions météo #####
${voffset -128}${font URW Chancery L:style=Bold:size=12}${color white}${template1  CondMeteo}
##### Info soleil ####
${voffset 70}${color red}Levé ${color 0602FF}: ${template1 HLeverSoleil 1}h${template1 MLeverSoleil 1}
Couché : ${color red}${template1 HCoucherSoleil 1}h${template1 MCoucherSoleil 1}
##### Affichage infos vent ${color ffe595}######
${voffset -175}${color ffe595}${font Helvetica LT Std:style=Bold:size=10}${goto 305}${template1 VentDirP}          
${voffset 40}${color ffe595}${font Helvetica LT Std:style=Bold:size=10}${goto 320}${template1 VentForce} km/h
##### Affichage Probabilité de précipitations Jour/Nuit #####
${voffset -63}${color 522BAF}${font Helvetica LT Std:style=Bold:size=10}${goto 213}${template1 Jour_ProbOrage 1}${voffset 101}${goto 362}${template1 Nuit_ProbOrage 1}
##### Affichage temperature #####
${voffset -70}${goto 185}${color 66FFFF}${template1 Jour_Temp 1}°${voffset 98}${goto 330}${template1 Nuit_Temp 1}°
##### Affichage conditions météo #####
${voffset -215}${goto 235}${font URW Chancery L:style=condensed:size=12}${color white} ${template1  AM_CondMeteo1 1}${voffset 160}${goto 410} ${template1  Noct_CondMeteo1 1}
 ${voffset 100}${template1  AM_CondMeteo2 1}${goto 270} ${template1  Noct_CondMeteo2 1}
##### Affichage lunaison #####
${voffset -247}${font URW Chancery L:style=Bold:size=15}${color FEEFEF}${goto 795}${template3 ephemerides1}
${goto 900}${voffset 10}${font URW Chancery L:style=Bold:size=10}Couché: ${template3 HCoucherLune}h${template3 MCoucherLune}
${goto 763}Levé: ${template3 HLeverLune}h${template3 MLeverLune} 
${font URW Chancery L:style=Bold:size=15}${voffset 15}${goto 850}${template3 ephemerides2}
${font URW Chancery L:style=Bold:size=12}${goto 763}${color 0602FF}${template3 Age}
#### données previsionnelles####
${voffset -270}${font Ubuntu :size=10:style=bold}${color 522BAF}${goto 41}${template1 Jour_ProbOrage 2}${goto 219}${template1 Jour_ProbOrage 3}${goto 641}${template1 Jour_ProbOrage 4}${goto 824}${template1 Jour_ProbOrage 5}
##### Affichage temperature des jours à venir #####
${voffset 30}${goto 15}${font Ubuntu :size=07:style=bold}${color FFBDA8}Max: ${voffset -04}${font Ubuntu :size=10:style=bold}${template1 Jour_Temp 2}°${color white}${goto 122}${font Ubuntu :size=07:style=bold}Min:  ${color 66FFFF}${font Ubuntu :size=10:style=bold}${voffset -04}${template1 Nuit_Temp 2}°${goto 197}${color FFBDA8}${font Ubuntu :size=07:style=bold}Max:  ${font Ubuntu :size=10:style=bold}${voffset -04}${template1 Jour_Temp 3}°${goto 307}${color white}${font Ubuntu :size=07:style=bold}Min:  ${color 66FFFF}${voffset -04}${font Ubuntu :size=10:style=bold}${template1 Nuit_Temp 3}°${goto 615}${color FFBDA8}${font Ubuntu :size=07:style=bold}Max:  ${voffset -04}${font Ubuntu :size=10:style=bold}${template1 Jour_Temp 4}°${goto 725}${color white}${font Ubuntu :size=07:style=bold}Min:  ${voffset -04}${color 66FFFF}${font Ubuntu :size=10:style=bold}${template1 Nuit_Temp 4}°${goto 805}${color FFBDA8}${font Ubuntu :size=07:style=bold}Max:  ${voffset -04}${font Ubuntu :size=10:style=bold}${template1 Jour_Temp 5}°${goto 910}${color white}${font Ubuntu :size=07:style=bold}Min:  ${voffset -04}${color 66FFFF}${font Ubuntu :size=10:style=bold}${template1 Nuit_Temp 5}°
##### Affichage vitesse du vent #####
${voffset -85}${font Ubuntu :size=9:style=bold}${color red}${goto 70}${template1 Jour_VentForce 2}${font Ubuntu :size=6:style=bold} km/h${goto 250}${voffset -4}${font Ubuntu :size=9:style=bold}${template1 Jour_VentForce 3}${font Ubuntu :size=6:style=bold} km/h${goto 668}${voffset -4}${font Ubuntu :size=9:style=bold}${template1 Jour_VentForce 4}${font Ubuntu :size=6:style=bold} km/h${goto 855}${voffset -4}${font Ubuntu :size=9:style=bold}${template1 Jour_VentForce 5}${font Ubuntu :size=6:style=bold} km/h
##### Affichage Date #####
${voffset -50}${font Syndrome BRK:size=15}${color 522BAF}${goto 40}${template1 Jour %a_%d 2}${goto 230}${template1 Jour %a_%d 3}${goto 650}${template1 Jour %a_%d 4}${goto 840}${template1 Jour %a_%d 5}
##### Heure mise à jour #####
${voffset 110}${color ffe595}${font Syndrome BRK:size=12}${goto 866} mise a jour  
${voffset 10}${goto 915}${template1 Heure}h${template1 Minute}

${voffset -1630}
#### Affichage des cadres utilisés dans le conky ####
#### premier cadre ####
${image ~/.conky/conky23/conky/script/images/fond1.png -p 0,80 -s 173x91}
#### Second cadre ####
${image ~/.conky/conky23/conky/script/images/fond2.png -p 184,80 -s 179x90}
#### troisième cadre ####
${image ~/.conky/conky23/conky/script/images/fond3.png -p 605,80 -s 179x90}
#### quatrieme cadre ####
${image ~/.conky/conky23/conky/script/images/fond4.png -p 792,80 -s 177x90}
#### icônes premier cadre ####
${template2 AM_IconeM ~/.conky/conky23/conky/icones/icone_meteo 2,95 86x52 2}
${template2 Jour_IconeR ~/.conky/conky23/conky/icones/vent 77,130 25x25 2}
${template2 Noct_IconeM ~/.conky/conky23/conky/icones/icone_meteo 90,95 86x52 2}
#### icônes Second cadre ####
${template2 AM_IconeM ~/.conky/conky23/conky/icones/icone_meteo 180,95 86x52 3}
${template2 Jour_IconeR ~/.conky/conky23/conky/icones/vent 260,130 25x25 3}
${template2 Noct_IconeM ~/.conky/conky23/conky/icones/icone_meteo 270,95 86x52 3}
#### icônes troisième cadre ####
${template2 AM_IconeM ~/.conky/conky23/conky/icones/icone_meteo 602,95 86x52 4}
${template2 Jour_IconeR ~/.conky/conky23/conky/icones/vent 680,130 25x25 4}
${template2 Noct_IconeM ~/.conky/conky23/conky/icones/icone_meteo 700,95 86x52 4}
#### icônes quatrieme cadre ####
${template2 AM_IconeM ~/.conky/conky23/conky/icones/icone_meteo 785,95 86x52 5}
${template2 Jour_IconeR ~/.conky/conky23/conky/icones/vent 865,130 25x25 5}
${template2 Noct_IconeM ~/.conky/conky23/conky/icones/icone_meteo 890,95 86x52 5}
#### icones du moment ####
${template2 IconeM ~/.conky/conky23/conky/icones/icone_meteo 8,185 132x79 1}
${template2 IconeV ~/.conky/conky23/conky/icones/vent 335,225 44x44}
${template2 AM_IconeM ~/.conky/conky23/conky/icones/icone_meteo 150,205 132x79 1}
${template2 Noct_IconeM ~/.conky/conky23/conky/icones/icone_meteo 300,305 132x79 1}
${image /tmp/lune.png -p 830,260 -s 63x63 -f 60}

Ubuntu_studio 14.04

Hors ligne