User Tools

Site Tools


avatar_switcher
no way to compare when less than two revisions

Differences

This shows you the differences between two versions of the page.


avatar_switcher [2010/02/11 23:56] (current) ginko
Line 1: Line 1:
 +====== Avatar switcher ======
 +Script bash permettant théoriquement de changer un avatar IM en fonction du jour de la semaine. Mais par exemple MSN/Pidgin conserve l'avatar en cache tant qu'il n'est pas ré-uploadé. (Rem: Pidgin le recharge bien à chaque démarrage mais ne le balance pas sur le serveur).
  
 +NB: ne pas oublier de faire exécuter le script au démarrage de l'OS pour par le cron.
 +<code bash>
 +#!/bin/bash
 +
 +# *** Avatar Switcher ***
 +#       * v1.0 *
 +
 +# Switches msn avatar in function of the week's day
 +
 +# *** Release Notes ***
 +# -v1.0: Script fonctionnel
 +#
 +# *********************
 +
 +# where avatars are
 +DIR=/home/ginko/Images/avatar/
 +
 +# obtaining the name of the targeted picture
 +today=$(date)
 +# removing everything exept the first word
 +todays_day=${today%% *}
 +todays_avatar=shell_$todays_day.png
 +
 +# remplacing msn's avatar with the corresponding one
 +cp $DIR$todays_avatar ${DIR}shell.png
 +</code>
avatar_switcher.txt · Last modified: 2010/02/11 23:56 by ginko