Je viens de finir de faire un script pour avoir mes statistiques de Folding@Home dans mon conky.
voici le script {{{ bash cd /tmp #on va dans le répertoire /tmp
wget "http://fah-web.stanford.edu/teamstats/team51.html" && on télécharge la page des stats de la team
- récupération des informations qui nous interessent
rank=`cat team51.html | grep julienl | sed -e 's/<^<>*>/ /g' | cut -d' ' -f3` rank_team=`cat team51.html | grep julienl | sed -e 's/<^<>*>/ /g' | cut -d' ' -f5` name=`cat team51.html | grep julienl | sed -e 's/<^<>*>/ /g' | cut -d' ' -f7` points=`cat team51.html | grep julienl | sed -e 's/<^<>*>/ /g' | cut -d' ' -f9` wu=`cat team51.html | grep julienl | sed -e 's/<^<>*>/ /g' | cut -d' ' -f11` team=`cat team51.html | grep julienl | sed -e 's/<^<>*>/ /g' | cut -d' ' -f13`
echo "$rank $rank_team $name $points $wu $team" > /home/julienl/scripts/conkys/folding #on envoi les valeurs dans le fichier pour notre conky rm /tmp/team51.html
}}}
Nous avons donc notre fichier folding qui contient nos informations, on ajoute ce qu'il faut dans notre .conkyrc
voici par exemple ma partie folding.
{{{ conky
${color lightgrey}Folding@Home :
Name ${alignr}${exec cat /home/julienl/scripts/conkys/folding | cut -d' ' -f3}
Score ${alignr}${exec cat /home/julienl/scripts/conkys/folding | cut -d' ' -f4}
Position mondiale ${alignr}${exec cat /home/julienl/scripts/conkys/folding | cut -d' ' -f1}
Position équipe ${exec cat /home/julienl/scripts/conkys/folding | cut -d' ' -f6} ${alignr}${exec cat /home/julienl/scripts/conkys/folding | cut -d' ' -f2}
Nombres de WU ${alignr}${exec cat /home/julienl/scripts/conkys/folding | cut -d' ' -f5}
}}} et le rendu :

Comme toujours si vous avez des améliorations à apporter à mon script ou autre, les commentaires sont les bienvenus



