Contenu | Rechercher | Menus

Annonce

Le forum rencontre en ce moment quelques soucis de charge, il est possible qu'une erreur soit affichée quand vous postez un message, ne rechargez pas la page au risque de poster une seconde fois votre message

Si vous rencontrez des soucis à rester connecté sur le forum (ou si vous avez perdu votre mot de passe) déconnectez-vous et reconnectez-vous depuis cette page, en cochant la case "Me connecter automatiquement lors de mes prochaines visites".

Déjà un an…

nombre réponses : 25

#0 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 19/03/2013, à 12:16

daniel38100
Réponses : 640

merci jpdipsy fonctionne nickel mis a part que j'aurai bien aimer avoir les icônes de nuit si c'est possible

autre question comment utiliser le thermorond avec seulement l'aiguille principal ?

#1 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 19/03/2013, à 14:01

daniel38100
Réponses : 640
jpdipsy a écrit :
daniel38100 a écrit :

merci jpdipsy fonctionne nickel mis a part que j'aurai bien aimer avoir les icônes de nuit si c'est possible

J'y avais pas penser à celle-là je fais çà aujourdhui peut-être ou alors ..... cool

merci sinon autre detail comment utiliser le thermorond avec seulement l'aiguille principal ?
prend ton temps

#2 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 19/03/2013, à 15:02

daniel38100
Réponses : 640
jpdipsy a écrit :
daniel38100 a écrit :
jpdipsy a écrit :

J'y avais pas penser à celle-là je fais çà aujourdhui peut-être ou alors ..... cool

merci sinon autre detail comment utiliser le thermorond avec seulement l'aiguille principal ?
prend ton temps

Essaye pour les icones nuit j'ai modifié v1.82

Pour le thermo c'est pas prévu au départ parceque les gars à l'inverse voulaient un max de prev (j'ai tranché pour un juste milieu, c'est bien d'être le chef  lol lol) mais je peux le faire facilement bien évidement

ca ne fonctionne pas voici le retour

/home/daniel/Accuweather/scripts/meteo: ligne 410: 13+ : erreur de syntaxe : opérande attendue (le symbole erroné est "+")

#3 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 19/03/2013, à 15:30

daniel38100
Réponses : 640
jpdipsy a écrit :
daniel38100 a écrit :
jpdipsy a écrit :

Essaye pour les icones nuit j'ai modifié v1.82

Pour le thermo c'est pas prévu au départ parceque les gars à l'inverse voulaient un max de prev (j'ai tranché pour un juste milieu, c'est bien d'être le chef  lol lol) mais je peux le faire facilement bien évidement

ca ne fonctionne pas voici le retour

/home/daniel/Accuweather/scripts/meteo: ligne 410: 13+ : erreur de syntaxe : opérande attendue (le symbole erroné est "+")

corrigé (en principe)

fonctionne parfaitement merci a toi
1363700848.png
ps: si tu peut fair quelque chose pour le thermorond car je voudrai qu'une seul aiguille

#4 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 21/03/2013, à 14:31

daniel38100
Réponses : 640

@jpdipsy
merci pour le thermorond (ton lien pour le pack est mort)

#5 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 15/04/2013, à 13:14

daniel38100
Réponses : 640

@ragamatrix

bien sur que c'est possible
1366024362.png
j'ai ajouter ca a macompo

#6 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 19/04/2013, à 14:33

daniel38100
Réponses : 640
ragamatrix a écrit :
daniel38100 a écrit :

@ragamatrix

bien sur que c'est possible
http://pix.toile-libre.org/upload/img/1366024362.png
j'ai ajouter ca a macompo

Cool fais péter ! lol Euh pourrais-tu nous faire partager ton bout de code stp ?
C'est un peu aussi ce que je cherche à faire, utiliser macompo et meteo pour une utilisation plus polyvalente et comme je le citais plus haut que la partie meteo faisant appel à "recmeteo" (qui ne marche plus vraiment chez moi hmm )  soit indépendante... plus simple pour faire des tests.

desolé pour la reponse aussi tardive
voici le boute de code pour les info

#-------- Infos_Pratiques --------------------------------------------------------
convert -size 180x135 xc:none -fill none -strokewidth 1 -stroke orange -draw "roundrectangle 1,1 179,134 5,5" $imagetemp
# -----------------------------------------------------------------------------
name=`uname -n`
convert -background none -fill $coultemp3 -font $fonte -pointsize 16 -gravity center    label:$name \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+5 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
# ------------------------------------------------------------------------------
bord=10 ;pos1=85 ;pos2=95 ;posdepart=14 ;ecart=12; posdepart1=12; posdepart2=15

gmail=`perl $meteo_rep/scripts/extra/gmail.pl n`
iplocal=`ifconfig |  grep adr:192 | cut -c20-31`
ippublic=` wget -q -O - checkip.dyndns.org | sed -e 's/.*Current IP Address: //' -e 's/<.*$//'`
kernel=`uname -r`
distrib=`lsb_release -i | cut -c17-22`
version=`lsb_release -r | cut -c10-14`
codename=`lsb_release -c | cut -c11-20`
fetes=`sh $meteo_rep/scripts/extra/Saints.sh`
for (( x=1 ; x<8 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font $fonte -pointsize 15 -fill $couleur1 \
-annotate +$pos1+$(((ecart*x)+posdepart1)) ":" \
$imagetemp
done

convert $imagetemp -background transparent \
-gravity Northwest -font $fonte -pointsize 11 -fill $couleur1 \
-annotate +$bord+$(((ecart*1)+posdepart)) "Distribution" -annotate +$pos2+$(((ecart*1)+posdepart2)) "$distrib" \
-annotate +$bord+$(((ecart*2)+posdepart)) "version" -annotate +$pos2+$(((ecart*2)+posdepart2)) "$version $codename" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Kernel" -annotate +$pos2+$(((ecart*3)+posdepart2)) "$kernel" \
-annotate +$bord+$(((ecart*4)+posdepart)) "IP local" -annotate +$pos2+$(((ecart*4)+posdepart2)) "$iplocal" \
-annotate +$bord+$(((ecart*5)+posdepart)) "IP public" -annotate +$pos2+$(((ecart*5)+posdepart2)) "$ippublic" \
-annotate +$bord+$(((ecart*6)+posdepart)) "Gmail " -annotate +$pos2+$(((ecart*6)+posdepart2)) "$gmail message(s)" \
-annotate +$bord+$(((ecart*7)+posdepart)) "Saints " -annotate +$pos2+$(((ecart*7)+posdepart2)) "$fetes" \
$imagetemp

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/Infos-pratiques.png

le gmail.pl

#!/usr/bin/perl

use Switch;
use Text::Wrap;

my $what=$ARGV[0];

$user="XXXXXX"; #username for gmail account
$pass="XXXXXX"; #password for gmail account
$file="/tmp/gmail.html"; #temporary file to store gmail

#wrap format for subject
$Text::Wrap::columns=65; #Number of columns to wrap subject at
$initial_tab=""; #Tab for first line of subject
$subsequent_tab="\t"; #tab for wrapped lines
$quote="\""; #put quotes around subject

#limit the number of emails to be displayed
$emails=-1; #if -1 display all emails

&passwd; #give password the proper url character encoding

switch($what){ #determine what the user wants
	case "n" {&gmail; print "$new\n";} #print number of new emails
	case "s" { #print $from and $subj for new email
		&gmail;
		if ($new>0){
			my $size=@from;
			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
			for(my $i=0; $i<$size; ++$i){
				print "From: $from[$i]\n"; #print from line
				$text=$quote.$subj[$i].$quote."\n";
				print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
			}
			$size=@from;
			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
		}
	} 	
	case "e" { #print number of new emails, $from, and $subj
		&gmail;
		if($new==0){print "You have no new emails.\n";}
		else{
			print "You have $new new email(s).\n";
			my $size=@from;
			if ($emails!=-1 && $size>$emails){$size=$emails;} #limit number of emails displayed
			for(my $i=0; $i<$size; ++$i){
				print "From: $from[$i]\n"; #print from line
				$text=$quote.$subj[$i].$quote;
				print wrap($initial_tab, $subsequent_tab, $text); #print subject with word wrap
			}
			$size=@from;
			if ($emails!=-1 && $size >$emails){print "$emails out of $size new emails displayed\n";}
		}
	}
	else {
		print "Usage Error: gmail.pl <option>\n";
		print "\tn displays number of new emails\n";
		print "\ts displays from line and subject line for each new email.\n";
		print "\te displays the number of new emails and from line plus \n";
		print "\t\tsubject line for each new email.\n";
	} #didn't give proper option
}

sub gmail{
	if(!(-e $file)){ #create file if it does not exists
		`touch $file`;
	} 

	#get new emails
	`wget -q -O - https://$user:$pass\@mail.google.com/mail/feed/atom --no-check-certificate> $file`;

	open(IN, $file); #open $file

	my $i=0; #initialize count
	$new=0; #initialize new emails to 0

	my $flag=0;

	while(<IN>){ #cycle through $file
		if(/<entry>/){$flag=1;}
		elsif(/<fullcount>(\d+)<\/fullcount>/){$new=$1;} #grab number of new emails
		elsif($flag==1){ 
			if(/<title>.+<\/title>/){push(@subj, &msg);} #grab new email titles
			elsif(/<name>(.+)<\/name>/){push(@from, $1); $flag=0;} #grab new email from lines
		}
	}

	close(IN); #close $file
}

sub passwd{ #change to url escape codes in password
	#URL ESCAPE CODES
	$_=$pass;
	s/\%/\%25/g;
	s/\#/\%23/g;
	s/\$/\%24/g;
	s/\&/\%26/g;
	s/\//\%2F/g;
	s/\:/\%3A/g;
	s/\;/\%3B/g;
	s/\</\%3C/g;
	s/\=/\%3D/g;
	s/\>/\%3E/g;
	s/\?/\%3F/g;
	s/\@/\%40/g;
	s/\[/\%5B/g;
	s/\\/\%5C/g;
	s/\]/\%5D/g;
	s/\^/\%5E/g;
	s/\`/\%60/g;
	s/\{/\%7B/g;
	s/\|/\%7C/g;
	s/\}/\%7D/g;
	s/\~/\%7E/g;
	$pass=$_;
}

sub msg{
	#THE HTML CODED CHARACTER SET [ISO-8859-1]
	chomp; s/<title>(.+)<\/title>/$1/; #get just the subject
	#now replace any special characters
	s/\&\#33\;/!/g;        #Exclamation mark
	s/\&\#34\;/"/g; s/\&quot\;/"/g;      #Quotation mark
	s/\&\#35\;/#/g;        #Number sign
	s/\&\#36\;/\$/g;        #Dollar sign
	s/\&\#37\;/%/g;        #Percent sign
	s/\&\#38\;/&/g; s/\&amp\;/&/g;        #Ampersand
	s/\&\#39\;/'/g;        #Apostrophe
	s/\&\#40\;/(/g;        #Left parenthesis
	s/\&\#41\;/)/g;        #Right parenthesis
	s/\&\#42\;/*/g;        #Asterisk
	s/\&\#43\;/+/g;        #Plus sign
	s/\&\#44\;/,/g;        #Comma
	s/\&\#45\;/-/g;        #Hyphen
	s/\&\#46\;/./g;        #Period (fullstop)
	s/\&\#47\;/\//g;        #Solidus (slash)
	s/\&\#58\;/:/g;        #Colon
	s/\&\#59\;/\;/g;        #Semi-colon
	s/\&\#60\;/</g; s/\&lt\;/</g;        #Less than
	s/\&\#61\;/=/g;        #Equals sign
	s/\&\#62\;/>/g; s/\&gt\;/>/g;        #Greater than
	s/\&\#63\;/\?/g;        #Question mark
	s/\&\#64\;/\@/g;        #Commercial at
	s/\&\#91\;/\[/g;        #Left square bracket
	s/\&\#92\;/\\/g;        #Reverse solidus (backslash)
	s/\&\#93\;/\]/g;        #Right square bracket
	s/\&\#94\;/\^/g;        #Caret
	s/\&\#95\;/_/g;        #Horizontal bar (underscore)
	s/\&\#96\;/\`/g;        #Acute accent
	s/\&\#123\;/\{/g;        #Left curly brace
	s/\&\#124\;/|/g;        #Vertical bar
	s/\&\#125\;/\}/g;        #Right curly brace
	s/\&\#126\;/~/g;        #Tilde
	s/\&\#161\;/¡/g;        #Inverted exclamation
	s/\&\#162\;/¢/g;        #Cent sign
	s/\&\#163\;/£/g;        #Pound sterling
	s/\&\#164\;/¤/g;        #General currency sign
	s/\&\#165\;/¥/g;        #Yen sign
	s/\&\#166\;/¦/g;        #Broken vertical bar
	s/\&\#167\;/§/g;        #Section sign
	s/\&\#168\;/¨/g;        #Umlaut (dieresis)
	s/\&\#169\;/©/g; s/\&copy\;/©/g;        #Copyright
	s/\&\#170\;/ª/g;        #Feminine ordinal
	s/\&\#171\;/«/g;        #Left angle quote, guillemotleft
	s/\&\#172\;/¬/g;        #Not sign
	s/\&\#174\;/®/g;        #Registered trademark
	s/\&\#175\;/¯/g;        #Macron accent
	s/\&\#176\;/°/g;        #Degree sign
	s/\&\#177\;/±/g;        #Plus or minus
	s/\&\#178\;/²/g;        #Superscript two
	s/\&\#179\;/³/g;        #Superscript three
	s/\&\#180\;/´/g;        #Acute accent
	s/\&\#181\;/µ/g;        #Micro sign
	s/\&\#182\;/¶/g;        #Paragraph sign
	s/\&\#183\;/·/g;        #Middle dot
	s/\&\#184\;/¸/g;        #Cedilla
	s/\&\#185\;/¹/g;        #Superscript one
	s/\&\#186\;/º/g;        #Masculine ordinal
	s/\&\#187\;/»/g;        #Right angle quote, guillemotright
	s/\&\#188\;/¼/g; s/\&frac14\;/¼/g;       # Fraction one-fourth
	s/\&\#189\;/½/g; s/\&frac12\;/½/g;       # Fraction one-half
	s/\&\#190\;/¾/g; s/\&frac34\;/¾/g;       # Fraction three-fourths
	s/\&\#191\;/¿/g;        #Inverted question mark
	s/\&\#192\;/À/g;        #Capital A, grave accent
	s/\&\#193\;/Á/g;        #Capital A, acute accent
	s/\&\#194\;/Â/g;        #Capital A, circumflex accent
	s/\&\#195\;/Ã/g;        #Capital A, tilde
	s/\&\#196\;/Ä/g;        #Capital A, dieresis or umlaut mark
	s/\&\#197\;/Å/g;        #Capital A, ring
	s/\&\#198\;/Æ/g;        #Capital AE dipthong (ligature)
	s/\&\#199\;/Ç/g;        #Capital C, cedilla
	s/\&\#200\;/È/g;        #Capital E, grave accent
	s/\&\#201\;/É/g;        #Capital E, acute accent
	s/\&\#202\;/Ê/g;        #Capital E, circumflex accent
	s/\&\#203\;/Ë/g;        #Capital E, dieresis or umlaut mark
	s/\&\#204\;/Ì/g;        #Capital I, grave accent
	s/\&\#205\;/Í/g;        #Capital I, acute accent
	s/\&\#206\;/Î/g;        #Capital I, circumflex accent
	s/\&\#207\;/Ï/g;        #Capital I, dieresis or umlaut mark   
	s/\&\#208\;/Ð/g;        #Capital Eth, Icelandic
	s/\&\#209\;/Ñ/g;        #Capital N, tilde
	s/\&\#210\;/Ò/g;        #Capital O, grave accent
	s/\&\#211\;/Ó/g;        #Capital O, acute accent
	s/\&\#212\;/Ô/g;        #Capital O, circumflex accent
	s/\&\#213\;/Õ/g;        #Capital O, tilde
	s/\&\#214\;/Ö/g;        #Capital O, dieresis or umlaut mark
	s/\&\#215\;/×/g;        #Multiply sign
	s/\&\#216\;/Ø/g;        #Capital O, slash
	s/\&\#217\;/Ù/g;        #Capital U, grave accent
	s/\&\#218\;/Ú/g;        #Capital U, acute accent
	s/\&\#219\;/Û/g;        #Capital U, circumflex accent
	s/\&\#220\;/Ü/g;        #Capital U, dieresis or umlaut mark
	s/\&\#221\;/Ý/g;        #Capital Y, acute accent
	s/\&\#222\;/Þ/g;        #Capital THORN, Icelandic
	s/\&\#223\;/ß/g;        #Small sharp s, German (sz ligature)
	s/\&\#224\;/à/g;        #Small a, grave accent
	s/\&\#225\;/á/g;        #Small a, acute accent
	s/\&\#226\;/â/g;        #Small a, circumflex accent
	s/\&\#227\;/ã/g;        #Small a, tilde
	s/\&\#228\;/ä/g;        #Small a, dieresis or umlaut mark
	s/\&\#229\;/å/g;        #Small a, ring
	s/\&\#230\;/æ/g;        #Small ae dipthong (ligature)
	s/\&\#231\;/ç/g;        #Small c, cedilla
	s/\&\#232\;/è/g;        #Small e, grave accent
	s/\&\#233\;/é/g;        #Small e, acute accent
	s/\&\#234\;/ê/g;        #Small e, circumflex accent
	s/\&\#235\;/ë/g;        #Small e, dieresis or umlaut mark
	s/\&\#236\;/ì/g;        #Small i, grave accent
	s/\&\#237\;/í/g;        #Small i, acute accent
	s/\&\#238\;/î/g;        #Small i, circumflex accent
	s/\&\#239\;/ï/g;        #Small i, dieresis or umlaut mark
	s/\&\#240\;/ð/g;        #Small eth, Icelandic
	s/\&\#241\;/ñ/g;        #Small n, tilde
	s/\&\#242\;/ò/g;        #Small o, grave accent
	s/\&\#243\;/ó/g;        #Small o, acute accent
	s/\&\#244\;/ô/g;        #Small o, circumflex accent
	s/\&\#245\;/õ/g;        #Small o, tilde
	s/\&\#246\;/ö/g;        #Small o, dieresis or umlaut mark
	s/\&\#247\;/÷/g;        #Division sign
	s/\&\#248\;/ø/g;        #Small o, slash
	s/\&\#249\;/ù/g;        #Small u, grave accent
	s/\&\#250\;/ú/g;        #Small u, acute accent
	s/\&\#251\;/û/g;        #Small u, circumflex accent
	s/\&\#252\;/ü/g;        #Small u, dieresis or umlaut mark
	s/\&\#253\;/ý/g;        #Small y, acute accent
	s/\&\#254\;/þ/g;        #Small thorn, Icelandic
	s/\&\#255\;/ÿ/g;        #Small y, dieresis or umlaut mark
	s/^\s+//;
	return $_;
}

tu remplace
$user="XXXXXX"; #username for gmail account
$pass="XXXXXX"; #password for gmail account
par tes identifiant sans le gmail.com


et le script pour les fetes
Saint.sh

#!/bin/bash
# Version 1.3
# Ce script permet d'obtenir les fêtes de chaque jour, sans internet.
# Possibilité de varier les couleurs en jouant avec le offset de conky.

# Récupère les prénoms de la commande console "calendar"
N=`calendar -f /usr/share/calendar/fr_FR/calendar.fetes -A0 | grep "N'" | cut -d " " -f6`
A=`calendar -f /usr/share/calendar/fr_FR/calendar.fetes -A0 | grep "Aujourd'hui" | cut -d " " -f7 | tr -d " "`
B=`calendar -f /usr/share/calendar/fr_FR/calendar.fetes -A0 | grep "Bonne" | cut -d " " -f6`

NB=`echo $N $A $B | wc -w`

[ "$NB" -ge 2 ] && echo " "$A $B $N | fold -s -w 44 && exit 0
echo $A $B $N | fold -s -w 44
echo

exit 0

#7 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 23/05/2013, à 08:40

daniel38100
Réponses : 640

bonjour
j'ai un probleme de recup d'info
voici mon retour terminal

daniel@daniel-desktop:~$ ~/Accuweather/start-recmeteo.sh 
daniel@daniel-desktop:~$ Version = 1.27
huitHeures 1 Ok
huitHeures 2 Ok
Jour 1 Ok
Nuit 1 Ok
Traceback (most recent call last):
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 379, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id, demon)
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 322, in demonise
    traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 171, in traitement
    infs=inf[1].get_text().split("\n")
IndexError: list index out of range

#8 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 24/05/2013, à 12:04

daniel38100
Réponses : 640
ragamatrix a écrit :

bonjour daniel38100
Tu es sur quelle distribution ?

alors je suis sur une ubuntu studio 12.04 aven un noyau 3.2.0-44-lowlatency

la je vien de retest c'est aller jusqu'au 3eme jour

daniel@daniel-desktop:~$ ~/Accuweather/start-recmeteo.shdaniel@daniel-desktop:~$ Version = 1.27
huitHeures 1 Ok
huitHeures 2 Ok
Jour 1 Ok
Nuit 1 Ok
Jour 2 Ok
Nuit 2 Ok
Jour 3 Ok
Nuit 3 Ok
Traceback (most recent call last):
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 379, in <module>
    demonise(ent, nb1, nb2, huitHeures, nbJour, interval, nbFoisHuit, Id, demon)
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 322, in demonise
    traitement(ent+nb1+'/daily-weather-forecast/'+nb2+"?day="+str(x), repsauv+"/Jour"+str(x), repsauv)
  File "/home/daniel/Accuweather/scripts/recmeteo.py", line 171, in traitement
    infs=inf[1].get_text().split("\n")
IndexError: list index out of range

#9 Re : -1 »  [Conky] Alternative à weather.com (3) » Le 05/06/2013, à 12:49

daniel38100
Réponses : 640

salut Didier-T
serait il possible d'ajouter une notification a recmeteo.py en cas d'erreur de M.A.J. ?

#10 Re : -1 »  [5] Conky : Postez vos conkyrc ou certaines parties intéressantes » Le 04/04/2013, à 10:59

daniel38100
Réponses : 336

bonjour a tous

je voudrai savoir si quelqu'un aurai quelque chose pour afficher ne nombre de message hotmail ?

#11 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 23/02/2013, à 15:12

daniel38100
Réponses : 2473

@jpdipsy

j'ai modifier le ficher meteo avec mon frere pour ceux qui utilise gnome-shell (debian)

le voici

#!/bin/bash

#Fonctions traitements info recmeteo
rep_ref=$meteo_rep
# restauration  ' meteo restaure '
Ver_meteo="0.99"

if [ "$1" != "restaure" ]||[ "$1" != "refresh" ];then source $rep_ref/configs/$meteo_config;fi
if [  -z "$(ps ax |grep -o [r]ecmeteo.py)" ];then
    start="non"
else
    if [ "$1" != "restaure" ]||[ "$1" != "refresh" ];then
        maint=$(date +%H:%M);heure_maint=$(date +%H);min_maint=$(date +%M)
        repville=`echo $adressWeb | cut -d / -f6-7`; ville="$(echo $adressWeb| cut -d / -f6)"
        repertimages=$TempShell/$ville-$USER
        if [ ! -d "$repertimages/cartouches" ]; then mkdir -p $repertimages/cartouches; fi
        vrecmeteo=$(grep Version= $rep_ref/scripts/recmeteo.py |cut -d = -f2-)
        reptemp=$repertimages/cartouches
        imagetemp=$repertimages/cartouches/temp.png
        imagetemp1=$repertimages/cartouches/temp1.png
        fondbase="$repsauv/fond-base.png"
        fondtravail="$repsauv/fond-travaille.png"
        imagefinale=$rep_ref/fonds/$ville-meteo.png
        ecran=$(xrandr --verbose | grep *current |cut -d " " -f3)
        if [ -z "$IconesRep" ];then IconesRep=$rep_ref/icones;fi
        if [ -z "$Rose" ];then Rose=$IconesRep/Themes/JPDipsy/Metal/Rose-des-vents;fi
        if [ -z "$Therm" ];then Therm=$IconesRep/Themes/JPDipsy/Metal/Therm;fi
        if [ -z "$ThermRond" ];then ThermRond=$IconesRep/Themes/JPDipsy/Metal/ThermRond;fi
        if [ -z "$Lune" ];then Lune=$IconesRep/Themes/JPDipsy/Metal/Lune;fi
        if [ -z "$Barometre" ];then Barometre=$IconesRep/Themes/JPDipsy/Metal/Barometre;fi
    fi
    gestion_fond()
    {
    #------------------- environnement ---------------------------------------------
    if [[ `ps aux | grep -e "[x]fce4-session"` ]] ; then environnement="xfce";fondactuel=`xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path`;fondori=xfce-fondori
    elif [[ `ps aux | grep -e "[s]tartfluxbox"` ]] ; then   environnement="fluxbox";fondactuel=`tail -1 $dest/lastwallpaper | cut -d "|" -f2`;fondori=flux-fondori
    elif [[ `ps aux | grep -e "[o]penbox --startup"` ]] ; then environnement="openbox";fondactuel=`cat ~/.fehbg | cut -d "'" -f2`;fondori=obox-fondori
    elif [[ `ps aux | grep -e "[g]nome-session" | grep  -v "/usr/*"` ]] ; then
            # gnome version
        environnement="gnome" ; gnomeversion=`gnome-session --version | cut -c15-15`
        if [ $gnomeversion = 2 ]; then fondactuel=`gconftool -g  /desktop/gnome/background/picture_filename `;fondori=g2-fondori
        elif [ $gnomeversion = 3 ]; then fondactuel=`gsettings get org.gnome.desktop.background picture-uri |sed s/.$// | cut -c9- `;fondori=g3-fondori
	elif [[ `ps aux | grep -e "[g]nome-shell"` ]] ; then fondactuel=`gsettings get org.gnome.desktop.background picture-uri |sed s/.$// | cut -c9- `;fondori=gs-fondori
        fi
    fi
    if [ "$1" = "refresh" ];then
 	case $environnement in
 	xfce ) xfdesktop --reload ;;
	esac
	exit
    fi
    if [ "$1" = "restaure" ];then
        killall recmeteo.py
        if [ -e ~/.config/$fondori ];then
            fond=$(cat ~/.config/$fondori)
            case $environnement in
                gnome)
                    if [ $gnomeversion = 2 ]; then gconftool -s -t string /desktop/gnome/background/picture_filename $fond
                    elif [ $gnomeversion = 3 ]; then gsettings set org.gnome.desktop.background picture-uri  file://$fond
                    fi
                 ;;
                xfce)xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s $fond && xfdesktop --reload;;
                fluxbox) fbsetbg "$fond";;
                openbox) feh  --bg-scale "$fond";;
            esac
        fi
        exit
    else
        echo "$fondactuel" | grep "$ville-meteo.png"  -q ; retval=$?

        if [ "$retval" != "0" ]||[ ! -e "$imagefinale" ];then
            echo "$fondactuel" > ~/.config/$fondori
            convert "$fondactuel" "$fondbase" &&
            cp  $fondbase $fondtravail &&
            cp  $fondbase $imagefinale &&
            case $environnement in
                fluxbox ) fbsetbg $imagefinale  ;;
                openbox ) feh  --bg-scale $imagefinale ;;
                xfce ) xfconf-query -c xfce4-desktop -p /backdrop/screen0/monitor0/image-path -s "$imagefinale" ;xfdesktop --reload ;;
                gnome )
                        if [ $gnomeversion = 2 ]; then
                        gconftool -s -t string /desktop/gnome/background/picture_filename $imagefinale
                        else

                        gsettings set org.gnome.desktop.background picture-uri file://"$imagefinale"
                        fi
                ;;
            esac
        fi
    fi

}

    	if [ "$1" = "restaure" ];then gestion_fond restaure 
	elif [ "$1" = "refresh" ];then gestion_fond refresh
	else gestion_fond
	fi


    lunaison()
    {
    if [ ! -e $reptemp/Lune.png ];then
    curl --max-time 60 --retry 3 --silent http://www.calendrier-lunaire.net/ >/tmp/lune.txt
    icone=$(grep "<img src=\"imgs/" /tmp/lune.txt |cut -d = -f3|cut -d \" -f2)
    wget -q http://www.calendrier-lunaire.net/$icone -O $reptemp/Lune.png
    convert $reptemp/Lune.png -transparent '#091a2a' $reptemp/Lune.png
    rm /tmp/lune.txt
    fi
    }

    etat_jour()
    {
    moment="nuit"
    lever=$(sed -n "25p" "$repsauv/Jour1"|cut -d ":" -f2-)
    coucher=$(sed -n "27p" "$repsauv/Jour1"|cut -d ":" -f2-)
    if [[ "$lever" = "$maint" ]]||[[ "$maint" > "$lever" ]]&&[[ "$maint" < "$coucher" ]];then moment="jour";fi
    }

    form_vent()
    {
    if [ "$resultat" = "N" ];then resultat="Nord"
    elif  [ "$resultat" = "E" ];then resultat="Est"
    elif  [ "$resultat" = "S" ];then resultat="Sud"
    elif  [ "$resultat" = "O" ]|| [ "$resultat" = "W" ];then resultat="Ouest"
    fi
    }

    ico_vent()
    {

    if [ "$force" = "CLM" ]; then force="Calme";fi

    Calme=0
    N=10;NNE=11;NE=12;ENE=13
    E=14;ESE=15;SE=16;SSE=17
    S=2;SSO=3;SO=4;OSO=5
    W=6;O=6;ONO=7;NO=8;NNO=9

    dir="$[direction]"
    #echo "dir  $dir"
    #palier

    if (( "$force" <= "$palier" ));then icone=$dir
    elif (( "$force" <= "$(( $palier * 2 ))" ));then icone=$(( $dir + 17 ))
    elif (( "$force" <= "$(( $palier * 3 ))" ));then icone=$(( $dir + 34 ))
    elif (( "$force" >= "$(( $(( $palier * 3 )) +1 ))"  ));then icone=$(( $dir + 51 ))
    fi

    if (( "$icone" <= "9" )); then
    resultat=$IconesRep/vent/0$icone.png
    else
    resultat=$IconesRep/vent/$icone.png
    fi
    }

    verif_cond()
    {

    if [ ! -z "$(echo $resultat|grep Poudreries)" ];then
    resultat="Légères chutes de neige"
    fi
    }

    dec_cond()
    {
    #coupure conditions à moitié

    sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-|cut -d " " -f1-|fold -s -w $(( $1 /2 )) > /tmp/cond.txt
    }

    sec_cond_1()
    {
    if [ -e /tmp/cond.txt ];then rm /tmp/cond.txt;fi
    carac="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-|wc -m)"
    if [ "$(( $carac /2 ))" -gt "25" ];then
            dec_cond "$carac";resultat="$(sed -n "1p" /tmp/cond.txt)"
        else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-)"
    fi
    verif_cond

    }

    sec_cond_2()
    {
    if [ -e /tmp/cond.txt ];then rm /tmp/cond.txt;fi
        carac="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-|wc -m)"
    if [ "$(( $carac /2))" -gt "25" ];then
            dec_cond "$carac" ;resultat="$(sed -n "2p" /tmp/cond.txt)"
        else resultat=""
    fi
    verif_cond
    }

    CC()
    {
    # appel CC vent

    vent=2;vent_force=3;ico=4;jour=5;mois=6;annee=7;tmpmax=8;tmpmaxlast=11;tmpmin=12;tmpminlast=15;ville=16;lat=17;long=18
    cond=19;sec1_cond=19;sec2_cond=19;temp=20;ressent=21;humid=22;pression=23;tendpression=23;uv=24;couv=25;plafond=26;rosee=27;visib=28
    # tendance pression
    ref=$1;fich="$repsauv/CC";ligne="$[ref]"

    if [ "$ref" = "cond" ]; then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-)";verif_cond
    elif [ "$ref" = "tmpmax" ]||[ "$ref" = "tmpmaxlast" ]||[ "$ref" = "tmpmin" ]||[ "$ref" = "tmpminlast" ]||[ "$ref" = "temp" ]||[ "$ref" = "ressent" ]|| [ "$ref" = "humid" ]||[  "$ref" = "couv" ];then
    result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%?}
    elif [ "$ref" = "vent_force" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%????}
    elif [ "$ref" = "rosee" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%???}
    elif [ "$ref" = "pression" ];then result="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";resultat=${result%???}
    elif [ "$ref" = "tendpression" ];then
        result="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f4)"
        if [ "$result" = "↑" ];then resultat="hausse"
        elif [ "$result" = "↓" ];then resultat="baisse"
        else resultat="stable"
        fi
    elif [ "$ref" = "icovent" ];then force="$(sed -n "3p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";force=${force%????};direction="$(sed -n "2p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";ico_vent
    else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)"
    fi

    if [ "$ref" = "sec1_cond" ];then sec_cond_1; fi
    if [ "$ref" = "sec2_cond" ];then sec_cond_2;fi
    if [ "$ref" = "vent" ];then form_vent ;fi
    if [ "$ref" = "ico" ]; then etat_jour; resultat="$IconesRep/$moment/$resultat.png";fi

    echo "$resultat"
    }

    prev_jour()
    {
    #appel prev_jour 1 vent

    vent=2;vent_force=3;nuit_vent=4;nuit_vent_force=5;ico=6;nuit_ico=7;jour=8;mois=9;annee=10;tmpmax=11;tmpmaxlast=14;tmpmin=15;tmpminlast=18;temp=19;ressent=20;precip=21;nuit_temp=22;nuit_ressent=23
    nuit_precip=24;sollever=25;solduree=26;solcouch=27;lunelever=28;luneduree=29;lunecouch=30;cond=31;sec1_cond=31;sec2_cond=31;nuit_cond=32;sec1_nuit_cond=32;sec2_nuit_cond=32;rafale=33;uv=34;orage=35;preciptot=36;pluie=37;neige=38;verglas=39
    nuit_rafale=40;nuit_uv=41;nuit_orage=42;nuit_preciptot=43;nuit_pluie=44;nuit_neige=45;nuit_verglas=46

    ref=$2;fich="$repsauv/Jour$1";ligne="$[ref]"
    if [ "$ref" = "cond" ]||[ "$ref" = "nuit_cond" ]; then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-)";verif_cond
    elif [  "$ref" = "tmpmax" ]||[  "$ref" = "tmpmaxlast" ]||[  "$ref" = "tmpmin" ]||[  "$ref" = "tmpminlast" ]||[  "$ref" = "orage" ]|| \
    [  "$ref" = "nuit_orage" ] ;then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%?}
    elif [ "$ref" = "vent_force" ]||[  "$ref" = "nuit_vent_force" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%????}
    elif [ "$ref" = "sollever" ]||[  "$ref" = "solduree" ]||[  "$ref" = "solcouch" ]||[  "$ref" = "lunelever" ]||[  "$ref" = "luneduree" ]||[  "$ref" = "lunecouch" ];then
    resultat=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-)
    elif [ "$ref" = "icovent" ];then force="$(sed -n "3p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";force=${force%????};direction="$(sed -n "2p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";ico_vent
    elif [ "$ref" = "nuit_icovent" ];then force="$(sed -n "5p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";force=${force%????};direction="$(sed -n "4p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";ico_vent
    else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)"
    fi

    if [ "$ref" = "sec1_cond" ]||[ "$ref" = "sec1_nuit_cond" ];then sec_cond_1; fi
    if [ "$ref" = "sec2_cond" ]||[ "$ref" = "sec2_nuit_cond" ];then sec_cond_2;fi
    if [ "$ref" = "vent" ]|| [ "$ref" = "nuit_vent" ];then form_vent ;fi
    if [ "$ref" = "ico" ]; then resultat="$IconesRep/jour/$resultat.png";fi
    if [ "$ref" = "nuit_ico" ]; then resultat="$IconesRep/nuit/$resultat.png";fi

    echo "$resultat"
    }

    prev_quart()
    {
    # AM-Soiree-Matin-Nuit
    #appel prev_quart AM 1 vent - Soiree 2 tmpmax etc

    vent=2;vent_force=3;ico=4;cond=5;sec1_cond=5;sec2_cond=5;tmpmax=6;tmpmin=7;ressentmax=8;ressentmin=9;precip=10;pluie=11;neige=12;humid=13;couv=14;rosee=15;visib=16

    type=$1;ref=$3;fich="$repsauv/$type$2";ligne="$[ref]"
    if [ "$ref" = "cond" ];then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2-)";verif_cond
    elif [  "$ref" = "tmpmax" ]||[  "$ref" = "tmpmin" ]||[  "$ref" = "precip" ]||[  "$ref" = "humid" ]||[  "$ref" = "couv" ];then
    result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%?}
    elif [  "$ref" = "rosee" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%???}
    elif [ "$ref" = "vent_force" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%????}
    elif [ "$ref" = "icovent" ];then force="$(sed -n "3p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";force=${force%????};direction="$(sed -n "2p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";ico_vent
    else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)"
    fi
    if [ "$ref" = "sec1_cond" ];then sec_cond_1; fi
    if [ "$ref" = "sec2_cond" ];then sec_cond_2;fi
    if [ "$ref" = "vent" ];then form_vent ;fi
    if [ "$ref" = "ico" ];then
        if [ "$type" = "Matin" ]||[ "$type" = "AM" ]; then
        resultat="$IconesRep/jour/$resultat.png"
        else
        resultat="$IconesRep/nuit/$resultat.png"
        fi
    fi

    echo "$resultat"
    }

    prev_huit()
    {
    #appel prev_huit 1 vent
    temp=9;ressent=17;humid=25;pluie=33;neige=41;verglas=49;vent=57;vent_force=57;uv=65;couv=73;rosee=81;ico=89

    fich="$repsauv/huitHeures1";hre=$1;ref=$2;ligne="$(( $[ref] + $hre ))"

    if [ "$ref" = "temp" ]||[ "$ref" = "ressent" ]||[ "$ref" = "humid" ]||[ "$ref" = "pluie" ]||[ "$ref" = "neige" ]||[ "$ref" = "verglas" ] \
    ||[ "$ref" = "couv" ]||[ "$ref" = "rosee" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%?}
    elif [ "$ref" = "vent" ];then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f3)";form_vent
    elif [ "$ref" = "vent_force" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%????}
    elif [ "$ref" = "icovent" ];then ligne="$(( 57 + $hre ))";force="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";direction="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2|cut -d " " -f3)";ico_vent
    elif [ "$ref" = "ico" ]; then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";etat_jour; resultat="$IconesRep/$moment/$resultat.png"
    else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)"
    fi

    echo "$resultat"
    }

    rose()
    {
# recup dir et force
if (( "$#" == "4" )); then  direction=$($1 $2);force=$($1 $2_force);taille="$3";opacite="$4";nom=Rose-"$1"
elif (( "$#" == "5" )); then direction=$($1 $2 $3);force=$($1 $2 $3_force);taille="$4";opacite="$5";nom=Rose-"$1-$2"
elif (( "$#" == "6" )); then direction=$($1 $2 $3 $4);force=$($1 $2 $3 $4_force);taille="$5";opacite="$6";nom=Rose-"$2-$3"
else exit
fi

#couleurs
if (( "$force" <= "$palier" ));then couleur=$palier1;couleurfont=$palier1coulfont
elif (( "$force" <= "$(( $palier * 2 ))" ));then couleur=$palier2;couleurfont=$palier2coulfont
elif (( "$force" <= "$(( $palier * 3 ))" ));then couleur=$palier3;couleurfont=$palier3coulfont
elif (( "$force" >= "$(( $(( $palier * 3 )) +1 ))"  ));then couleur=$palier4;couleurfont=$palier4coulfont
fi


#def angle
if [ "$direction" = "Calme" ];then angle="vide"
elif [ "$direction" = "Nord" ];then angle="0"
elif [ "$direction" = "NNE" ];then angle="22.5"
elif [ "$direction" = "NE" ];then angle="45"
elif [ "$direction" = "ENE" ];then angle="67.5"
elif [ "$direction" = "Est" ];then angle="90"
elif [ "$direction" = "ESE" ];then angle="112.5"
elif [ "$direction" = "SE" ];then angle="135"
elif [ "$direction" = "SSE" ];then angle="157,5"
elif [ "$direction" = "Sud" ];then angle="180"
elif [ "$direction" = "SSO" ];then angle="202.5"
elif [ "$direction" = "SO" ];then angle="225"
elif [ "$direction" = "OSO" ];then angle="247.5"
elif [ "$direction" = "Ouest" ];then angle="270"
elif [ "$direction" = "ONO" ];then angle="292.5"
elif [ "$direction" = "NO" ];then angle="315"
elif [ "$direction" = "NNO" ];then angle="337.5"
else angle="vide"
fi


if [ "$angle" != "vide" ];then
 convert -background transparent $Rose/$couleur  -rotate "$angle" $reptemp/dir_rot.png
 composite -compose Over  -gravity Center $reptemp/dir_rot.png $Rose/base.png $reptemp/$nom.png
else
composite -compose Over  -gravity Center $Rose/Calme.png $Rose/base.png $reptemp/$nom.png
fi
convert $reptemp/$nom.png -font $repfonts/AlteHaasGroteskBold.ttf   \
-fill "$couleurfont" -pointsize 62 -gravity center -annotate +0-22 "$force"  \
-fill "$couleurfont" -pointsize 42 -gravity center -annotate +0+22 "km/h" $reptemp/$nom.png
mogrify -resize $taille!  $reptemp/$nom.png
composite -blend 0x$opacite null: $reptemp/$nom.png -matte  $reptemp/$nom.png

}

    barometre()
    {
# appel barometre taille opacité
HR=$(CC humid)
taille="$1";opacite="$2"
pression=$(CC pression)
tend=$(CC tendpression)
angle=$(echo "$((pression -980))*4.5-135"|bc)
if [ "$tend" == "hausse" ];then aiguille=$Barometre/aiguille-bleue.png
elif [ "$tend" == "baisse" ];then aiguille=$Barometre/aiguille-rouge.png
else
aiguille=$Barometre/aiguille.png
fi

convert -background transparent $aiguille -rotate "$angle" $reptemp/aiguille_rot.png
#ajouter la tendance
convert $Barometre/base.png -background transparent  -font $fonte  -pointsize 45  -gravity South  \
 -stroke white -strokewidth 2  -annotate +0+110 "H.R: $HR %" \
 -stroke  none   -fill blue    -annotate +0+110 "H.R: $HR %" \
  $reptemp/Barometre.png

composite -compose Over  -gravity Center  $reptemp/aiguille_rot.png $reptemp/Barometre.png  $reptemp/Barometre.png
mogrify -resize $taille!  $reptemp/Barometre.png
composite -blend 0x$opacite null: $reptemp/Barometre.png  -matte  $reptemp/Barometre.png

}
fi

#12 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 25/02/2013, à 16:18

daniel38100
Réponses : 2473
ragamatrix a écrit :

Est-ce possible d'afficher les mails avec le script "gmail.pl" ?
Avec conky c'est ce genre de syntaxe pour afficher les données du script :

 ${color 00CD00}${goto 75}${voffset -55}${font White-Rabbit-Regular:size=10}${color FF4500}${execi 1200 perl ~/.conky/gmail.pl n}${color FFD700} message(s) 

Mais dans macomposition.sh je ne sais pas comment faire ?
J'ai commencé un cadre avec infos pratiques comme ça juste pour le texte (sans appeler le script gmail) :

 ###### Infos_Pratiques ------######-------#####--------#####-------------####
convert -size 331x171 xc:none  -fill none -strokewidth 1 -stroke firebrick3 -draw "roundrectangle 1,1 330,169 15,15" $imagetemp
#############
convert -background none -fill $coultemp3 -font White-Rabbit-Regular -pointsize 15 -gravity center    label:"Infos pratiques" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+5 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#############################################################################
bord=10 ;pos1=140 ;pos2=150 ;posdepart=10 ;ecart=25

for (( x=1 ; x<6 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font White-Rabbit-Regular -pointsize 15 -fill $couleur1 \
-annotate +$pos1+$(((ecart*x)+posdepart)) ":" \
$imagetemp
done

convert $imagetemp -background transparent \
-gravity Northwest -font White-Rabbit-Regular -pointsize 15 -fill $couleur1 -annotate +$bord+$(((ecart*1)+posdepart)) "Fixe " -annotate +$pos2+$(((ecart*1)+posdepart)) "xxxxxxxx" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Bureau x " -annotate +$pos2+$(((ecart*2)+posdepart)) "xxxxxxx" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Portable x " -annotate +$pos2+$(((ecart*3)+posdepart)) "xxxxxxx" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Portable x " -annotate +$pos2+$(((ecart*4)+posdepart)) "xxxxxxxxx" \
-annotate +$bord+$(((ecart*5)+posdepart)) "Gmail " -annotate +$pos2+$(((ecart*5)+posdepart)) " message(s)" \
$imagetemp

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/Infos-pratiques.png
 

met gmail.pl dans extra et test ca

################################################################################
 ###### Infos_Pratiques ------######-------#####--------#####-------------####
convert -size 331x171 xc:none  -fill none -strokewidth 1 -stroke firebrick3 -draw "roundrectangle 1,1 330,169 15,15" $imagetemp
#############
convert -background none -fill $coultemp3 -font White-Rabbit-Regular -pointsize 15 -gravity center    label:"Infos pratiques" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+5 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
#############################################################################
bord=10 ;pos1=140 ;pos2=150 ;posdepart=10 ;ecart=25
### gmail
gmail=`perl $meteo_rep/scripts/extra/gmail.pl n`
for (( x=1 ; x<6 ; x++ ));do
convert $imagetemp -background transparent -gravity Northwest -font White-Rabbit-Regular -pointsize 15 -fill $couleur1 \
-annotate +$pos1+$(((ecart*x)+posdepart)) ":" \
$imagetemp
done

convert $imagetemp -background transparent \
-gravity Northwest -font White-Rabbit-Regular -pointsize 15 -fill $couleur1 -annotate +$bord+$(((ecart*1)+posdepart)) "Fixe " -annotate +$pos2+$(((ecart*1)+posdepart)) "xxxxxxxx" \
-annotate +$bord+$(((ecart*2)+posdepart)) "Bureau x " -annotate +$pos2+$(((ecart*2)+posdepart)) "xxxxxxx" \
-annotate +$bord+$(((ecart*3)+posdepart)) "Portable x " -annotate +$pos2+$(((ecart*3)+posdepart)) "xxxxxxx" \
-annotate +$bord+$(((ecart*4)+posdepart)) "Portable x " -annotate +$pos2+$(((ecart*4)+posdepart)) "xxxxxxxxx" \
-annotate +$bord+$(((ecart*5)+posdepart)) "Gmail " -annotate +$pos2+$(((ecart*5)+posdepart)) "$gmail message(s)" \
$imagetemp

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/Infos-pratiques.png

#13 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 25/02/2013, à 18:41

daniel38100
Réponses : 2473
jpdipsy a écrit :

Toutes,tous

Donc j'ai mis à jour:
recmeteo v1.15
meteo et start-recmeteo
et vous trouverez inclus guy-recmeteo qui permet de faire les actions autrement qu'en console.
C'est juste pour start-recmeteo pour le moment et attention il ne s'utilise qu'avec defaut.cfg (pour le moment I riz pit pour le moment !!)

pourrai tu inclure cette ligne dans meteo pour ceux qui n'utilise pas gnome-session mais gnome-shell

elif [[ `ps aux | grep -e "[g]nome-shell"` ]] ; then fondactuel=`gsettings get org.gnome.desktop.background picture-uri |sed s/.$// | cut -c9- `;fondori=gs-fondori

#14 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 25/02/2013, à 19:20

daniel38100
Réponses : 2473
jpdipsy a écrit :
daniel38100 a écrit :
jpdipsy a écrit :

Toutes,tous

Donc j'ai mis à jour:
recmeteo v1.15
meteo et start-recmeteo
et vous trouverez inclus guy-recmeteo qui permet de faire les actions autrement qu'en console.
C'est juste pour start-recmeteo pour le moment et attention il ne s'utilise qu'avec defaut.cfg (pour le moment I riz pit pour le moment !!)

pourrai tu inclure cette ligne dans meteo pour ceux qui n'utilise pas gnome-session mais gnome-shell

elif [[ `ps aux | grep -e "[g]nome-shell"` ]] ; then fondactuel=`gsettings get org.gnome.desktop.background picture-uri |sed s/.$// | cut -c9- `;fondori=gs-fondori

C'est fait thank you

faudrai ajouter les huit heures suivente aussi

#15 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 25/02/2013, à 19:37

daniel38100
Réponses : 2473
jpdipsy a écrit :
daniel38100 a écrit :

faudrai ajouter les huit heures suivente aussi

Elles y sont depuis le début suffit faire une boucle.  prev_huit de 1 à 8

for (( x=1 ; x<9 ; x++ ));do
$(prev_huit $x temp)
done par ex:

mais ya huitHeures2 maintenan
moi g mis

    prev_huit()
    {
    #appel prev_huit 1 vent
    heure=1;temp=9;ressent=17;humid=25;pluie=33;neige=41;verglas=49;vent=57;vent_force=57;uv=65;couv=73;rosee=81;ico=89

    fich="$repsauv/huitHeures1";hre=$1;ref=$2;ligne="$(( $[ref] + $hre ))"

    if [ "$ref" = "temp" ]||[ "$ref" = "ressent" ]||[ "$ref" = "humid" ]||[ "$ref" = "pluie" ]||[ "$ref" = "neige" ]||[ "$ref" = "verglas" ] \
    ||[ "$ref" = "couv" ]||[ "$ref" = "rosee" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%?}
    elif [ "$ref" = "vent" ];then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f3)";form_vent
    elif [ "$ref" = "vent_force" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%????}
    elif [ "$ref" = "icovent" ];then ligne="$(( 57 + $hre ))";force="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";direction="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2|cut -d " " -f3)";ico_vent
    elif [ "$ref" = "ico" ]; then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";etat_jour; resultat="$IconesRep/$moment/$resultat.png"
    else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)"
    fi

    echo "$resultat"
    }
    prev_huit1()
    {
    #appel prev_huit 1 vent
    heure=1;temp=9;ressent=17;humid=25;pluie=33;neige=41;verglas=49;vent=57;vent_force=57;uv=65;couv=73;rosee=81;ico=89

    fich="$repsauv/huitHeures2";hre=$1;ref=$2;ligne="$(( $[ref] + $hre ))"

    if [ "$ref" = "temp" ]||[ "$ref" = "ressent" ]||[ "$ref" = "humid" ]||[ "$ref" = "pluie" ]||[ "$ref" = "neige" ]||[ "$ref" = "verglas" ] \
    ||[ "$ref" = "couv" ]||[ "$ref" = "rosee" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%?}
    elif [ "$ref" = "vent" ];then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f3)";form_vent
    elif [ "$ref" = "vent_force" ];then result=$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2);resultat=${result%????}
    elif [ "$ref" = "icovent" ];then ligne="$(( 57 + $hre ))";force="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";direction="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2|cut -d " " -f3)";ico_vent
    elif [ "$ref" = "ico" ]; then resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)";etat_jour; resultat="$IconesRep/$moment/$resultat.png"
    else resultat="$(sed -n ""$ligne"p" "$fich"|cut -d ":" -f2 |cut -d " " -f2)"
    fi

1361814467.png

#16 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 26/02/2013, à 10:10

daniel38100
Réponses : 2473
jpdipsy a écrit :

Toutes,tous

Correction meteo  qui faisait que ça plantait (un doigt avait dérapé) +ajout huitheures x16

ah bien on va pouvoir travailler

#17 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 26/02/2013, à 11:55

daniel38100
Réponses : 2473

@ragamatrix
tu me passera ton barognuplot.sh quand il fonctionnera stp

#18 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 26/02/2013, à 11:59

daniel38100
Réponses : 2473
daniel38100 a écrit :

@ragamatrix
tu me passera ton barognuplot.sh quand il fonctionnera stp

ah nan c'est bon ça marche

#19 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 27/02/2013, à 19:19

daniel38100
Réponses : 2473

@ragamatrix et phillinux

pour le barograph c'est mieux de l'utiliser dans ce genre car là comme ragamatrix si tu veu le déplacer tu est obliger de deplacer le cadre et le graph separement

# Barograph ------------------------------------------------------------------
convert -size 345x200 xc:none  -fill none -strokewidth 1 -stroke firebrick3 -draw "roundrectangle 1,1 344,199 15,15" $imagetemp
# ---------------------------------------------------------------------------------------
convert -background none -fill $coultemp3 -font Harlow-Solid-Italic-Italic -pointsize 20 -gravity center    label:"Pression et Température" \
\( +clone -background black  -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp1
composite  -gravity North -background transparent -geometry +0+5 -dissolve 65% $imagetemp1   $imagetemp $imagetemp
# lancement script ------------------------------------------------------------------
$meteo_rep/scripts/extra/barognuplot.sh &&
bord=5 ;pos1=40 ;pos2=305 ;posdepart=29 ;ecart=27

for (( x=1 ; x<4 ; x++ ));do
convert $imagetemp -background transparent \
$meteo_rep/images/graph2.png -background transparent -gravity North -geometry +0+7 -composite \
-gravity Northwest -font $fonte -pointsize 11 -fill green2 -annotate +$bord+$posdepart "40 C°"  -fill red -annotate +$pos2+$posdepart " 1040mb" \
-fill green2 -annotate +$bord+$(((ecart*1)+posdepart)) "20 C°" -fill red -annotate +$pos2+$(((ecart*1)+posdepart)) " 1020mb" \
-fill green2 -annotate +$bord+$(((ecart*2)+posdepart)) "0 C°" -fill red -annotate +$pos2+$(((ecart*2)+posdepart)) " 1000mb" \
-fill green2 -annotate +$bord+$(((ecart*3)+posdepart)) "-20 C°" -fill red -annotate +$pos2+$(((ecart*3)+posdepart)) " 980mb" \
-fill red -annotate +$pos2+$(((ecart*4)+posdepart)) " 960mb" \
$imagetemp
done

# ombres cartouche ------------------------------------------------------------
convert $imagetemp -bordercolor None -border 11x11 \( +clone -background black -shadow 100x2 \) -compose DstOver -composite -compose Over  $reptemp/BaroGraph.png

#20 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 07/03/2013, à 13:58

daniel38100
Réponses : 2473

je sais pas pk j'ai un problème de recup d'info après  semaine sans utiliser le pc j’ai mis a jour et tjr la même erreur au jour 6

daniel@daniel-desktop:~$ Version = 1.17
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
problème de récupération de donées
 essais n°2
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°3
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°4
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°5
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°6
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°7
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°8
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°9
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
~/Accuweather/start-recmeteo.sh stop
arret

j'ai laisser tourné un moment pour voir mais tjr pareil

#21 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 07/03/2013, à 14:51

daniel38100
Réponses : 2473

@jpdipsy
en laissant tournée ça marche doit yavoir quelque chose dans la connexion

j'ai redémarrer mon routeur et tout fonctionne nickel

#22 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 08/03/2013, à 14:30

daniel38100
Réponses : 2473
Didier-T a écrit :
daniel38100 a écrit :

je sais pas pk j'ai un problème de recup d'info après  semaine sans utiliser le pc j’ai mis a jour et tjr la même erreur au jour 6

daniel@daniel-desktop:~$ Version = 1.17
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
problème de récupération de donées
 essais n°2
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°3
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°4
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°5
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°6
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°7
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°8
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
problème de récupération de donées
 essais n°9
page : http://www.accuweather.com/fr/fr/grenoble/136555/daily-weather-forecast/136555?day=6
~/Accuweather/start-recmeteo.sh stop
arret

j'ai laisser tourné un moment pour voir mais tjr pareil

Tu as expérimenté le problème récurant sous 12.04, ou un soucis similaire.
j'espère que sa restera un cas isolé, sinon sa risque de devenir le bazar.

apparemment yavais un problème de connexion avec ma box vu que quand je l'ai redémarrer  ça marchais

#23 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 12/03/2013, à 09:48

daniel38100
Réponses : 2473

@ jpdipsy
ya une erreur dans les prévision a seize heures au niveau du vent
que j'ai regler en modifian un peu le script ce qui donne ca

prev_huit()
{
    hre=$1;ref=$2
    #appel prev_huit 1 vent
    heure="Heure";temp="Temp. (°C)";ressent="RealFeel®";humid="Humidité";pluie="Pluie";neige="Neige";verglas="Verglas"
    vent="Vent (km/h)";vent_force="Vent (km/h)";uv="Indice UV1";couv="Couverture nuageuse";rosee="Point de rosée";ico="icone"
    #refer indirecte
    ref="$2";eval ref1=\$$2

    if (( "$hre" > "8" ));then
        fich="$repsauv/huitHeures2"; pos=$(($hre-8));ref1="$ref1$pos"
    else
        fich="$repsauv/huitHeures1"; pos=$hre;ref1="$ref1$pos"
    fi    
   
    if [ "$ref" = "vent" ];then resultat="$(fgrep -w "$ref1:" "$fich"|cut -d ":" -f2 |cut -d " " -f3)";form_vent
    elif [ "$ref" = "icovent" ];then
     force="$(fgrep -w "Vent (km/h)$pos:" "$fich"|cut -d ":" -f2 |egrep -o '[[:digit:]]*')";direction="$(fgrep -w "Vent (km/h)$pos:" "$fich"|cut -d ":" -f2 |cut -d " " -f3)";ico_vent
    elif [ "$ref" = "ico" ]; then etat_jour;icon="$(fgrep -w "$ref1:" "$fich"|cut -d " " -f2)"; resultat="$IconesRep/$moment/$icon.png"
    else resultat="$(fgrep -w "$ref1:" "$fich"|cut -d ":" -f2|egrep -o '[[:digit:]]*')"
    fi
    echo "$resultat"
    }

et j'ai cette erreur pour la lunaison ca marchai tres bien jusqu'a ce matin

/home/daniel/Accuweather/scripts/meteo: ligne 586: ((((((12h : valeur trop grande pour la base (le symbole erroné est "12h")
convert: l'option a besoin d'un argument `-rotate' @ error/convert.c/ConvertImageCommand/2377.
mise a jour en : 47.1596519947052

#24 Re : -1 »  [Conky] Alternative à weather.com (2) » Le 19/03/2013, à 10:58

daniel38100
Réponses : 2473

@jpdipsy

ça va pas les prévision a seize heures j'ai pas les icônes
1363683368.png
merci d’avance