Résolu le 26-04-19 [Résolu] Problème conky et accuweather

Bureaux,conky et autres personnalisations esthétiques.
Avatar du membre
AngeDesOmbres
Messages : 666
Enregistré le : ven. 12 août 2016 21:30
Localisation : Entre l'ombre et la lumière

[Résolu] Problème conky et accuweather

Message par AngeDesOmbres »

Salut à tous
J'ai installé le conky de loutch qu'il à partagé sur un autre poste
loutch a écrit :Hello

Donc voici le pack méteo accuweather @ décompresser dans votre Home

https://drive.google.com/open?id=0Bygxc ... jNOU1hUbEU

Image

La francisation n'est pas complète mais il suffit d'ouvrir le fichier 1_accuweather et de francisé le texte à la suite de la lgne 275 comme celle-ci pour exemple Cloudy

Code : Tout sélectionner

sed -i -e 's/Cloudy/Nuageux/' $HOME/1_accuweather/curr_cond-fr

@+

edit :

changer ceci :

Code : Tout sélectionner

${execi 600 bash $HOME/1_accuweather/1_accuweather -f}
par ceci :

Code : Tout sélectionner

${execi 600 bash $HOME/1_accuweather/1_accuweather -f -h}
J'ai bien fait les changements conseillés et aussi changer l'adresse de accuweather

Code : Tout sélectionner

http://www.accuweather.com/en/fr/colmar/131856/weather-forecast/131856
Mais quand je lance conky sa fonctionne mais ne recupère pas les infos pour la ville de colmar je reste toujours sur Sarreguemines et j'ai des erreurs dans le terminal.

Code : Tout sélectionner

angedesombres@vlad-pc ~ $ conky
conky: llua_load: cannot open /home/angedesombres/.conky/lua/image.lua: Aucun fichier ou dossier de ce type
conky: desktop window (1a00026) is subwindow of root window (f7)
conky: window type - normal
conky: drawing to created window (0x600001)
conky: drawing to double buffer
conky: forked to background, pid is 4824
conky: Unable to load image '/home/angedesombres/1_accuweather/0.png'
conky: Unable to load image '/home/angedesombres/1_accuweather/0.png'
conky: Unable to load image '/home/angedesombres/1_accuweather/0.png'
/dev/sda: open: Permission non accordée

wget: aucun processus trouvé
--2016-10-29 14:01:43--  http://www.accuweather.com/en/fr/colmar/131856/current-weather/131856
Résolution de www.accuweather.com (www.accuweather.com)… 92.123.182.88, 92.123.182.49
Connexion à www.accuweather.com (www.accuweather.com)|92.123.182.88|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/curr_cond_raw»

/home/angedesombres     [  <=>               ] 106,35K   305KB/s    in 0,3s    

2016-10-29 14:01:44 (305 KB/s) - «/home/angedesombres/1_accuweather/curr_cond_raw» enregistré [108906]

--2016-10-29 14:01:44--  http://www.accuweather.com/en/fr/colmar/131856/daily-weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 92.123.182.88, 92.123.182.49
Connexion à www.accuweather.com (www.accuweather.com)|92.123.182.88|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/first_days_raw»

/home/angedesombres     [  <=>               ] 106,45K   302KB/s    in 0,4s    

2016-10-29 14:01:44 (302 KB/s) - «/home/angedesombres/1_accuweather/first_days_raw» enregistré [109000]

--2016-10-29 14:01:44--  http://www.accuweather.com/en/fr/colmar/131856/daily-weather-forecast/131856?day=6
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.40, 88.221.83.43, 88.221.83.42, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.40|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/last_days_raw»

/home/angedesombres     [  <=>               ] 106,24K   307KB/s    in 0,3s    

2016-10-29 14:01:45 (307 KB/s) - «/home/angedesombres/1_accuweather/last_days_raw» enregistré [108786]

wget: aucun processus trouvé
rm: impossible de supprimer '/home/angedesombres/1_accuweather/hourly_*.png': Aucun fichier ou dossier de ce type
--2016-10-29 14:01:45--  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.42, 88.221.83.41, 88.221.83.40, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.42|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/hourly_raw1»

/home/angedesombres     [  <=>               ] 120,25K   309KB/s    in 0,4s    

2016-10-29 14:01:51 (309 KB/s) - «/home/angedesombres/1_accuweather/hourly_raw1» enregistré [123134]

--2016-10-29 14:01:51--  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856?hour=22
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.42, 88.221.83.43, 88.221.83.41, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.42|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/hourly_raw2»

/home/angedesombres     [  <=>               ] 120,85K   305KB/s    in 0,4s    

2016-10-29 14:01:52 (305 KB/s) - «/home/angedesombres/1_accuweather/hourly_raw2» enregistré [123747]

--2016-10-29 14:01:54--  http://www.accuweather.com/fr/fr/sarreguemines/135050/weather-forecast/135050
Résolution de www.accuweather.com (www.accuweather.com)… 2.22.112.195, 2.22.112.218
Connexion à www.accuweather.com (www.accuweather.com)|2.22.112.195|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/Alertes»

/home/angedesombres     [  <=>               ] 118,97K   305KB/s    in 0,4s    

2016-10-29 14:01:55 (305 KB/s) - «/home/angedesombres/1_accuweather/Alertes» enregistré [121822]

/dev/sda: open: Permission non accordée

/dev/sda: open: Permission non accordée

/dev/sda: open: Permission non accordée

/dev/sda: open: Permission non accordée

/dev/sda: open: Permission non accordée

wget: aucun processus trouvé
--2016-10-29 14:11:55--  http://www.accuweather.com/en/fr/colmar/131856/current-weather/131856
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.113.40, 88.221.113.42
Connexion à www.accuweather.com (www.accuweather.com)|88.221.113.40|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/curr_cond_raw»

/home/angedesombres     [  <=>               ] 106,30K   279KB/s    in 0,4s    

2016-10-29 14:11:55 (279 KB/s) - «/home/angedesombres/1_accuweather/curr_cond_raw» enregistré [108848]

--2016-10-29 14:11:55--  http://www.accuweather.com/en/fr/colmar/131856/daily-weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 92.123.182.49, 92.123.182.88
Connexion à www.accuweather.com (www.accuweather.com)|92.123.182.49|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/first_days_raw»

/home/angedesombres     [  <=>               ] 106,35K   291KB/s    in 0,4s    

2016-10-29 14:11:56 (291 KB/s) - «/home/angedesombres/1_accuweather/first_days_raw» enregistré [108903]

--2016-10-29 14:11:56--  http://www.accuweather.com/en/fr/colmar/131856/daily-weather-forecast/131856?day=6
Résolution de www.accuweather.com (www.accuweather.com)… 92.123.182.88, 92.123.182.49
Connexion à www.accuweather.com (www.accuweather.com)|92.123.182.88|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/last_days_raw»

/home/angedesombres     [  <=>               ] 106,18K   293KB/s    in 0,4s    

2016-10-29 14:11:57 (293 KB/s) - «/home/angedesombres/1_accuweather/last_days_raw» enregistré [108725]

wget: aucun processus trouvé
rm: impossible de supprimer '/home/angedesombres/1_accuweather/hourly_*.png': Aucun fichier ou dossier de ce type
--2016-10-29 14:11:57--  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.41, 88.221.83.40, 88.221.83.42, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.41|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.40|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.42|:80… connecté.
requête HTTP transmise, en attente de la réponse… Aucune donnée reçue.
Nouvel essai.

--2016-10-29 14:12:36--  (essai :  2)  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.42|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.43|:80… connecté.
requête HTTP transmise, en attente de la réponse… Aucune donnée reçue.
Nouvel essai.

--2016-10-29 14:12:44--  (essai :  3)  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.43|:80… échec : Connexion refusée.
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.40, 88.221.83.43, 88.221.83.42, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.40|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.43|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.42|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.41|:80… échec : Connexion refusée.
--2016-10-29 14:13:00--  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856?hour=22
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.41, 88.221.83.40, 88.221.83.42, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.41|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.40|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.42|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.43|:80… connecté.
requête HTTP transmise, en attente de la réponse… Aucune donnée reçue.
Nouvel essai.

--2016-10-29 14:13:05--  (essai :  2)  http://www.accuweather.com/en/fr/colmar/131856/hourly-weather-forecast/131856?hour=22
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.43|:80… échec : Connexion refusée.
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.41, 88.221.83.42, 88.221.83.43, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.41|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/hourly_raw2»

/home/angedesombres     [   <=>              ] 120,78K   291KB/s    in 0,4s    

2016-10-29 14:13:52 (291 KB/s) - «/home/angedesombres/1_accuweather/hourly_raw2» enregistré [123679]

--2016-10-29 14:13:54--  http://www.accuweather.com/fr/fr/sarreguemines/135050/weather-forecast/135050
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.40, 88.221.83.41, 88.221.83.42, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.40|:80… connecté.
requête HTTP transmise, en attente de la réponse… Aucune donnée reçue.
Nouvel essai.

--2016-10-29 14:14:27--  (essai :  2)  http://www.accuweather.com/fr/fr/sarreguemines/135050/weather-forecast/135050
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.40|:80… échec : Connexion refusée.
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.41|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/Alertes»

/home/angedesombres     [   <=>              ] 118,93K   227KB/s    in 0,5s    

2016-10-29 14:14:33 (227 KB/s) - «/home/angedesombres/1_accuweather/Alertes» enregistré [121788]
Je sais déjà que j'ai pas de conky lua donc la première ne me gènes pas plus que ça pour le moment.
Que faire pour que cela fonctionne ?
Mes connaissances en conky sont d'environ -100000 :lol:
Les "doc" du conky j'ai besoin de vous.

Merci d'avance.

Bye.
Modifié en dernier par AngeDesOmbres le mar. 1 nov. 2016 12:54, modifié 3 fois.
Image
Pingouin dans les champs, hiver très méchant !!!
Qui pisse loin ménage ses chaussures !!! :D

zeb
Messages : 16473
Enregistré le : ven. 19 juin 2015 22:13
Localisation : plus ici

Re: Problème conky et accuweather

Message par zeb »

Salut ange ;)
J'ai parcouru ton code(en diagonale :oops: ) mais ouvre ton fichier et fais un recherche de "sarreguemines" (sans les guillemets ;) ) j'en ai repéré :shock:
Ensuite j'ai remarqué que tu as :
http://www.accuweather.com/en/fr/colmar/131856/current-weather/131856
alors que normalement c'est en fr (http://www.accuweather.com/fr/fr/colmar ... ast/131856" onclick="window.open(this.href);return false;)

Il faudrait que je l'installe sur mon autre systeme (oui, celui ci "pas touche" :mrgreen: )
Donne des nouvelles et au plus tard je regarde demain ;)

Avatar du membre
AngeDesOmbres
Messages : 666
Enregistré le : ven. 12 août 2016 21:30
Localisation : Entre l'ombre et la lumière

Re: Problème conky et accuweather

Message par AngeDesOmbres »

j'ai parcourue les fichiers modifié tous se qui concerne "sarreguemines" j'ai aussi changer l'adresse internet pour la récupération des infos mais j'ai toujours le même problème...

Code : Tout sélectionner

vlad-pc ~ $ conky
conky: llua_load: cannot open /home/angedesombres/.conky/lua/image.lua: Aucun fichier ou dossier de ce type
conky: desktop window (1a00026) is subwindow of root window (f7)
conky: window type - normal
conky: drawing to created window (0x600001)
conky: drawing to double buffer
conky: forked to background, pid is 2455
/dev/sda: open: Permission non accordée
wget: aucun processus trouvé
--2016-10-29 19:18:54--  http://www.accuweather.com/fr/fr/colmar/131856/current-weather/131856
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.113.42, 88.221.113.40
Connexion à www.accuweather.com (www.accuweather.com)|88.221.113.42|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/curr_cond_raw»

/home/angedesombres     [  <=>               ]  88,89K   297KB/s    in 0,3s    

2016-10-29 19:18:55 (297 KB/s) - «/home/angedesombres/1_accuweather/curr_cond_raw» enregistré [91025]

--2016-10-29 19:18:55--  http://www.accuweather.com/fr/fr/colmar/131856/daily-weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 2.16.117.34, 2.16.117.24, 2.16.117.11, ...
Connexion à www.accuweather.com (www.accuweather.com)|2.16.117.34|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/first_days_raw»

/home/angedesombres     [     <=>            ]  89,27K  97,3KB/s    in 0,9s    

2016-10-29 19:18:57 (97,3 KB/s) - «/home/angedesombres/1_accuweather/first_days_raw» enregistré [91414]

--2016-10-29 19:18:57--  http://www.accuweather.com/fr/fr/colmar/131856/daily-weather-forecast/131856?day=6
Résolution de www.accuweather.com (www.accuweather.com)… 2.16.117.34, 2.16.117.24, 2.16.117.11, ...
Connexion à www.accuweather.com (www.accuweather.com)|2.16.117.34|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/last_days_raw»

/home/angedesombres     [   <=>              ]  89,26K   152KB/s    in 0,6s    

2016-10-29 19:18:58 (152 KB/s) - «/home/angedesombres/1_accuweather/last_days_raw» enregistré [91398]

wget: aucun processus trouvé
rm: impossible de supprimer '/home/angedesombres/1_accuweather/hourly_*.png': Aucun fichier ou dossier de ce type
--2016-10-29 19:18:58--  http://www.accuweather.com/fr/fr/colmar/131856/hourly-weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 2.16.117.27, 2.16.117.9, 2.16.117.24, ...
Connexion à www.accuweather.com (www.accuweather.com)|2.16.117.27|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/hourly_raw1»

/home/angedesombres     [    <=>             ] 102,32K   152KB/s    in 0,7s    

2016-10-29 19:19:00 (152 KB/s) - «/home/angedesombres/1_accuweather/hourly_raw1» enregistré [104775]

cp: la cible '/home/angedesombres/1_accuweather/hourly_4.png' n'est pas un répertoire
cp: impossible d'évaluer '/home/angedesombres/1_accuweather/Forecast_Images_2016/9.png': Aucun fichier ou dossier de ce type
--2016-10-29 19:19:00--  http://www.accuweather.com/fr/fr/colmar/131856/hourly-weather-forecast/131856?hour=27
Résolution de www.accuweather.com (www.accuweather.com)… 88.221.83.59, 88.221.83.81, 88.221.83.57, ...
Connexion à www.accuweather.com (www.accuweather.com)|88.221.83.59|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/hourly_raw2»

/home/angedesombres     [  <=>               ] 102,66K   293KB/s    in 0,4s    

2016-10-29 19:19:05 (293 KB/s) - «/home/angedesombres/1_accuweather/hourly_raw2» enregistré [105123]

cp: la cible '/home/angedesombres/1_accuweather/hourly_12.png' n'est pas un répertoire
--2016-10-29 19:19:08--  http://www.accuweather.com/fr/fr/colmar/131856/weather-forecast/131856
Résolution de www.accuweather.com (www.accuweather.com)… 2.16.117.34, 2.16.117.24, 2.16.117.11, ...
Connexion à www.accuweather.com (www.accuweather.com)|2.16.117.34|:80… connecté.
requête HTTP transmise, en attente de la réponse… 200 OK
Taille : non indiqué [text/html]
Enregistre : «/home/angedesombres/1_accuweather/Alertes»

/home/angedesombres     [   <=>              ] 118,47K   294KB/s    in 0,4s    

2016-10-29 19:19:08 (294 KB/s) - «/home/angedesombres/1_accuweather/Alertes» enregistré [121311]
Je ne sais pas quoi faire :(
Image
Pingouin dans les champs, hiver très méchant !!!
Qui pisse loin ménage ses chaussures !!! :D

Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Problème conky et accuweather

Message par loutch »

Hello

Code : Tout sélectionner

conky: llua_load: cannot open /home/angedesombres/.conky/lua/image.lua: Aucun fichier ou dossier de ce type
Il te manque le dossier du lua .


Attention accuweather @ fait des changements mineurs donc je mets ici mon ici mon conky2015 (pour avoir les anciennes icônes).

le lancement du script se fait par :

Code : Tout sélectionner

${execi 600 bash $HOME/1_accuweather/1_accuweather -f2015 -h2015}
remplacer 2015 par 2016 si vous voulez les nouvelles .

le conky permet d'avoir aussi les conditions en français dans le troisième cadre .
mon conkyrc2015


Code : Tout sélectionner

  
background yes
use_xft yes
xftfont GE Inspira:size=9
xftalpha 1
update_interval 1.0
total_run_times 0
own_window yes
own_window_transparent yes
own_window_argb_visual yes
own_window_type normal
own_window_hints undecorated,below,skip_taskbar,skip_pager
double_buffer yes
minimum_size 450 540
maximum_width 465
text_buffer_size 2048
draw_shades no
draw_outline no
draw_borders no
draw_graph_borders no
default_color white #dbc38f
default_outline_color black
alignment tl
gap_x 60
gap_y 60
no_buffers yes
uppercase no
cpu_avg_samples 2
override_utf8_locale yes
# Fonctionne uniquement avec les polices Fixes
#use_spacer yes
imlib_cache_size 0 
 uppercase no
 
 color7 6495ee
 color9 red
 	
	lua_load ~/.conky/lua/image.lua
	
TEXT

${execi 600 bash $HOME/1_accuweather/1_accuweather -f2015 -h2015}
#### Prelier cadre ####
${voffset -14}${font LED_mono :style=Medium:size=58}${color 434343}${goto 30}${time %H}${goto 140}${time %M}${font LED_mono :size=20:style=Medium}${color 808080}${goto 233}${time %S}$font
#### Date ####
${voffset -30}${color white}${font GE Inspira:size=9}${alignc -108}${time %A, %d %B %Y}$font
### vent ####
${voffset -10}
${goto 310}${font GE Inspira:size=10}Vent : ${execi 90 sed -n '5p' $HOME/1_accuweather/curr_cond} 
${goto 310}Vitesse : ${execi 90 sed -n '6p' $HOME/1_accuweather/curr_cond}
${goto 310}Préssion : ${execi 90 sed -n '8p' $HOME/1_accuweather/curr_cond}
${goto 310}Indice UV : ${execi 90 sed -n '9p' $HOME/1_accuweather/curr_cond} $font
#### Ville ####
${voffset -36}${font GE Inspira:size=12:}Sarreguemines : ${font} Temp.: ${execi 90 sed -n '2p' $HOME/1_accuweather/curr_cond} °C   Res.: ${execi 90 sed -n '3p' $HOME/1_accuweather/curr_cond} °C  
${execi 90 sed -n '4p' $HOME/1_accuweather/curr_cond}
Alerte 1 : ${execi 600  sed -n '1p' $HOME/1_accuweather/Alertes}
Alerte 2 : ${execi 600  sed -n '2p' $HOME/1_accuweather/Alertes}
#### Deuxième cadre ####
#### Affichage date ####
${voffset -8}
${goto 20}${execi 3600 echo `date --date="1 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="1 day" | awk '{print $3}'`}\
${goto 115}${execi 3600 echo `date --date="2 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="2 day" | awk '{print $3}'`}\
${goto 215}${execi 3600 echo `date --date="3 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="3 day" | awk '{print $3}'`}\
${goto 305}${execi 3600 echo `date --date="4 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="4 day" | awk '{print $3}'`}\
${goto 400}${execi 3600 echo `date --date="5 day" | awk '{print $1}' | cut -c1-3`}.${execi 3600 echo `date --date="5 day" | awk '{print $3}'`}
##### Affichage temperatures #####
${voffset -14}
${goto 20}${color7}${execi 90 sed -n '9p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '8p' $HOME/1_accuweather/first_days}°${color}\
${goto 115}${color7}${execi 90 sed -n '14p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '13p' $HOME/1_accuweather/first_days}°${color}\
${goto 215}${color7}${execi 90 sed -n '19p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '18p' $HOME/1_accuweather/first_days}°${color}\
${goto 305}${color7}${execi 90 sed -n '24p' $HOME/1_accuweather/first_days}°${color}/${color9}${execi 90 sed -n '23p' $HOME/1_accuweather/first_days}°${color}\
${goto 400}${color7}${execi 90 sed -n '4p' $HOME/1_accuweather/last_days}°${color}/${color9}${execi 90 sed -n '3p' $HOME/1_accuweather/last_days}°${color}
#### Troisième cadre ####
#### Conditions ####
${voffset 50}${font GE Inspira:size=8}
${execi 90 sed -n '10p' $HOME/1_accuweather/first_days| cut -c1-14}\
${goto 95}${execi 90 sed -n '15p' $HOME/1_accuweather/first_days| cut -c1-14}\
${goto 200}${execi 90 sed -n '20p' $HOME/1_accuweather/first_days| cut -c1-14}\
${goto 290}${execi 90 sed -n '25p' $HOME/1_accuweather/first_days| cut -c1-14}\
${goto 385}${execi 90 sed -n '10p' $HOME/1_accuweather/last_days| cut -c1-14}
${execi 90 sed -n '10p' $HOME/1_accuweather/first_days| cut -c15-29}\
${goto 95}${execi 90 sed -n '15p' $HOME/1_accuweather/first_days| cut -c15-29}\
${goto 200}${execi 90 sed -n '20p' $HOME/1_accuweather/first_days| cut -c15-29}\
${goto 290}${execi 90 sed -n '25p' $HOME/1_accuweather/first_days| cut -c15-29}\
${goto 385}${execi 90 sed -n '10p' $HOME/1_accuweather/last_days| cut -c15-29}$font
#### Quatrième cadre ####
${voffset 14}
${goto 25}LEVER/COUCHER DU SOLEIL                                               ${goto 270}LEVER/COUCHER DE LUNE
Lever du soleil ${execi 3600 sed -n '14p' $HOME/1_accuweather/curr_cond}       ${goto 250}Lever de lune ${execi 3600 sed -n '18p' $HOME/1_accuweather/curr_cond}
Coucher de soleil ${execi 3600 sed -n '15p' $HOME/1_accuweather/curr_cond}     ${goto 250}Coucher de lune ${execi 3600 sed -n '19p' $HOME/1_accuweather/curr_cond}
Durée ${execi 3600 sed -n '16p' $HOME/1_accuweather/curr_cond}                 ${goto 250}Durée ${execi 3600 sed -n '20p' $HOME/1_accuweather/curr_cond}
                                                                               ${goto 250}${execi 600  sed -n '6p' $HOME/2b_Wunderground_API/Moon_Sun}  Vis. ${execi 600  sed -n '2p' $HOME/2b_Wunderground_API/Moon_Sun}% 
#### Cinquième cadre ####
${voffset -18}
${color FFFFFF}${goto 10}${voffset 16}${cpu cpu0}%\
${goto 55}${exec expr `cat /sys/class/hwmon/hwmon2/temp1_input` / 1000} °\
${goto 105}${execi 120 hddtemp -n /dev/sda} °\
${goto 155}${hwmon 1 temp 1} °\
${goto 200}${memperc}%\
${goto 255}${fs_used_perc /}%\
${goto 305}${fs_used_perc /home}%\
${goto 350}${downspeed wlp2s0}\
${goto 400}${upspeed wlp2s0}
${color 6495ee}${goto 10}CPU\
${goto 50}Temp\
${goto 100}Disque\
${goto 150}Carte\
${goto 200}Ram\
${goto 250}Racine\
${goto 300}Home\
${goto 350}Entrant\
${goto 400}Sortant $color
${goto 250}Signal : ${wireless_link_qual wlp2s0} %${goto 350}${totaldown wlp2s0}${goto 400}${totalup wlp2s0}
${color FFFFFF}${font caviar dreams:size=8}Uptime: ${uptime_short}
${color FFFFFF}${font caviar dreams:size=8}Processes: ${processes}
${color FFFFFF}${font caviar dreams:size=8}Running: ${running_processes}
${voffset -54}
${color 6495ee}${font caviar dreams:size=8}${alignr 20}${nodename}
${color 6495ee}${font caviar dreams:size=8}${alignr 20}Mageia 5 $machine
${color 6495ee}${font caviar dreams:size=8}${alignr 20}Kernel: ${kernel}${color}
#### Affichage des cadres utilisés dans le conky ####
${voffset -935}
#### premier cadre ####
${lua fDrawImage $HOME/1_accuweather/fond/base.png 0 40 450 112}
${lua fDrawImage $HOME/1_accuweather/fond/flip_bg.png 22 3 100 100}
${lua fDrawImage $HOME/1_accuweather/fond/flip_bg.png 132 3 100 100}
#### Second cadre ####
${lua fDrawImage $HOME/1_accuweather/fond/base.png 0 155 450 85}
#### Troisième cadre ####
${lua fDrawImage $HOME/1_accuweather/fond/base.png 0 245 450 45}
#### Quatrième cadre ####
${lua fDrawImage $HOME/1_accuweather/fond/base.png 0 295 450 85}
#### Cinquième cadre ####
${lua fDrawImage $HOME/1_accuweather/fond/base.png 0 385 450 85}
#### icônes premier cadre ####
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_0.png 215 70 110 70}\
${lua fDrawImage $HOME/1_accuweather/Wind1.png 370 40 90 90}
#### icônes Second cadre ####
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_2.png -10 190 90 55}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_3.png  85 190 90 55}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_4.png 185 190 90 55}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_5.png 280 190 90 55}\
${lua fDrawImage $HOME/1_accuweather/forecast_2015/forecast_6.png 375 190 90 55}
#### icônes Quatrième cadre ####
${lua fDrawImage $HOME/1_accuweather/Forecast_Images_2015/1.png 140 305 110 70}\
${lua fDrawImage $HOME/1_accuweather/Forecast_Images_2015/33.png 350 305 110 70}
${voffset - 900}
J'ai pris le fichier de b3bz qui l'a mis en français et rajouté quelques truc @ moi pour l'avoir complètement dans la langue de Molière ainsi qque les alertes.

Code : Tout sélectionner

#!/bin/bash


#function: test_image
test_image () {
    case $1 in
         1)
           echo a
         ;;
         2|3)
           echo b 
         ;;
         4|5)
           echo c
         ;;
         6)
           echo d
         ;;
         7)
           echo e
         ;;
         8)
           echo f
         ;;
         11)
           echo 0
         ;;
         12)
           echo h
         ;;
         13|14)
           echo g
         ;;
         15)
           echo m
         ;;
         16|17)
           echo k
         ;;
         18)
           echo i
         ;;
         19)
           echo q
         ;;
         20|21|23)
           echo o
         ;;
         22)
           echo r
         ;;
         24|31)
           echo E
         ;;
         25)
           echo v
         ;;
         26)
           echo x
         ;;
         29)
           echo y
         ;;
         30)
           echo 5
         ;;
         32)
           echo 6
         ;;
         33)
           echo A
         ;;
         34|35)
           echo B
         ;;
         36|37)
           echo C
         ;;
         38)
           echo D
         ;;
         39|40)
           echo G
         ;;
         41|42)
           echo K
         ;;
         43|44)
           echo O
         ;;
         *)
		   echo -
		 ;;   
        esac
} 


############################
# Check the user arguments #
############################
#recherche le paramètre envoyé
if (( $# < 1 || $# > 4 )); then
	echo "Invalid arguments!"
	exit
fi

forecast0=0
forecast2015=0
forecast2016=0
hourly0=0
hourly2015=0
hourly2016=0

for i in $*
	do 
		if [[ $i != -f && $i != -f2015 && $i != -f2016 && $i != -h && $i != -h2015 && $i != -h2016 ]]; then
			echo "Invalid arguments!"
			exit
		fi
		case $i in
			-f)
				forecast0=1
			;;
			-f2015)
				forecast2015=1
			;;
			-f2016)
				forecast2016=1
			;;
			-h)
				hourly0=1
			;;
			-h2015)
				hourly2015=1
			;;
			-h2016)
				hourly2016=1
			;;
		esac
	done
	
if [[ $forecast0 == 1 ]]; then
	forecast2015=0
	forecast2016=0
fi
if [[ $hourly0 == 1 ]]; then
	hourly2015=0
	hourly2016=0
fi


#Put your Accuweather address here
#address="http://www.accuweather.com/en/us/new-york-ny/10017/weather-forecast/349727"
#address="http://www.accuweather.com/en/ca/toronto/m5j/weather-forecast/55488"
address="http://www.accuweather.com/fr/fr/sarreguemines/135050/weather-forecast/135050"
#récupère le code région en fin de ligne
last_number=$(echo $address|sed 's/^.*\///')


#############################################################
# NORMAL FORECAST: -f, -f2015 or -f2016 passed as arguments #
#############################################################
if [[ $forecast0 == 1 || $forecast2015 == 1 || $forecast2016 == 1 ]]; then
	
	#function: convert_time
	convert_time () 
	{
		hours=$(echo $1|awk -F ":| " '{print $1}')
		minutes=$(echo $1|awk -F ":| " '{print $2}')
		am_or_pm=$(echo $1|awk -F ":| " '{print $3}')
		if [[ $am_or_pm == AM ]]; then
			if (( $hours < 10 )); then
				hours_24=0$hours
			fi
			if (( $hours == 10 || $hours == 11 )); then
				hours_24=$hours
			fi
			if (( $hours == 12 )); then
				hours_24=00
			fi
		elif [[ $am_or_pm == PM ]]; then
			if (( $hours != 12 )); then
				hours_24=$((hours+12))
			fi
			if (( $hours == 12 )); then
				hours_24=12
			fi
		fi
		time_24=$hours_24:$minutes
		echo $time_24
	}
	
	#function: test_wind
	test_wind () {
	    case $1 in
	         CLM)
	           echo -
	         ;;
	         S)
	           echo 1 
	         ;;
	         SSW)
	           echo 2 
	         ;;
	         SW)
	           echo 3 
	         ;;
	         WSW)
	           echo 4 
	         ;;
	         W)
	           echo 5 
	         ;;
	         WNW)
	           echo 6 
	         ;;
	         NW)
	           echo 7 
	         ;;
	         NNW)
	           echo 8 
	         ;;
	         N)
	           echo 9 
	         ;;
	         NNE)
	           echo : 
	         ;;
	         NE)
	           echo ; 
	         ;;
	         ENE)
	           echo \< 
	         ;;
	         E)
	           echo = 
	         ;;
	         ESE)
	           echo \> 
	         ;;
	         SE)
	           echo ? 
	         ;;
	         SSE)
	           echo @ 
	         ;;
	    esac
	}
	#tue le process conky
	kill -STOP $(pidof conky)
	#modifie l'url
	curr_addr="$(echo $address|sed 's/weather-forecast.*$//')"current-weather/"$last_number"
	#et crée le fichier curr_cond_raw contenant le contenu de la page
	wget -O $HOME/1_accuweather/curr_cond_raw "$curr_addr"
	
	addr1="$(echo $address|sed 's/weather-forecast.*$//')"daily-weather-forecast/"$last_number"
	wget -O $HOME/1_accuweather/first_days_raw "$addr1"
	
	addr2="$addr1"?day=6
	wget -O $HOME/1_accuweather/last_days_raw "$addr2"
	
	if [[ $forecast2015 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2015/forecast_*.png
	fi
	if [[ $forecast2016 == 1 ]]; then
		rm $HOME/1_accuweather/forecast_2016/forecast_*.png
	fi
	
	#current conditions
	if [[ -s $HOME/1_accuweather/curr_cond_raw ]]; then
		#retire le contenu du fichier qui ne se trouve pas entre la ligne contenant detail-now et Astronomy <span class 
		#MODIFICATION de Astronomy en Astronomie
	    sed -i '/detail-now/,/Astronomie <span class/!d' $HOME/1_accuweather/curr_cond_raw
		#On envoie les lignes contenant les valeurs à récupérer dans curr_cond 
		#MODIFICATION de Humidity en Humidit
		#MODIFICATION de Pressure en Pression
		#MODIFICATION de UV Index en Indice UV
		#MODIFICATION de Cloud Cover en Couverture nuageuse
		#MODIFICATION de Ceiling en Plafond
		#MODIFICATION de Dew Point en Point de ros
		#MODIFICATION de Visibility en Visibilit
		#MODIFICATION de Sunrise: en Lever du soleil:
		#MODIFICATION de Sunset: en Lever du soleil:
		#MODIFICATION de Moonrise: en Lever de lune:
		#MODIFICATION de Moonset: en Coucher de lune:
	    egrep -i '"cond"|icon i-|large-temp|small-temp|wind-point|"wind"|Humidit|Pression|Indice UV|Couverture nuageuse|Plafond|Point de ros|Visibilit|Duration|Lever du soleil:|Coucher de soleil:|Lever de lune:|Coucher de lune:' $HOME/1_accuweather/curr_cond_raw > $HOME/1_accuweather/curr_cond
	    #AJOUT remplacement des accents
	    sed -i -e 's/\&#233;/é/g' -e 's/\&#244;/ô/g' -e 's/\&#232;/è/g' -e 's/\'/'"'"'/g' $HOME/1_accuweather/curr_cond
	    #nettoyage des lignes par la gauche
	    sed -i -e 's/^.*<strong>//g' -e 's/^.*<span>//g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*<\/em> //g' -e 's/^.*"cond">//g' -e 's/^.*wind-point //g' $HOME/1_accuweather/curr_cond
	    #nettoyage des lignes par la droite
	    sed -i -e 's/">.*$//g' -e 's/&deg.*$//g' -e 's/<\/span>.*$//g' -e 's/&#.*$//g' -e 's/ &darr.*$//g' -e 's/ &uarr.*$//g' -e 's/<\/strong>.*$//g' $HOME/1_accuweather/curr_cond
	    #nettoyage de l'id icone
	    sed -i '1s/-.*$//' $HOME/1_accuweather/curr_cond
	    #affectation des valeurs du fichier curr_cond aux variables
	    image=$(sed -n 1p $HOME/1_accuweather/curr_cond)
	    echo $(test_image $image) >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 14p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 15p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 18p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		sunrise_time=$(sed -n 19p $HOME/1_accuweather/curr_cond)
		echo $(convert_time "$sunrise_time") >> $HOME/1_accuweather/curr_cond
		wind=$(sed -n 5p $HOME/1_accuweather/curr_cond)
		echo $(test_wind $wind) >> $HOME/1_accuweather/curr_cond
        if (( $(sed -n 14p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '14s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 15p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '15s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 18p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '18s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		if (( $(sed -n 19p /$HOME/1_accuweather/curr_cond|wc -c) == 8 )); then
			sed -i '19s/^/0/' $HOME/1_accuweather/curr_cond
		fi
		#création de l'image correspondante
	    if [[ $forecast2015 == 1 ]]; then
			cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/forecast_0.png
			cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2015/wind_0.png
		fi
		if [[ $forecast2016 == 1 ]]; then
			cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 1p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/forecast_0.png
			cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n 5p $HOME/1_accuweather/curr_cond).png $HOME/1_accuweather/forecast_2016/wind_0.png
		fi
	fi
	
	# icone direction vent 
wind_direction=$(sed -n 5p $HOME/1_accuweather/curr_cond)
if [[ $wind_direction == "S" ]]; then
	cp $HOME/1_accuweather/vents/"02.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "South" ]]; then
	cp $HOME/1_accuweatherI/vents/"02.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SSW" ]]; then
	cp $HOME/1_accuweather/vents/"03.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SW" ]]; then
	cp $HOME/1_accuweather/vents/"04.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "WSW" ]]; then
	cp $HOME/1_accuweather/vents/"05.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "W" ]]; then
	cp $HOME/1_accuweather/vents/"06.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "West" ]]; then
	cp $HOME/1_accuweather/vents/"06.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "WNW" ]]; then
	cp $HOME/1_accuweather/vents/"07.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NW" ]]; then
	cp $HOME/1_accuweather/vents/"08.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NNW" ]]; then
	cp $HOME/1_accuweather/vents/"09.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "N" ]]; then
	cp $HOME/1_accuweather/vents/"10.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "North" ]]; then
	cp $HOME/1_accuweather/vents/"10.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NNE" ]]; then
	cp $HOME/1_accuweather/vents/"11.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "NE" ]]; then
	cp $HOME/1_accuweather/vents/"12.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ENE" ]]; then
	cp $HOME/1_accuweather/vents/"13.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "E" ]]; then
	cp $HOME/1_accuweather/vents/"14.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "East" ]]; then
	cp $HOME/1_accuweather/vents/"14.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "ESE" ]]; then
	cp $HOME/1_accuweather/vents/"15.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SE" ]]; then
	cp $HOME/1_accuweather/vents/"16.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "SSE" ]]; then
	cp $HOME/1_accuweather/vents/"17.png" $HOME/1_accuweather/Wind1.png
elif [[ $wind_direction == "Variable" ]]; then
	cp $HOME/1_accuweather/vents/"00.png" $HOME/1_accuweather/Wind1.png
fi

	
	#First 5 days
	if [[ -s $HOME/1_accuweather/first_days_raw ]]; then
	
		#retire le contenu du fichier qui ne se trouve pas entre la ligne contenant .feed-controls et .feed-tabs
	    sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/first_days_raw
		#On envoie les lignes contenant les valeurs à récupérer dans first_days 
	    egrep -i 'href="#"|icon i-|"large-temp"|"small-temp"|temp-label|"cond"' $HOME/1_accuweather/first_days_raw > $HOME/1_accuweather/first_days
	    #AJOUT remplacement des accents
	    sed -i -e 's/\&#233;/é/g' -e 's/\&#244;/ô/g' -e 's/\'/'"'"'/g' -e 's/\&#232;/è/g' $HOME/1_accuweather/first_days
	    #nettoyage des lignes par la gauche
	    sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' -e 's/^.*"temp-label tonight selected">//g' $HOME/1_accuweather/first_days
	    #nettoyage des lignes par la droite
	    sed -i -e 's/&deg.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/first_days
	    #sed -i -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' -e 's/Today$/TODAY/' -e 's/Tonight$/TONIGHT/' -e 's/Early AM/EARLY AM/' $HOME/.conky/accuweather/first_days
	    sed -i -e 's/lun.$/LUNDI/' -e 's/mar.$/MARDI/' -e 's/mer.$/MERCREDI/' -e 's/jeu.$/JEUDI/' -e 's/ven.$/VENDREDI/' -e 's/sam.$/SAMEDI/' -e 's/dim.$/DIMANCHE/' -e 's/Auj.$/AUJOURD'"'"'HUI/' -e 's/C. nuit$/CETTE NUIT/' -e 's/Pt matin/PETIT MATIN/' $HOME/1_accuweather/first_days
	    #affectation des valeurs du fichier first_days aux variables
	    for (( i=2; i<=22; i+=5 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/first_days)
	          echo $(test_image $image) >> $HOME/1_accuweather/first_days
		  done
		#création de l'image correspondante
		if [[ $forecast0 == 0 ]]; then
			j=1
			for (( i=2; i<=22; i+=5 ))
			  do
				if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/first_days).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
	
	#Next 5 days
	if [[ -s $HOME/1_accuweather/last_days_raw ]]; then
		
		#retire le contenu du fichier qui ne se trouve pas entre la ligne contenant .feed-controls et .feed-tabs
		sed -i '/.feed-controls/,/\.feed-tabs/!d' $HOME/1_accuweather/last_days_raw
		#On envoie les lignes contenant les valeurs à récupérer dans last_days 
	    egrep -i 'href="#"|icon i-|large-temp|small-temp|temp-label|"cond"' $HOME/1_accuweather/last_days_raw > $HOME/1_accuweather/last_days
	    #AJOUT remplacement des accents
	    sed -i -e 's/\&#233;/é/g' -e 's/\&#244;/ô/g' -e 's/\&#232;/è/g' -e 's/\'/'"'"'/g' $HOME/1_accuweather/last_days
	    #nettoyage des lignes par la gauche
	    sed -i -e '/icon/s/-. //g' -e 's/^.*icon i-//g' -e 's/^.*large-temp">//g' -e 's/^.*small-temp">\///g' -e 's/^.*"cond">//g' -e 's/^.*href="#">//g' -e 's/^.*"temp-label tonight ">//g' $HOME/1_accuweather/last_days
	    #nettoyage des lignes par la droite
	    sed -i -e 's/&deg.*$//g' -e 's/<\/a>.*$//g' -e 's/<\/span>.*$//g' -e 's/">.*$//g' $HOME/1_accuweather/last_days
	    #sed -i -e 's/Mon$/MONDAY/' -e 's/Tue$/TUESDAY/' -e 's/Wed$/WEDNESDAY/' -e 's/Thu$/THURSDAY/' -e 's/Fri$/FRIDAY/' -e 's/Sat$/SATURDAY/' -e 's/Sun$/SUNDAY/' $HOME/.conky/accuweather/last_days
	    sed -i -e 's/lun.$/LUNDI/' -e 's/mar.$/MARDI/' -e 's/mer.$/MERCREDI/' -e 's/jeu.$/JEUDI/' -e 's/ven.$/VENDREDI/' -e 's/sam.$/SAMEDI/' -e 's/dim.$/DIMANCHE/' $HOME/1_accuweather/last_days
	    #affectation des valeurs du fichier last_days aux variables
	    for (( i=2; i<=22; i+=5 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/last_days)
	          echo $(test_image $image) >> $HOME/1_accuweather/last_days
		  done
		#création de l'image correspondante
		if [[ $forecast0 == 0 ]]; then
			j=6
			for (( i=2; i<=22; i+=5 ))
			  do
			    if [[ $forecast2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/forecast_2015/forecast_$j.png
				fi
				if [[ $forecast2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/last_days).png $HOME/1_accuweather/forecast_2016/forecast_$j.png
				fi
				((j++))
			  done
		fi
	fi
	
	if [[ $hourly0 != 1 && $hourly2015 != 1 && $hourly2016 != 1 ]]; then
		kill -CONT $(pidof conky)
	fi

fi


#############################################################
# HOURLY FORECAST: -h, -h2015 or -h2016 passed as arguments #
#############################################################
if [[ $hourly0 == 1 || $hourly2015 == 1 || $hourly2016 == 1 ]]; then

	#Hourly: First 8h
	
	if [[ $forecast0 != 1 && $forecast2015 != 1 && $forecast2016 != 1 ]]; then
		kill -STOP $(pidof conky)
	fi
	
	if [[ $hourly2015 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2015/forecast_*.png
	fi
	if [[ $hourly2016 == 1 ]]; then
		rm $HOME/1_accuweather/hourly_2016/forecast_*.png
	fi	
	
	hourly_addr1="$(echo $address|sed 's/weather-forecast.*$//')"hourly-weather-forecast/"$last_number"
	wget -O $HOME/1_accuweather/hourly_raw1 "$hourly_addr1"
	
	if [[ -s $HOME/1_accuweather/hourly_raw1 ]]; then
		sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw1
		egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw1 > $HOME/1_accuweather/hourly1
		sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly1
		sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly1
		echo "ConkyWeather Font Icons" >> $HOME/1_accuweather/hourly1
		for (( i=4; i<=18; i+=2 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly1)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly1
		  done
		if [[ $hourly0 == 0 ]]; then
			j=1
			for (( i=4; i<=18; i+=2 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly1).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi	    	
		    	((j++))
			  done
		fi
	fi
	
	#Hourly: Next 8h
	hourly_addr2=$(sed -n 1p $HOME/1_accuweather/hourly1)
	wget -O $HOME/1_accuweather/hourly_raw2 "$hourly_addr2"
	
	if [[ -s $HOME/1_accuweather/hourly_raw2 ]]; then
		sed -i '/detail-tab-buttons\.detail-tab-buttons/,/<div class="hourly-table">/!d' $HOME/1_accuweather/hourly_raw2
		egrep -i 'hour=|Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday|pm<\/div>|am<\/div>|icon-weather icon i-|<th>Forecast|<span>.*<\/span>|<th>Temp|<th>Realfeel|<th>Wind|<th>Rain|<th>Snow|<th>Ice|<th>UV Index|<th>Cloud Cover|<th>Humidity|<th>Dew Point' $HOME/1_accuweather/hourly_raw2 > $HOME/1_accuweather/hourly2
		sed -i -e 's/^[ \t]*//g' -e 's/^.*<div>//g' -e 's/^.*<span>//g' -e 's/^.*<th>//g' -e 's/^.*icon i-//g' -e 's/-s">.*$//g' -e 's/<\/div>.*$//g' -e 's/&#.*$//g' -e 's/<\/span>.*$//g' -e 's/<\/th>.*$//g' -e 's/^.*href="//g' -e 's/" class=.*$//g' $HOME/1_accuweather/hourly2
		sed -i 1d $HOME/1_accuweather/hourly2
		sed -i -e 's/Monday/Mon/' -e 's/Tuesday/Tue/' -e 's/Wednesday/Wed/' -e 's/Thursday/Thu/' -e 's/Friday/Fri/' -e 's/Saturday/Sat/' -e 's/Sunday/Sun/' -e 's/\r//g' $HOME/1_accuweather/hourly2
		echo "ConkyWeather Font Icons" >> $HOME/1_accuweather/hourly2
		for (( i=4; i<=18; i+=2 ))
		  do
	          image=$(sed -n "${i}"p $HOME/1_accuweather/hourly2)
	          echo $(test_image $image) >> $HOME/1_accuweather/hourly2
		  done
		if [[ $hourly0 == 0 ]]; then
			j=9
			for (( i=4; i<=18; i+=2 ))
			  do
		    	if [[ $hourly2015 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2015/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_2015/hourly_$j.png
				fi
				if [[ $hourly2016 == 1 ]]; then
					cp $HOME/1_accuweather/Forecast_Images_2016/$(sed -n ${i}p $HOME/1_accuweather/hourly2).png $HOME/1_accuweather/hourly_2016/hourly_$j.png
				fi	    	
		    	((j++))
			  done
		fi
	fi
	
	
	# Full info, next 16h - altogether16 file
	rm $HOME/1_accuweather/altogether16 altogether16_2015 altogether16_2016
	
	#TIME
	echo "\${color ffe595}TIME\${goto 100}" > $HOME/1_accuweather/altogether16
	sed -i "1s/$/$(sed -n 2p $HOME/1_accuweather/hourly1):$(sed -n 3p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
	jump_to=160
	for (( i=5; i<=17; i+=2 ))
		do
			time=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	sed -i "1s/$/\${goto 580}$(sed -n 2p $HOME/1_accuweather/hourly2):$(sed -n 3p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
	jump_to=640
	for (( i=5; i<=17; i+=2 ))
		do
			time=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "1s/$/\${goto $jump_to}$time/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	sed -i '1s/$/\n\n\n/' $HOME/1_accuweather/altogether16
	
	#FORECAST
	echo "\${color ffe595}FORECAST\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $1}'|cut -c1-8)
			sed -i "5s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	sed -i '5s/$/\n/' $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=20; i<=27; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2|awk '{print $2}'|cut -c1-8)
			sed -i "6s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#TEMPERATURE
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "TEMPER.\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=29; i<=36; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=29; i<=36; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "8s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#REAL FEEL
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "REAL FEEL\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=38; i<=45; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done	
	for (( i=38; i<=45; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "10s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done	
		
	#WIND
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "WIND\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=47; i<=54; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=47; i<=54; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "12s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#RAIN
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "RAIN\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=64; i<=71; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=64; i<=71; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "14s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#SNOW
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "SNOW\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=73; i<=80; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=73; i<=80; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "16s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#ICE
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "ICE\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100
	for (( i=82; i<=89; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=82; i<=89; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "18s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#UV INDEX
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "UV INDEX\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=99; i<=106; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=99; i<=106; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "20s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#CLOUD COVER
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "CLOUD COV.\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=108; i<=115; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=108; i<=115; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "22s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	
	#HUMIDITY
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "HUMIDITY\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=117; i<=124; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=117; i<=124; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "24s/$/\${goto $jump_to}$messg/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#DEW POINT
	echo "\${color ffe595}\${goto 100}\${hr 1}" >> $HOME/1_accuweather/altogether16
	echo "DEW POINT\${color}" >> $HOME/1_accuweather/altogether16
	jump_to=100	
	for (( i=126; i<=133; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly1)
			sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
	for (( i=126; i<=133; i+=1 ))
		do
			messg=$(sed -n ${i}p $HOME/1_accuweather/hourly2)
			sed -i "26s/$/\${goto $jump_to}$messg°/" $HOME/1_accuweather/altogether16
			((jump_to+=60))
		done
		
	#IMAGES
	if [[ $hourly0 == 0 ]]; then
		if [[ $hourly2015 == 1 ]]; then
					jump_to=75
					cp $HOME/1_accuweather/altogether16 $HOME/1_accuweather/altogether16_2015
		fi
		if [[ $hourly2016 == 1 ]]; then
					jump_to=85
					cp $HOME/1_accuweather/altogether16 $HOME/1_accuweather/altogether16_2016
		fi
		rm $HOME/1_accuweather/altogether16
		for (( i=1; i<=16; i+=1 ))
			do
				if [[ $hourly2015 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2015\/hourly_$i.png -s 60x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16_2015
				fi
				if [[ $hourly2016 == 1 ]]; then
					sed -i "4s/$/\${image \$HOME\/1_accuweather\/hourly_2016\/hourly_$i.png -s 36x36 -p $jump_to,49}/" $HOME/1_accuweather/altogether16_2016
				fi			
				((jump_to+=60))
			done
	fi
	
	#CONKYFONT
	if [[ $hourly0 == 1 ]]; then
		sed -i '4s/$/\${color}\${font conkyweather:size=35}/' $HOME/1_accuweather/altogether16
		jump_to=95
		for (( i=135; i<=142; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly1)/" $HOME/1_accuweather/altogether16
				((jump_to+=60))
			done
		for (( i=135; i<=142; i+=1 ))
			do
				sed -i "4s/$/\${goto $jump_to}$(sed -n ${i}p $HOME/1_accuweather/hourly2)/" $HOME/1_accuweather/altogether16
				((jump_to+=60))
			done
		sed -i '4s/$/\${font}/' $HOME/1_accuweather/altogether16
		sed -i '2,3d' $HOME/1_accuweather/altogether16
	fi
	
	#### Alerts ####
wget -O $HOME/1_accuweather/Alertes http://www.accuweather.com/fr/fr/sarreguemines/135050/weather-forecast/135050
sed -i 's/\r//' $HOME/1_accuweather/Alertes
message1=$(sed -n '/<span>Perspectives<\/span>/ { n;p; }' $HOME/1_accuweather/Alertes)
message2=$(sed -n '/^[ \t]*<em>.*<\/em>$/p' $HOME/1_accuweather/Alertes)
echo $message1 > $HOME/1_accuweather/Alertes
echo $message2 >> $HOME/1_accuweather/Alertes
sed -i -e 's/<p>//' -e 's/<\/p>.*$//' -e 's/<em>//' -e 's/<\/em>//' $HOME/1_accuweather/Alertes
char_1rst_line=$(sed -n 1p $HOME/1_accuweather/Alertes|wc -c)
if (( $char_1rst_line <= 1 )); then
  sed -i '1s/^$/RAS/' $HOME/1_accuweather/Alertes
fi
char_2nd_line=$(sed -n 2p $HOME/1_accuweather/Alertes|wc -c)
if (( $char_2nd_line <= 1 )); then
  sed -i '2s/^$/RAS/' $HOME/1_accuweather/Alertes

fi
	sed -i -e 's/NW/NO/g' -e 's/WNW/ONO/g' -e 's/NNW/NNO/g' -e 's/W/O/g' -e 's/SSW/SSO/g' -e 's/SW/SO/g' -e 's/WSW/OSO/g' -e 's/W/O/g' /$HOME/1_accuweather/curr_cond
	
	kill -CONT $(pidof conky)
fi
L'adresse avec ce nouveau script et @ prendre en fr,fr .

Cela donne ceci:

Image

Voila .

@+
Modifié en dernier par loutch le sam. 29 oct. 2016 20:18, modifié 1 fois.
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

Avatar du membre
AngeDesOmbres
Messages : 666
Enregistré le : ven. 12 août 2016 21:30
Localisation : Entre l'ombre et la lumière

Re: Problème conky et accuweather

Message par AngeDesOmbres »

Bon j'avance tant bien que mal...
loutch a écrit :Hello

Code : Tout sélectionner

conky: llua_load: cannot open /home/angedesombres/.conky/lua/image.lua: Aucun fichier ou dossier de ce type
Il te manque le dossier du lua .
oui mais il n'etait pas dans lton archive de l'autre poste et je ne sais pas ou allez le chercher...
loutch a écrit :

Code : Tout sélectionner

${execi 600 bash $HOME/1_accuweather/1_accuweather -f2015 -h2015}
j'ai bien fait la modification comme indiquer en remplacement par 2016
Maintenant le conky se met bien à jour :D

Par contre je ne sais pas ou copier coller les 2 codes que tu as fournis au dessus...

Et malgré tous j'ai tjrs un message d'erreur dans le terminal...

Code : Tout sélectionner

vlad-pc ~ $ conky
conky: llua_load: cannot open /home/angedesombres/.conky/lua/image.lua: Aucun fichier ou dossier de ce type
conky: desktop window (1a00026) is subwindow of root window (f7)
conky: window type - normal
conky: drawing to created window (0x600001)
conky: drawing to double buffer
conky: forked to background, pid is 21354
/dev/sda: open: Permission non accordée

/dev/sda: open: Permission non accordée

/dev/sda: open: Permission non accordée
Étant donné qu'il y a toutes les images dans le dossier accuweather dans mon /home/ je peu commanté la ligne

Code : Tout sélectionner

lua_load = '~/.conky/lua/image.lua',
du .conkyrc ?

Merci d'avance.
Image
Pingouin dans les champs, hiver très méchant !!!
Qui pisse loin ménage ses chaussures !!! :D

Avatar du membre
loutch
Messages : 517
Enregistré le : lun. 13 juil. 2015 17:32
Localisation : Sarreguemines

Re: Problème conky et accuweather

Message par loutch »

Ok

Pour le lua

il te faut créer ton dossier lua et y créer aussi le fichier image.lua

le fichier est si je me souvient dans un topic dans la partie conky en page 10 c'est le 2' ou 3' post de la page.

Code : Tout sélectionner

/dev/sda: open: Permission non accordée
Faut installer hddtemp et en konsole faire un

Code : Tout sélectionner

sudo dpkg-reconfigure hddtemp
et répondre au questions.

@+
HP Pavilion g 7 1357 sf avec ssd Tessa cinnamon Mageia 7rc mate
Asus ROG avec xubuntu 18.04 et xubuntu 19.04

Image

zeb
Messages : 16473
Enregistré le : ven. 19 juin 2015 22:13
Localisation : plus ici

Re: Problème conky et accuweather

Message par zeb »

Il y a aussi les liens du haut de page dans personnalisation, il y a d’ailleurs un très bon tuto de loutch (chez mageialinux) ;)

Aussi qui pourra t'aider à comprendre http://www.clapico.com/2012/04/07/conky-lua/" onclick="window.open(this.href);return false;

Perso, pour lua, je ne préfère pas t'expliquer car je ne maîtrise pas encore bien :oops:

Avatar du membre
AngeDesOmbres
Messages : 666
Enregistré le : ven. 12 août 2016 21:30
Localisation : Entre l'ombre et la lumière

Re: Problème conky et accuweather

Message par AngeDesOmbres »

@loutch ok merci pour c'est info j'ai reconfiguer hddtemp sa fonctionne très bien :D
pour le lua je vais chercher le temps qu'il faudra et je trouverais bien :p
Par contre j'ai un leger souci d'affichage sur le 3 eme cadre et je n'arrive pas à le modifier...
Image
il est trop petit mais je trouverais :D

@Zebulon merci pour le lien je vais lire ça avec grande attention :)
Image
Pingouin dans les champs, hiver très méchant !!!
Qui pisse loin ménage ses chaussures !!! :D

zeb
Messages : 16473
Enregistré le : ven. 19 juin 2015 22:13
Localisation : plus ici

Re: Problème conky et accuweather

Message par zeb »

Ange, clique sur ton image, les nuages ce sont envolés :lol: un bug chez l’hébergeur reposte la ;)

Avatar du membre
débitant
modérateur
Messages : 11557
Enregistré le : mar. 14 juil. 2015 18:22
Localisation : Lorraine France

Re: Problème conky et accuweather

Message par débitant »

je me disais aussi y a un truc qui a pris l'avion :lol:

Répondre