#0 Re : -1 » [Conky] Alternative à weather.com (3) » Le 07/05/2013, à 18:10
- ragamatrix
- Réponses : 581
@jpdipsy
Ah oui aussi j' y pensais... J'aimais bien l'effet de 'reflection' avec les icones...
Moi j'dis ça.. j'dis rien...
EDIT:
J'ai retrouvé le code mais je n'arrive pas à le mettre en place pour l'appliquer aux icones... ![]()
convert $imagetemp -alpha on \( +clone -flip -channel A -evaluate multiply .35 +channel \) -append $repertimages/CartPrev.png +swap -gravity North -geometry +186+80 -composite $repertimages/CartPrev.png #1 Re : -1 » [Conky] Alternative à weather.com (3) » Le 08/05/2013, à 17:07
- ragamatrix
- Réponses : 581
#2 Re : -1 » [Conky] Alternative à weather.com (3) » Le 08/05/2013, à 21:16
- ragamatrix
- Réponses : 581
@enebre
Tiens on dirait un fan de "space invaders" ![]()
#3 Re : -1 » [Conky] Alternative à weather.com (3) » Le 10/05/2013, à 10:20
- ragamatrix
- Réponses : 581
Salut;
J'ai un petit script pour récupérer des liens rss :
#!/bin/bash
# RSS Display Script by Bill Woodford (admin@sdesign.us) v1.0
#
# This script is designed to output story titles for most any RSS Feed.
#
# This script depends on curl. Please ensure it is installed and in your $PATH
# Gentoo: emerge -av net-misc/curl
# Debian: apt-get install curl
# Homepage: http://curl.haxx.se/
#
# Usage:
# .conkyrc: ${execi [time] /path/to/script/conky-rss.sh URI LINES TITLENUM}
# URI = Location of feed, ex. http://www.gentoo.org/rdf/en/glsa-index.rdf
# LINES = How many titles to display (default 5)
# TITLENUM = How many times the title of the feed itself is specified, usually 1 or 2 (default 2)
#
# Usage Example
# ${execi 300 /home/youruser/scripts/conky-rss.sh http://www.foxnews.com/xmlfeed/rss/0,4313,1,00.rss 4 2}
#RSS Setup - Don't change unless you want these values hard-coded!
uri=$1 #URI of RSS Feed
lines=$2 #Number of headlines
titlenum=$3 #Number of extra titles
#Script start
#Require a uri, as a minimum
if [[ "$uri" == "" ]]; then
echo "No URI specified, cannot continue!" >&2
echo "Please read script for more information" >&2
else
#Set defaults if none specified
if [[ $lines == "" ]]; then lines=5 ; fi
if [[ $titlenum == "" ]]; then titlenum=2 ; fi
#The actual work
curl -s --connect-timeout 30 $uri |\
sed -e 's/<\/title>/\n/g' |\
grep '<title>.*' |\
sed -e 's/<title>//' |\
head -n $(($lines + $titlenum)) |\
tail -n $(($lines)) | sed '2d'
fi Je voudrais le lancer dans 'macompo' et afficher les titres traités avec convert, j'ai essayé de cette manière:
#News---------------#######News#######News##News##########News#####News##--News---News-
##lancement script rss
rss=`sh $meteo_rep/scripts/extra/rss.sh rss http://www.courrierinternational.com/rss/t/une/rss.xml 4 2 n`
convert -background transparent -font $fonte1 -pointsize 15 -fill silver label:"News : $rss" -trim \
\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/news.png Mais je dois faire des erreurs de syntaxe ou "de coupe" merci si quelqu'un peut avoir une idée ?
retour erreur:
/home/raphix/Accuweather/scripts/extra/rss.sh: 40: /home/raphix/Accuweather/scripts/extra/rss.sh: /home/raphix/Accuweather/scripts/extra/rss.sh: 41: /home/raphix/Accuweather/scripts/extra/rss.sh: arithmetic expression: expecting EOF: "http://www.courrierinternational.com/rss/t/une/rss.xml"arithmetic expression: expecting EOF: "http://www.courrierinternational.com/rss/t/une/rss.xml + 4"
![]()
#4 Re : -1 » [Conky] Alternative à weather.com (3) » Le 10/05/2013, à 12:21
- ragamatrix
- Réponses : 581
Merci LapiGNU; Mais je dois m'y prendre comme un manche, je n'arrive à rien faire avec ce script aujourd'hui...
raphix@crunchbang:~/Accuweather/scripts/extra$ ./rss.sh rss http://news.google.fr/?output=rss
./rss.sh: ligne41: http://news.google.fr/?output=rss : erreur de syntaxe dans l'expression (le symbole erroné est "://news.google.fr/?output=rss")
./rss.sh: ligne40: http://news.google.fr/?output=rss + 2 : erreur de syntaxe dans l'expression (le symbole erroné est "://news.google.fr/?output=rss + 2")
raphix@crunchbang:~/Accuweather/scripts/extra$
#5 Re : -1 » [Conky] Alternative à weather.com (3) » Le 10/05/2013, à 12:53
- ragamatrix
- Réponses : 581
@LapiGNU
J'ai réussi à faire ça: 
Mais je ne sais pas me servir de sed pour que l'affichage soit correct:
#News---------------#######News#######News##News##########News#####News##--News---News-
##lancement script rss
rss=`wget -q -O - http://news.google.fr/?output=rss export=agenda.xml | sed -n 's#.*<title>\(.*\)</title>.*#\1#p'`
convert -background transparent -font $fonte1 -pointsize 15 -fill silver label:"News : $rss" -trim \
\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/news.png
##################### creation cartouche "actuel" #################################################### #6 Re : -1 » [Conky] Alternative à weather.com (3) » Le 10/05/2013, à 13:03
- ragamatrix
- Réponses : 581
avec ce lien rss ç'est pas trop mal...
rss=`wget -q -O - http://liberation.fr.feedsportal.com/c/32268/fe.ed/rss.liberation.fr/rss/9/ | sed -n 's#.*<title>\(.*\)</title>.*#\1#p'`
convert -background transparent -font $fonte1 -pointsize 15 -fill silver label:"News : $rss" -trim \
\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/news.png donne:
#7 Re : -1 » [Conky] Alternative à weather.com (3) » Le 10/05/2013, à 15:17
- ragamatrix
- Réponses : 581
c'est moi qui est déplacé le hs vers cette discussion plus approprié
@enebre la partie utile du script est
pour googlewget -q -O - http://news.google.fr/?output=rss export=agenda.xml | sed -n 's#.*<title>\(.*\)</title>.*#\1#p'pour libération
wget -q -O - http://liberation.fr.feedsportal.com/c/32268/fe.ed/rss.liberation.fr/rss/9/ | sed -n 's#.*<title>\(.*\)</title>.*#\1#p'maintenant je pense que conky peut faire plus simple je vais jeter un oeil
Salut;
Le truc c' est que j'utilise le script macomposition.sh de jpdipsy pour lancer d'autres scripts externes n'ayant pas forcément de rapport avec la météo (gmail; liens rss, et scripts xplanet...)... Donc la syntaxe est un peu différente que dans conky... Et les infos sont affichées sur le fond d'écran...
#8 Re : -1 » [Conky] Alternative à weather.com (3) » Le 12/05/2013, à 20:32
- ragamatrix
- Réponses : 581
@Ragamatrix (et ceux qui aiment)
Je suis en train de réintégrer le thermo classique avec comme différences le choix de la base indépendamment de la colonne d'alcool (de rien à ce que l'on veut , peut être même avec un masque pour la photo de la belle-mère ou du "N.A.C" il faut que je teste )
Ce devrai être fini demain.Maintenant que recmeteo est opérationnel sur un large panel de distrib je vais m' occupé de la version 2 à plein temps donc beaucoup moins présent.
A+
Wouahh...
Exactement ce que je recherchais à faire, c'est une excellente nouvelle. 5/5 jpdipsy !!
Merci ![]()
#9 Re : -1 » [Conky] Alternative à weather.com (3) » Le 13/05/2013, à 15:40
- ragamatrix
- Réponses : 581
Compo N&B en cours avec 2 conkys (système et musique)
Compo n&b
je n'ai pas encore mis à jour recmeteo, mais ça tourne nickel depuis plusieurs jours après le changement de distro.
#10 Re : -1 » [Conky] Alternative à weather.com (3) » Le 14/05/2013, à 18:53
- ragamatrix
- Réponses : 581
@jpdipsy
Merci pour cette gentille attention. Je test ça dès que j'ai plus de temps...
ça à l'air très sympa bravo ![]()
#11 Re : -1 » [Conky] Alternative à weather.com (3) » Le 15/05/2013, à 15:47
- ragamatrix
- Réponses : 581
Merci jpdipsy je viens de faire la mise à jour.
Je n'ai pas bien compris comment créer un thermo avec seulement la colonne d'alcool et les graduations (sans masque ni fond) ?
J'ai essayé ça :
image_thermo=$(crea_ombre "$(thermo CC 40 100 3 6)" "2") pour ne pas avoir de fond mais ça ne marche pas.
comme ceci j'arrive à créer un thermo mais avec un fond...
image_thermo=$(crea_ombre "$(thermo CC 40 100 metal 3 6)" "2") #12 Re : -1 » [Conky] Alternative à weather.com (3) » Le 15/05/2013, à 17:52
- ragamatrix
- Réponses : 581
MERCI ! ![]()

#13 Re : -1 » [Conky] Alternative à weather.com (3) » Le 16/05/2013, à 12:50
- ragamatrix
- Réponses : 581
Tous aux abris !!!
ça c'est de l'alerte ![]()
#14 Re : -1 » [Conky] Alternative à weather.com (3) » Le 21/05/2013, à 15:44
- ragamatrix
- Réponses : 581
@jpdipsy
Salut.
Bientôt une piste atterrissage ? ![]()
Sinon je combine ton script et xplanet (la fonction du changement de taille est très pratique) j' ai rajouté Mars aujourd'hui; mais je n'arrive pas à voir "curiosity" faire son forage ![]()
J' ai eu aussi une idée concernant le vent. Lorsque la flèche tourne elle indique la direction avec la couleur du palier vent. Donc on ne verrait que la flèche avec la force et les directions... Peut-être encore un peu farfelue... ?
#15 Re : -1 » [Conky] Alternative à weather.com (3) » Hier à 10:58
- ragamatrix
- Réponses : 581
bonjour daniel38100
Tu es sur quelle distribution ?
#16 Re : -1 » [Conky] Alternative à weather.com (3) » Hier à 12:41
- ragamatrix
- Réponses : 581
#17 Re : -1 » [Conky] Alternative à weather.com (3) » Hier à 15:40
- ragamatrix
- Réponses : 581
@carpediem
Salut;
Pour la météo sous forme de cercle il s'agit de l'affichage sur le fond d'écran et pas de conky. Donc le fichier "macomposition.sh" que tu auras nommé comme tu veux et appelé dans le "defaut cfg"...
Je te poste cette composition dans laquelle tu devras supprimer ou commenter mes scripts externes, tu pourras t'en inspirer et la modifier comme tu veux (tu gagneras du temps) la manière dont sont reconnu les polices aussi car je suis sous crunchbang alors ça change...Il y aussi dans ce script l'integration du graph pression et température que tu utilisais je crois...barognuplot.sh (tu devras le modifier je pour les conditions courantes et le mettre dans le dossier Accuweather/scripts/extra/....
cercle12.sh:
#!/bin/bash
##################################################
# #
#destination="/tmp/test.png" #
source $meteo_rep/scripts/meteo $meteo_config $2 # entêtes obligatoires
if [ "$start" = "non" ] ;then exit;fi # dans votre fichier
##################################################
# Créé le : mar. 19 mars 2013 09:11:02 CET
# Par : climatix
########## Début de votre composition ############
#------------------ Variables que vous pouvez modifier ------------------------
fonte=HelveticaLTStd-Bold # fonte generique
fonte1=Lobster1.4 # fonte ville
fonte2=Droid-Sans-Bold # fonte cond act
fonte3=Arrows # fonte pour la tendance barometrique
couleur1=white ; couleur2=orangered # couleur texte
# couleurs
coul1="aqua";coul2="dodgerblue1";coul3="yellow";coul4="white";coul5="springgreen";coul6="red";coul7="black"
# temperatures ----------------------------------------------------------------
function coultemp
{
if (($temp < -5 )); then
coul=$coul1
elif (($temp < 1 && $temp > -6 )); then
coul=$coul2
elif (($temp < 6 && $temp > 0)); then
coul=$coul3
elif (($temp < 20 && $temp > 5 )); then
coul=$coul4
elif (($temp < 25 && $temp > 19 )); then
coul=$coul5
elif (($temp > 24 )); then
coul=$coul6
else coul=$coul7
fi
}
function risqueverglas
{
verglas="non"
if (($temp < 2 )); then
verglas="oui"
fi
}
#####################TEMPéRATURES######################################
#######################################################################
temp=$(CC temp) ; coultemp
ima_max=$(crea_texte_multi "max" "$fonte" "15" "0" "black" "$coul" "$temp°")
temp=$(CC ressent) ;risqueverglas; coultemp
ima_ress=$(crea_texte_multi "ress" "$fonte" "9" "0" "black" "$coul4" " /" "$coul" "r.$temp°")
temp=$(prev_jour 1 tmpmax ) ; coultemp
ima_max1=$(crea_texte_multi "max1" "$fonte" "9" "0" "black" "$coul4" "Max : " "$coul" "$temp°")
# temp la plus basse
function plusbas
{
if (("$temp1" < "$bas")); then bas="$temp1"; fi
}
temp="$(CC temp)";temp1="$(CC ressent)";bas="$temp";plusbas
temp1="$(prev_quart Nuit 1 ressentmin)";plusbas
temp=$bas;risqueverglas; coultemp
ima_min=$(crea_texte_multi "min" "$fonte" "9" "0" "black" "$coul4" "+Bas : " "$coul" "$temp°")
crea_cart "temperatures" "85x85" #creation du cartouche
ajout_ima_cart "temperatures" "NorthEast" "100" "0" "+40" "+12" "$ima_max"
ajout_ima_cart "temperatures" "Northwest" "100" "0" "+35" "+16" "$ima_ress"
ajout_ima_cart "temperatures" "North" "100" "0" "+0" "+25" "$ima_max1"
ajout_ima_cart "temperatures" "North" "100" "0" "+0" "+34" "$ima_min"
ajout_cart "temperatures" "North" "0" "+0" "+46" "Historique" $coul4 $fonte "8"
ajout_cart "temperatures" "North" "0" "+0" "+63" "$(prev_jour 1 tmpmaxlast)° / $(prev_jour 1 tmpminlast)°" $coul4 $fonte "10"
# incruste année --------------------------------------------------------------
an=`date +"%Y"`
crea_texte "histo" "85x20" "$[$an-1]" grey20 $fonte "9" "1" "orangered"
ajout_ima_cart "temperatures" "North" "100" "0" "+0" "+48" $image_histo "60"
crea_ombre "temperatures" "1" #creation de l'ombre du cartouche
##############################FIN THERMO###########################################
###################################################################################
### gmail### gmail### gmail### gmail### gmail### gmail### gmail### gmail### gmail##
#gmail=`perl $meteo_rep/scripts/extra/gmail.pl n`
#Gmail---------------###############################GMAIL##-------
#convert -background transparent -font $fonte1 -pointsize 50 -fill silver label:"Gmail : $gmail message(s)" -trim \
#\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/gmail.png
###################################################################################
# Lancements divers scripts -------##############------------------------------------------------
#$meteo_rep/scripts/extra/RandomNasa.pl &&
#$meteo_rep/scripts/extra/image_nasa_ghost.sh &&
#$meteo_rep/scripts/extra/gws.sh &&
#$meteo_rep/scripts/extra/detour_terre_xplanet.sh &&
####################################----------------------------------------------------#####################################################
#### lune info #####
convert -size 140x140 xc:transparent $reptemp/Lune.png -gravity center -geometry 90x90+0+0 -composite $reptemp/lune.png
convert -background none -fill blue -font $fonte -pointsize 10 -gravity center label:"$(lune ephe)" -trim \
\( +clone -background skyblue -shadow 100x1 -channel A -level 0,6% +channel \) +swap +repage -gravity center -composite $imagetemp
convert -background none -fill white -font $fonte -pointsize 11 -gravity center label:"$(lune age)" \
\( +clone -background black -shadow 120x1+4+4 \) +swap -background transparent -compose over -layers merge +repage \
$imagetemp1
composite -gravity center -background transparent -geometry +0-55 $imagetemp $reptemp/lune.png $reptemp/lune.png
composite -gravity center -background transparent -geometry +0+60 $imagetemp1 $reptemp/lune.png $reptemp/lune.png
rm $imagetemp;rm $imagetemp1
#DATE---------------#################################DATE#OCR-A-Extended-Normal###-------
convert -background transparent -font $fonte1 -pointsize 50 -fill silver label:"$(exec date "+%A %d %B %Y"|sed 's/^.\| [a-z]/\U&/g')" -trim \
\( +clone -background grey19 -shadow 100x1 -channel A -level 0,5% +channel \) +swap +repage -gravity center -composite $reptemp/date.png
#-- "prévisions8H --------------------------------------------------------------------------
# creation des 8 cercles de prev
tailleic=30; tailleic1=8
crea_cart "mes_previsions" "310x310" # creation cart final
ajout_ima_cart "mes_previsions" "center" "100" "0" "+0" "+0" "$(crea_graph "cercle_interieur" "cercle" "63" "none" "red" "1")"
ajout_ima_cart "mes_previsions" "center" "100" "0" "+0" "+0" "$(crea_graph "cercle_ext" "cercle" "137" "none" "red" "1")"
# ajout d'une image à mes_prévision de 30% de taille
# remplace /tmp/flocon.png par ton image et 30 par ce que tu veux
ajout_ima_cart "mes_previsions" "center" "80" "0" "+0" "+0" "$reptemp/lune.png"
# creation des 8 cercles + données
for (( x=1 ; x<9 ; x++ ));do
image_prev[x]=$(crea_graph "prev_$x" "cercle" "35" "none" "firebrick3" "1")
ajout_ima_cart "prev_$x" "center" "$tailleic" "0" "+0" "-10" "$(prev_huit $x ico)" "60"
ajout_cart "prev_$x" "North" "0" "+0" "+10" "$(prev_huit $x heure) H" $coul4 $fonte 12
ajout_cart "prev_$x" "North" "0" "-15" "+22" "$(prev_huit $x temp)°" $coul $fonte 10
ajout_ima_cart "prev_$x" "center" "$tailleic1" "0" "+0" "+10" "$(prev_huit $x icovent)"
ajout_cart "prev_$x" "North" "0" "+0" "+63" "$(prev_huit $x vent_force) km/h" $coul $fonte 8
# ajoute ce que tu veux
done
# placement des prev_$x dans cart final
ajout_ima_cart "mes_previsions" "center" "100" "0" "+0" "-100" "${image_prev[1]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "+70" "-71" "${image_prev[2]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "+100" "+0" "${image_prev[3]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "+71" "+71" "${image_prev[4]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "+0" "+100" "${image_prev[5]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "-71" "+71" "${image_prev[6]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "-100" "+0" "${image_prev[7]}"
ajout_ima_cart "mes_previsions" "center" "100" "0" "-71" "-71" "${image_prev[8]}"
crea_ombre "mes_previsions" "2"
##################### creation "actuel" sans cadre ###############################
###################################################################################
crea_cart "actuel" "180x135"
# ajout des données --------------------------------------------------------------------------------
coul=white;taille_fnt=11;ref_pos=Northwest;ecart=12;pos0=10;pos1=88;pos2=96;
# les libellé + le carac :
# appel: ajout_cart nom_image ref_positionnement rotation pos_lat pos_ht (signe + ou - obligat) "texte" coul fonte taille_fonte
for libelle in "Prob. Précip." "Humidité" "Pression-Tend" "Pluie / Neige" "Verglas" "Visibilité" "Levé - Couché" "Durée du jour" "Mise à jour à" "Prochaine à"
do
ajout_cart "actuel" "$ref_pos" "0" +10 +"$pos0" "$libelle" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos1" "+$pos0" ":" $coul $fonte $taille_fnt
pos0=$((pos0+ecart))
done
pos0=10
# les données --------------------------------------------------------------------
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$pos0" "$(prev_jour 1 precip) %" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*1)+pos0))" "$(CC humid) %" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*2)+pos0))" "$(CC pression) mb --" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*3)+pos0))" "$(prev_jour 1 pluie) mm / $(prev_jour 1 neige) cm" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*4)+pos0))" "$(prev_jour 1 verglas) mm" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*5)+pos0))" "$(CC visib) km U.V : $(CC uv)" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*6)+pos0))" "$(prev_jour 1 sollever)-$(prev_jour 1 solcouch)" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*7)+pos0))" "$(prev_jour 1 solduree)" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*8)+pos0))" "$maint" $coul $fonte $taille_fnt
ajout_cart "actuel" "$ref_pos" "0" "+$pos2" "+$(((ecart*9)+pos0))" "$proch_maj" $coul $fonte $taille_fnt
# tendance
tendpress=$(CC tendpression)
if [ "$tendpress" == "hausse" ];then tpos=-3; crea_tend "$tendpress" "25" $coul2
elif [ "$tendpress" == "baisse" ];then tpos=-3;crea_tend "$tendpress" "25" $coul6
else
tpos=0;crea_tend "$tendpress" "27" $coul5
fi
# appel: ajout_ima_cart nom_cart ref_positionnement taille_% rot pos_lat pos_ht (signe + ou - obligat) image (option transp)
ajout_ima_cart "actuel" "NorthEast" "100" "0" "+10" "+$((28+$tpos))" $reptemp/tend.png # ajout image tendance
im_finale_actuel=$(crea_ombre "actuel" "1") #creation de l'ombre du cartouche
#############################################################################
##################Fin actuel#################################################
####BAROGRAPH########BAROGRAPH########BAROGRAPH########BAROGRAPH####
crea_cart "bg" "355x190" "cadre" "firebrick3"
ajout_cart "bg" "North" "0" "+0" "+10" "Pression et Température" silver Harlow-Solid-Italic 20
# lancement script ------------------------------------------------
$meteo_rep/scripts/extra/barognuplot.sh &&
bord=17 ;pos1=50 ;pos2=305 ;posdepart=44 ;ecart=27
for (( x=1 ; x<4 ; x++ ));do
ajout_ima_cart "bg" "North" "100" "0" "+0" "+22" "$meteo_rep/images/graph2.png"
ajout_cart "bg" "Northwest" "0" "+$bord" "+$posdepart" "40 C°" green2 $fonte 11
ajout_cart "bg" "Northwest" "0" "+$pos2" "+$posdepart" "1040mb" red $fonte 11
ajout_cart "bg" "Northwest" "0" "+$bord" "+$(((ecart*1)+posdepart))" "20 C°" green2 $fonte 11
ajout_cart "bg" "Northwest" "0" "+$pos2" "+$(((ecart*1)+posdepart))" "1020mb" red $fonte 11
ajout_cart "bg" "Northwest" "0" "+$bord" "+$(((ecart*2)+posdepart))" "0 C°" green2 $fonte 11
ajout_cart "bg" "Northwest" "0" "+$pos2" "+$(((ecart*2)+posdepart))" "1000mb" red $fonte 11
ajout_cart "bg" "Northwest" "0" "+$bord" "+$(((ecart*3)+posdepart))" "-20 C°" green2 $fonte 11
ajout_cart "bg" "Northwest" "0" "+$pos2" "+$(((ecart*3)+posdepart))" "980mb" red $fonte 11
ajout_cart "bg" "Northwest" "0" "+$pos2" "+$(((ecart*4)+posdepart))" "960mb" red $fonte 11
done
crea_ombre "bg" "2"
####FIN##BAROGRAPH########FIN##BAROGRAPH########FIN##BAROGRAPH#####
###################################################################
###############################11_jours + outils ##################
# creation rose
image_rose="$(rose CC vent 120x120 100)"
# creation baro
image_baro="$(barometre 160x160 100)"
crea_graph "tool_R" "cercle" "40" "none" "firebrick3" "1"
ajout_ima_cart "tool_R" "center" "68" "0" "+0" "+0" "$image_rose"
crea_graph "tool_B" "cercle" "40" "none" "firebrick3" "1"
ajout_ima_cart "tool_B" "center" "50" "0" "+0" "+0" "$image_baro"
##################################################
crea_cart "cart" "720x720" # creation cart final
ajout_ima_cart "cart" "center" "100" "0" "+0" "+0" "$(crea_graph "cercle_interieur" "cercle" "150" "none" "red" "1")"
ajout_ima_cart "cart" "center" "100" "0" "+0" "+0" "$(crea_graph "cercle_ext" "cercle" "250" "none" "red" "1")"
# creation des 10 cercles + données
tailleic=20; tailleic1=4
for (( x=1 ; x<11 ; x++ ));do
image_p[x]=$(crea_graph "p_$x" "cercle" "40" "none" "firebrick3" "1")
ajout_ima_cart "p_$x" "center" "$tailleic" "0" "+11" "-7" "$(prev_jour $x ico)"
ajout_cart "p_$x" "North" "0" "+0" "+15" "$(date --date "$x day" +%A|sed -e 's/\(.\{1\}\)/\U\1/')" $coul4 $fonte 9
ajout_cart "p_$x" "North" "0" "-20" "+27" "J:$(prev_jour $x temp)°" $coul4 $fonte 9
ajout_cart "p_$x" "North" "0" "-20" "+38" "N:$(prev_jour $x nuit_temp)°" $coul4 $fonte 9
ajout_ima_cart "p_$x" "south" "$tailleic1" "0" "+0" "+20" "$(prev_jour $x icovent)"
ajout_cart "p_$x" "south" "0" "+0" "+30" "$(prev_jour $x vent)" $coul4 $fonte 9
ajout_cart "p_$x" "south" "0" "+0" "+10" "$(prev_jour $x vent_force) km/h" $coul4 $fonte 9
done
# placement des prev_$x dans cart final"-170" "+100"
ajout_ima_cart "cart" "center" "100" "0" "+0" "-200" "$reptemp/p_1.png"
ajout_ima_cart "cart" "center" "100" "0" "+100" "-175" "$reptemp/p_2.png"
ajout_ima_cart "cart" "center" "100" "0" "+175" "-100" "$reptemp/p_3.png"
ajout_ima_cart "cart" "center" "100" "0" "+200" "+0" "$reptemp/p_4.png"
ajout_ima_cart "cart" "center" "100" "0" "+175" "+100" "$reptemp/p_5.png"
ajout_ima_cart "cart" "center" "100" "0" "+100" "+175" "$reptemp/p_6.png"
ajout_ima_cart "cart" "center" "100" "0" "-0" "+200" "$reptemp/p_7.png"
ajout_ima_cart "cart" "center" "100" "0" "-100" "+175" "$reptemp/p_8.png"
ajout_ima_cart "cart" "center" "100" "0" "-173" "+100" "$reptemp/p_9.png"
ajout_ima_cart "cart" "center" "100" "0" "-200" "+0" "$reptemp/p_10.png"
ajout_ima_cart "cart" "center" "100" "0" "-175" "-100" "$reptemp/tool_R.png"
ajout_ima_cart "cart" "center" "100" "0" "-100" "-175" "$reptemp/tool_B.png"
ajout_ima_cart "cart" "center" "100" "0" "+0" "+0" "$reptemp/actuel.png"
crea_ombre "cart" "2"
########### Durées JOURS + 10 #########
crea_cart "cart2" "500x500" # creation cart final
#ajout_ima_cart "cart2" "center" "100" "0" "+0" "+0" "$(crea_graph "cercle_interieur" "cercle" "150" "none" "red" "2")"
# creation des 10 cercles + données
#tailleic=20; tailleic1=4
for (( x=1 ; x<11 ; x++ ));do
image_C[x]=$(crea_cart "C_$x" "90x90")
#
#ajout_ima_cart "C_$x" "center" "40" "0" "+0" "+0" "$meteo_rep/images/Sun.png" "75"
ajout_cart "C_$x" "North" "0" "+0" "+17" "$(date --date "$x day" +%A|sed -e 's/\(.\{1\}\)/\U\1/')" $coul4 $fonte 9
ajout_cart "C_$x" "North" "0" "+0" "+32" "Lever:$(prev_jour $x sollever)" $coul4 $fonte 9
ajout_cart "C_$x" "North" "0" "+0" "+43" "Coucher:$(prev_jour $x solcouch)" $coul4 $fonte 9
ajout_cart "C_$x" "North" "0" "+0" "+54" "Durée:$(prev_jour $x solduree)" $coul4 $fonte 9
done
# placement des C_$x dans cart2 final"-170" "+100"
ajout_ima_cart "cart2" "center" "100" "0" "-60" "-180" "$reptemp/C_1.png"
ajout_ima_cart "cart2" "center" "100" "0" "+60" "-180" "$reptemp/C_2.png"
ajout_ima_cart "cart2" "center" "100" "0" "+155" "-111" "$reptemp/C_3.png"
ajout_ima_cart "cart2" "center" "100" "0" "+193" "+0" "$reptemp/C_4.png"
ajout_ima_cart "cart2" "center" "100" "0" "+155" "+112" "$reptemp/C_5.png"
ajout_ima_cart "cart2" "center" "100" "0" "+60" "+180" "$reptemp/C_6.png"
ajout_ima_cart "cart2" "center" "100" "0" "-60" "+180" "$reptemp/C_7.png"
ajout_ima_cart "cart2" "center" "100" "0" "-155" "+112" "$reptemp/C_8.png"
ajout_ima_cart "cart2" "center" "100" "0" "-193" "+0" "$reptemp/C_9.png"
ajout_ima_cart "cart2" "center" "100" "0" "-155" "-111" "$reptemp/C_10.png"
#ajout_ima_cart "cart2" "center" "100" "0" "+0" "+0" "/tmp/sphere_satireu1.png"
crea_ombre "cart2" "2"
#####################
# taille du cartouche ville jouez sur l'echelle pour des grands noms de ville
# ex 100 taille normal 50 taille moitié
max=9
caracville=$(echo $(CC ville)|wc -m)
if [ "$caracville" -gt "$max" ];then
taille_ville=100
else
taille_ville=100
fi
# position de 0 à ce que vous voulez pour aligner avec une autre fonte
# ex : -10 pour descendre +10 pour remonter
position_ville=100
# ville -----------------------------------------------------------------------
convert -background transparent -font $fonte1 -pointsize 25 -fill dodgerblue label:"$(CC ville)" \
\( +clone -background Darkblue -shadow 120x1+2+2 \) +swap -background transparent -compose over -layers merge +repage \
$imagetemp
convert $imagetemp -channel A -blur 0x4 +channel -fill skyblue -colorize 0% $imagetemp1
convert -size 650x75 xc:transparent $imagetemp1 -background transparent -gravity center -geometry +0-0 -composite \
$imagetemp -background transparent -gravity center -composite $reptemp/ville.png
# mise en forme ville
convert -resize $taille_ville% $reptemp/ville.png $reptemp/ville.png
# creation rose + ombre
image_rose=$(crea_ombre "$(rose CC vent 120x120 100)" "1")
#creation conditions + ombre
#cond
image_textcond=$(crea_ombre "$(cond_cart CC 600 "$fonte2" centre red)" "1")
# alertes + ombre
image_alerte=$(crea_ombre " $(alerte_cart 750 "$fonte2" centre degra ico)" "1")
# versions ---------------------------------------------------------------------
crea_texte "versions" "200x20" "Meteo v-$Ver_meteo Recmeteo v-$vrecmeteo" "orange" $fonte "10"
crea_ombre "versions" "1"
# icone conditions actuel + ombre
image_icocond=$(crea_ombre "$(CC ico)" "5")
#ecran=1920x1080 # vous pouvez choisir votre format d'ecran
# copy du fond de base dans le $reptemp
convert -resize $ecran! "$fondbase" "$reptemp"/finale.png
decalagehaut=50 # Décalage depuis haut de l'ecran ex + 50 pour descendre -10 pour monter
#ajout_ima_cart "finale" "NorthEast" "100" "0" "+250" "+30" "$meteo_rep/images/image3.png"
#ajout_ima_cart "finale" "south" "100" "0" "+650" "+30" "$meteo_rep/images/image_nasa_ghost_blue.png"
ajout_ima_cart "finale" "east" "100" "0" "+25" "+60" "$image_cart2"
ajout_ima_cart "finale" "west" "100" "0" "+15" "-30" "$reptemp/ville.png"
ajout_ima_cart "finale" "NorthEast" "100" "0" "+60" "+70" "$reptemp/date.png"
#ajout_ima_cart "finale" "NorthEast" "100" "0" "+60" "+140" "$reptemp/gmail.png"
ajout_ima_cart "finale" "west" "35" "0" "+270" "+0" "$image_textcond"
ajout_ima_cart "finale" "south" "35" "0" "-600" "+60" "$image_alerte"
ajout_ima_cart "finale" "west" "100" "0" "+15" "+70" "$image_cart"
ajout_ima_cart "finale" "west" "40" "0" "+380" "-28" "$image_icocond"
ajout_ima_cart "finale" "west" "100" "0" "+260" "+140" "$image_versions"
ajout_ima_cart "finale" "west" "100" "0" "+340" "+178" "$image_temperatures"
ajout_ima_cart "finale" "South" "100" "0" "-170" "+50" "$image_mes_previsions"
ajout_ima_cart "finale" "South" "100" "0" "+270" "+70" "$image_bg"
#copy de l'image finale vers fond meteo ----------------------------------------
cp "$reptemp"/finale.png "$imagefinale"
affichage
exit #18 Re : -1 » [Conky] Alternative à weather.com (3) » Hier à 15:48
- ragamatrix
- Réponses : 581
ragamatrix a écrit :Encore une idée concernant la carte sat avec un affichage plus discret...
Si ça intérresse je poste...
http://pix.toile-libre.org/upload/img/1369305298.pngTrès bonne idée, tu peux poster STP ?
Merci
Ici même chose pour nommer les polices; tu devras utiliser cette commande pour savoir le nom exact de celles-ci chez toi :
convert -list font | grep [h] Tu mets la lettre [..?..] de la police recherchée...
radar-trans.sh:
#!/bin/bash
# Crée par JPDipsy et modifié par ragamatrix
# script de recupération imagesat couverture nuageuse http://www.sat24.com
# imagemagick doit être installé
#----------------------------------------------------------------------------------
path=`dirname $0`
heuremodif=`date +%H`; minmodif=`date +%M`
# ce que vous voulez
fonte=HelveticaLTStd-Bold
nomimage=radar-trans
tailleimage=90 # ceci est en pourcentage
tailledecoupe=450x450
rotation=0
libelle="Radar pluie infra rouge : "
wget -q -O /tmp/$nomimage.gif "http://www.meteo-mc.fr/dedie/Images/sat/satireu1.gif"
function mise_en_forme_image {
convert /tmp/$nomimage.png -background transparent -gravity South -splice 0x32 -density 150 \
-fill DodgerBlue2 -font $fonte -pointsize 9 -annotate 0x-3+0 "$libelle $heuremodif h $minmodif" /tmp/$nomimage.png
}
function ombre {
convert /tmp/$nomimage.png -bordercolor None -border 10x10 \( +clone -background silver -shadow 100x2 \) -compose DstOver -composite -compose Over /tmp/$nomimage.png
}
if [[ -e /tmp/$nomimage.gif ]] ; then
# decoupage de la partie utile
convert /tmp/$nomimage.gif -filter Lanczos -crop $tailledecoupe+140+110\! /tmp/$nomimage.png
mise_en_forme_image ; ombre ; rm /tmp/$nomimage.gif
else
# comme ça votre conky aura toujours une image au cas ou
convert -size $tailledecoupe plasma: /tmp/$nomimage.png
libelle="Désolé pas d'image radar à "
mise_en_forme_image ; ombre
fi Pour la transparence j'ai pas fais grand chose... C'est dans "macompo" que ça se passe comme ceci:
ajout_ima_cart "finale" "Southeast" "70" "0" "+15" "+400" "/tmp/radar-trans.png" "50" ----------->"50" c'est l'opacité que tu peux modifier...
Tu auras sûrement pas mal d'ajustements à faire avec la compo des cercles, n' hésites pas pour les questions j'essaierais d'aider à ma manière...
#19 Re : -1 » script renommant 12 images » Le 16/05/2013, à 10:21
- ragamatrix
- Réponses : 26
Bonjour;
Je reviens sur ce sujet car la solution proposée n'a pas l'air de fonctionner ou alors il y a quelque chose que je n'ai pas compris...
Lorsque je lance cette commande:
ln -sf $(date +"%m").jpeg earth.jpeg
pour voir si l'image du mois en cours (05.jpeg) est renomée en earth.jpeg cela ne fonctionne pas quand je vérifie dans le dossier concerné. /usr/share/xplanet/images
Les images sont nommées 01.jpeg jusqu'à--->12.jpeg
Par exemple 05.jpeg devrait s'appeler earth.jpeg pour ce mois-ci et le mois prochain retrouver ce nom: 05.jpeg. Ainsi de suite pour tous les mois...
#20 Re : -1 » script renommant 12 images » Le 16/05/2013, à 12:33
- ragamatrix
- Réponses : 26
merci pingouinux
Je ne suis pas une lumière pour la logique et la compréhension des commandes...
Donc j'ai fais ça :
raphix@crunchbang:~$ cd /usr/share/xplanet/images/
raphix@crunchbang:/usr/share/xplanet/images$ ln -sf $(date +"%m").jpeg earth.jpeg
ln: impossible de supprimer « earth.jpeg »: Permission non accordée
raphix@crunchbang:/usr/share/xplanet/images$
Ais-ja un problème de permission avec le dossier /usr ?
donne:
raphix@crunchbang:~$ ls -l
total 17188
drwxr-xr-x 11 raphix raphix 4096 mai 16 12:16 Accuweather
-rw-r--r-- 1 raphix raphix 2009 mai 5 15:03 autaustart1
drwxr-xr-x 2 raphix raphix 4096 avr 29 23:39 backup
-rw------- 1 raphix raphix 19050 avr 15 16:28 bevel
-rw-r--r-- 1 raphix raphix 136206 mai 8 17:29 bilal2.jpg
-rw-r--r-- 1 raphix raphix 235184 mai 8 17:31 bilal3.jpg
-rw-r--r-- 1 raphix raphix 405142 mai 8 17:36 bilal4.jpg
-rw-r--r-- 1 raphix raphix 590761 mai 8 17:37 bilal5.jpg
-rw-r--r-- 1 raphix raphix 1476135 mai 8 17:39 bilal6.jpg
drwxr-xr-x 2 raphix raphix 4096 avr 29 23:39 bin
drwxr-xr-x 24 raphix raphix 4096 avr 30 10:33 conky
drwxr-xr-x 6 raphix raphix 4096 aoû 3 2011 CrayonPhysicsDeluxe
-rw-r--r-- 1 raphix raphix 27154 mai 8 11:35 date.png
drwxr-xr-x 6 raphix raphix 4096 avr 30 11:09 deadbeef-0.5.6
-rw------- 1 raphix raphix 325 jun 20 2012 deadbeef.sh
drwxr-xr-x 2 raphix raphix 4096 mai 1 21:46 Desktop
drwxr-xr-x 28 raphix raphix 4096 avr 30 10:30 développement
drwxr-xr-x 2 raphix raphix 4096 mai 15 18:31 documents
drwxr-xr-x 4 raphix raphix 4096 mai 15 22:40 downloads
drwx------ 6 raphix raphix 4096 mai 5 15:12 Dropbox
lrwxrwxrwx 1 raphix raphix 7 mai 16 10:11 earth.jpeg -> 05.jpeg
-rw-r--r-- 1 raphix raphix 2 mai 2 10:20 fonts.dir
-rw-r--r-- 1 raphix raphix 2 mai 2 10:19 fonts.scale
drwxr-xr-x 2 raphix raphix 4096 avr 30 07:59 htdocs
-rw-r--r-- 1 raphix raphix 771995 mai 16 12:15 image3.png
drwxr-xr-x 15 raphix raphix 4096 mai 1 22:58 ImageMagick-6.8.5-4
-rw-r--r-- 1 raphix raphix 13665517 mai 1 22:22 ImageMagick.tar.gz
drwxr-xr-x 20 raphix raphix 4096 mai 1 23:02 images
drwxr-xr-x 142 raphix raphix 12288 mai 13 13:55 music
drwxrwxr-x 3 raphix raphix 4096 déc 26 19:08 PhotoFiltreLX-0.0.6.0-Alpha-src
-rw-r--r-- 1 raphix raphix 310 mai 8 12:27 reflect_alpha-0.png
-rw-r--r-- 1 raphix raphix 13344 mai 8 12:27 reflect_alpha-1.png
-rw-r--r-- 1 raphix raphix 52039 mai 8 12:36 reflect_alpha.png
-rw-r--r-- 1 raphix raphix 9831 mai 8 12:14 reflect_perfect.png
-rw-r--r-- 1 raphix raphix 4626 mai 8 11:57 s12.gif
-rw------- 1 raphix raphix 35486 mar 18 15:31 s12.png
-rw------- 1 raphix raphix 7990 mai 8 12:06 sun.png
drwxr-xr-x 2 raphix raphix 4096 avr 29 23:39 templates
drwxr-xr-x 2 raphix raphix 4096 avr 29 23:39 tmp
drwxr-xr-x 3 raphix raphix 4096 avr 30 14:50 v9000
drwxr-xr-x 4 raphix raphix 4096 avr 30 17:33 videos
Dois-je écrire ceci dans mon script ? :
#!/bin/bash
cd /usr/share/xplanet/images ln -sf $(date +"%m").jpeg earth.jpeg
#21 Re : -1 » script renommant 12 images » Le 16/05/2013, à 13:44
- ragamatrix
- Réponses : 26
Le script doit être écrit ainsi :
#!/bin/bash cd /usr/share/xplanet/images ln -sf $(date +"%m").jpeg earth.jpegQue donne la commande ?
ls -la /usr/share/xplanet/images/
ceci:
raphix@crunchbang:~$ ls -la /usr/share/xplanet/images/
total 23588
drwxr-xr-x 2 root root 4096 mai 16 12:40 .
drwxr-xr-x 13 root root 4096 mai 16 12:40 ..
-rw-r--r-- 1 root root 333745 sep 5 2012 01.jpeg
-rw-r--r-- 1 root root 334602 sep 5 2012 02.jpeg
-rw-r--r-- 1 root root 333046 sep 5 2012 03.jpeg
-rw-r--r-- 1 root root 326913 sep 5 2012 04.jpeg
-rw-r--r-- 1 root root 322977 sep 5 2012 05.jpeg
-rw-r--r-- 1 root root 314155 sep 5 2012 06.jpeg
-rw-r--r-- 1 root root 302028 sep 5 2012 07.jpeg
-rw-r--r-- 1 root root 301137 sep 5 2012 08.jpeg
-rw-r--r-- 1 root root 312619 sep 5 2012 09.jpg
-rw-r--r-- 1 root root 319674 sep 5 2012 10.jpeg
-rw-r--r-- 1 root root 330441 sep 5 2012 12.jpeg
-rw-r--r-- 1 root root 156874 fév 1 2009 ariel.jpg
-rw-r--r-- 1 root root 82373 sep 5 2012 bump.jpg
-rw-r--r-- 1 root root 629150 sep 5 2012 cloud_combined_2048.jpeg
-rw-r--r-- 1 root root 4761 oct 29 2012 clouds.jpeg
-rw-r--r-- 1 root root 568843 avr 28 18:42 clouds.jpg
-rw-r--r-- 1 root root 69147 fév 1 2009 deimos.jpg
-rw-r--r-- 1 root root 1614350 fév 1 2009 dione.jpg
-rw-r--r-- 1 root root 266599 nov 14 2011 earth1.jpg
-rw-r--r-- 1 root root 140925 déc 3 2011 earth-bumpmap_2048.jpg
lrwxrwxrwx 1 root root 7 mai 16 10:39 earth.jpeg -> 05.jpeg
-rw-r--r-- 1 root root 428632 sep 14 2012 earth.jpg
-rw-r--r-- 1 root root 107492 déc 3 2011 earth-specular.jpg
-rw-r--r-- 1 root root 4571110 fév 1 2009 enceladus.jpg
-rw-r--r-- 1 root root 4978 nov 14 2011 hubble.png
-rw-r--r-- 1 root root 4065324 fév 1 2009 iapetus.jpg
-rw-r--r-- 1 root root 4608 nov 14 2011 iss.png
-rw-r--r-- 1 root root 1522 mar 23 2002 latestmag10.png
-rw-r--r-- 1 root root 562 mar 23 2002 latestmag2.png
-rw-r--r-- 1 root root 921 mar 23 2002 latestmag3.png
-rw-r--r-- 1 root root 990 mar 23 2002 latestmag4.png
-rw-r--r-- 1 root root 1431 mar 23 2002 latestmag5.png
-rw-r--r-- 1 root root 1326 mar 23 2002 latestmag6.png
-rw-r--r-- 1 root root 1541 mar 23 2002 latestmag7.png
-rw-r--r-- 1 root root 794 mar 23 2002 latestmag8.png
-rw-r--r-- 1 root root 1675 mar 23 2002 latestmag9.png
-rw-r--r-- 1 root root 7370 jan 6 2003 mag10.png
-rw-r--r-- 1 root root 695 jan 6 2003 mag2.png
-rw-r--r-- 1 root root 1269 jan 6 2003 mag3.png
-rw-r--r-- 1 root root 2032 jan 6 2003 mag4.png
-rw-r--r-- 1 root root 2985 jan 6 2003 mag5.png
-rw-r--r-- 1 root root 4051 jan 6 2003 mag6.png
-rw-r--r-- 1 root root 5106 jan 6 2003 mag7.png
-rw-r--r-- 1 root root 6222 jan 6 2003 mag8.png
-rw-r--r-- 1 root root 7212 jan 6 2003 mag9.png
-rw-r--r-- 1 root root 1937124 sep 1 2006 mars.jpg
-rw-r--r-- 1 root root 1429861 fév 1 2009 mercury.jpg
-rw-r--r-- 1 root root 6147 nov 14 2011 mgs.png
-rwxr-xr-x 1 root root 51 nov 4 2012 monthly.sh
-rw-r--r-- 1 root root 165884 déc 3 2011 moon-bumpmap.jpg
-rw-r--r-- 1 root root 165884 déc 3 2011 moon.jpg
-rw-r--r-- 1 root root 593163 déc 3 2011 moonmap.jpg
-rw-r--r-- 1 root root 151783 nov 14 2011 night1.jpg
-rw-r--r-- 1 root root 166433 sep 5 2012 night.jpg
-rw-r--r-- 1 root root 93323 fév 1 2009 oberon.jpg
-rw-r--r-- 1 root root 3979 nov 14 2011 odyssey.png
-rw-r--r-- 1 root root 138689 fév 1 2009 phobos.jpg
-rw-r--r-- 1 root root 368775 fév 1 2009 phoebe.jpg
-rw-r--r-- 1 root root 70 avr 29 10:13 README
-rw-r--r-- 1 root root 2548 nov 14 2011 shuttle.png
-rw-r--r-- 1 root root 189 nov 14 2011 smile.png
-rw-r--r-- 1 root root 209 nov 14 2011 sublunar.png
-rw-r--r-- 1 root root 227 nov 14 2011 subsolar.png
-rw-r--r-- 1 root root 8821 nov 14 2011 sun.jpg
-rw-r--r-- 1 root root 1483819 fév 1 2009 tethys.jpg
-rw-r--r-- 1 root root 135277 fév 1 2009 titania.jpg
-rw-r--r-- 1 root root 6597 jan 31 2009 titan.jpg
-rw-r--r-- 1 root root 641064 fév 1 2009 triton.jpg
-rw-r--r-- 1 root root 182103 fév 1 2009 umbriel.jpg
-rw-r--r-- 1 root root 10135 jan 31 2009 uranus.jpg
raphix@crunchbang:~$
#22 Re : -1 » script renommant 12 images » Le 16/05/2013, à 14:52
- ragamatrix
- Réponses : 26
Si tu n'as pas accés au repertoire dans le quel se trouve ton fichier, il se peut que cela t'empeche de le faire.
comment faisais-tu avant pour modifier le nom de ton fichier?
Je vois aussi que le proprietaire des fichier est root, as-tu essayé de lancer la commande en root ou avec un sudo?
il est deconsillé de travailler en root mais il ddevrait être possible de donner les droits suffisant a ton cron pour qu'il puisse arriver a faire le lien.
En fait je fais ça dans crontab:
### Cette commande est exécutée tous les 1er du mois à 9h10 pour images earth.jpg######
10 9 1 * * /usr/share/xplanet/images/monthly.sh #23 Re : -1 » script renommant 12 images » Le 16/05/2013, à 15:04
- ragamatrix
- Réponses : 26
Il faut que tu aies l'autorisation d'écriture sur le fichier earth.jpeg, et sur le répertoire /usr/share/xplanet/images/. Sinon, tu dois être root.
Remarque : Tu as un mélange de fichiers .jpeg et .jpg
Pas mal de commandes de dossiers, d'images et de fichiers de config doivent être en root... avec xplanet dans /usr/share/xplanet et /etc/xplanet...
Sauf dans le dossier de ~/.xplanet dans lequel je vais essayer d'y mettre ce script. peut-être cela reglera le probleme des permissions ?
#24 Re : -1 » script renommant 12 images » Le 16/05/2013, à 16:32
- ragamatrix
- Réponses : 26
En tous cas merci de t'être pencher sur ce sujet. Faut que je mette les choses en ordre je crois... ![]()

