Accueil > > > MODIFICATION ET TRADUCTION DU SCRIPT RHYTHMBOX XCHAT ANNOUNCER
MODIFICATION ET TRADUCTION DU SCRIPT RHYTHMBOX XCHAT ANNOUNCER
Information sur la source
Description
Voila Je me suis amusé à traduire le script perl pour Xchat J'ai ajouté aussi quelques fonctions comme l'annonce sur plusieurs chans et un timer de 30 minute qui annonce sur tout les chans Par contre je sais qu'il faudrait le moyen de choisir le temps pour le timer mais je n'ai pas trouvé comment demandé une valeur à l'utilisateur pour spécifier l'argument en perl Ainsi que de ne pas lancer le timer plusieurs fois et une fonction arrêt Bref je ne connais pas le perl et j'ai fait au mieux donc modifier et envoyé moi des modifs sa serrais sympa :)
Source
- #!/usr/bin/perl -w
-
- # Rhythmbox XChat Announcer 0.3.1
- # (c) Copyright 2006, 2007 - Tim Denholm <tim@codestorm.net>
- #
- # This program is free software; you can redistribute it and/or modify
- # it under the terms of the GNU General Public License as published by
- # the Free Software Foundation; either version 2 of the License, or
- # (at your option) any later version.
- #
- # This program is distributed in the hope that it will be useful,
- # but WITHOUT ANY WARRANTY; without even the implied warranty of
- # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- # GNU General Public License for more details.
- #
- # You should have received a copy of the GNU General Public License
- # along with this program; if not, write to the Free Software
- # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- ############################################################################
- # Traduction et modification TrHiL-KiL #
- # gsmtrhilkil@gmail.com #
- ############################################################################
-
- use POSIX qw(strftime);
-
- $script_name = "Annonceur Rhythmbox XChat";
- $script_version = "0.3.2";
- $script_description = "Annonce les informations en cours de lecture chanson de Rhythmbox dans XChat.";
- $rhythmbox_traductionmodif = "Traduction et modification par TrHiLKiL";
- $rhythmbox_version = `Rhythmbox --version`;
- $rhythmbox_version =~ s/GNOME\srhythmbox\s//;
- chop $rhythmbox_version;
-
- Xchat::register($script_name,$script_version,$script_description,$rhythmbox_traduction,"");
-
- Xchat::print("Loaded \002".$script_name."\002:");
- Xchat::print("Utilisez \002 /rb_aide \002 pour afficher une liste de commandes.");
-
- Xchat::hook_command("arb", "arb");
- Xchat::hook_command("rb", "rb_announce");
- Xchat::hook_command("rb_annonce", "rb_announce");
- Xchat::hook_command("rbtous", "rb_announceall");
- Xchat::hook_command("rb_annoncetous", "rb_announceall");
- Xchat::hook_command("rb_repetition", "rb_announcerep");
- Xchat::hook_command("rb_rep", "rb_announcerep");
- Xchat::hook_command("rb_suivant", "rb_next");
- Xchat::hook_command("rb_precedent", "rb_prev");
- Xchat::hook_command("rb_play", "rb_play");
- Xchat::hook_command("rb_pause", "rb_pause");
- Xchat::hook_command("rb_version", "rb_version");
- Xchat::hook_command("rb_aide", "rb_help");
-
- sub arb
- {
- # Check if a rhythmbox process exists.
- if (`ps -C rhythmbox` =~ /rhythmbox/) {
- # Get current playing song information.
- $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
- chop $song_info;
-
- Xchat::command("ame est à l'écoute:: ".$song_info);
- } else {
- Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
- }
-
- return 1;
- }
-
- sub rb_announce
- {
- # Check if a rhythmbox process exists.
- if (`ps -C rhythmbox` =~ /rhythmbox/) {
- # Get current playing song information.
- $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
- chop $song_info;
-
- Xchat::command("me est à l'écoute: ".$song_info);
- } else {
- Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
- }
-
- return 1;
- }
- sub rb_announcerepall
- {
- # Check if a rhythmbox process exists.
- if (`ps -C rhythmbox` =~ /rhythmbox/) {
- # Get current playing song information.
- $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
- chop $song_info;
-
- Xchat::command("timer -repeat 0 1800 ame est à l'écoute: ".$song_info);
- } else {
- Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
- }
-
- return 1;
- }
- sub rb_announceall
- {
- # Check if a rhythmbox process exists.
- if (`ps -C rhythmbox` =~ /rhythmbox/) {
- # Get current playing song information.
- $song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
- chop $song_info;
-
- Xchat::command("ame est à l'écoute: ".$song_info);
- } else {
- Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
- }
-
- return 1;
- }
-
- sub rb_next
- {
- # Skip to the next track.
- eval `rhythmbox-client --next`;
- Xchat::print("S'est arrêté à la piste suivante.");
- return 1;
- }
-
- sub rb_prev
- {
- # Skip to the previous track.
- eval `rhythmbox-client --previous`;
- Xchat::print("S'est arrêté à la piste précédente..");
- return 1;
- }
-
- sub rb_play
- {
- # Start playback.
- eval `rhythmbox-client --play`;
- Xchat::print("Commencé la lecture.");
- return 1;
- }
-
- sub rb_pause
- {
- # Pause playback.
- eval `rhythmbox-client --pause`;
- Xchat::print("La lecture en pause.");
- return 1;
- }
-
- sub rb_version
- {
- # Display version information to a channel.
- Xchat::command("me utilise ".$script_name." ".$script_version." avec Rhythmbox ".$rhythmbox_traductionmodif." ".$rhythmbox_version." et XChat ".Xchat::get_info("version"));
- return 1;
- }
-
- sub rb_help
- {
- # Display help screen.
- Xchat::print("\002\037".$script_name." Help:\037\002");
- Xchat::print(" \002About:\002");
- Xchat::print(" * Author: Tim Denholm <tim\@codestrorm.net>");
- Xchat::print(" * URL: http://www.ircfr.com/codes/MODIFICATION-TRADUCTION-SCRIPT-RHYTHMBOX-XCHAT-ANNOUNCER_52648.aspx");
- Xchat::print(" * Script Version: ".$script_version);
- Xchat::print(" * traduction et modification: ".$rhythmbox_traductionmodif);
- Xchat::print(" * Rhythmbox Version: ".$rhythmbox_version);
- Xchat::print(" * XChat Version: ".Xchat::get_info("version"));
- Xchat::print(" \002Commands:\002");
- Xchat::print(" * /rb - idem que /rb_announce.");
- Xchat::print(" * /rbtous - idem que /rb_annoncetous.");
- Xchat::print(" * /rb_annonce - Afficher la chanson en cours de lecture à un canal.");
- Xchat::print(" * /rb_annoncetous - Afficher la chanson en cours de lecture à tout les canaux.");
- Xchat::print(" * /rb_rep - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
- Xchat::print(" * /rb_repetition - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
- Xchat::print(" * /rb_suivant - Passer à la piste suivante.");
- Xchat::print(" * /rb_precedent - Passer à la piste précédente.");
- Xchat::print(" * /rb_play - Lancez la lecture.");
- Xchat::print(" * /rb_pause - Pause de la lecture.");
- Xchat::print(" * /rb_version - Affiche la version du script, Rhythmbox et XChat à un canal.");
- Xchat::print(" * /rb_aide - Afficher cet écran d'aide.");
- return 1;
- }
#!/usr/bin/perl -w
# Rhythmbox XChat Announcer 0.3.1
# (c) Copyright 2006, 2007 - Tim Denholm <tim@codestorm.net>
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
############################################################################
# Traduction et modification TrHiL-KiL #
# gsmtrhilkil@gmail.com #
############################################################################
use POSIX qw(strftime);
$script_name = "Annonceur Rhythmbox XChat";
$script_version = "0.3.2";
$script_description = "Annonce les informations en cours de lecture chanson de Rhythmbox dans XChat.";
$rhythmbox_traductionmodif = "Traduction et modification par TrHiLKiL";
$rhythmbox_version = `Rhythmbox --version`;
$rhythmbox_version =~ s/GNOME\srhythmbox\s//;
chop $rhythmbox_version;
Xchat::register($script_name,$script_version,$script_description,$rhythmbox_traduction,"");
Xchat::print("Loaded \002".$script_name."\002:");
Xchat::print("Utilisez \002 /rb_aide \002 pour afficher une liste de commandes.");
Xchat::hook_command("arb", "arb");
Xchat::hook_command("rb", "rb_announce");
Xchat::hook_command("rb_annonce", "rb_announce");
Xchat::hook_command("rbtous", "rb_announceall");
Xchat::hook_command("rb_annoncetous", "rb_announceall");
Xchat::hook_command("rb_repetition", "rb_announcerep");
Xchat::hook_command("rb_rep", "rb_announcerep");
Xchat::hook_command("rb_suivant", "rb_next");
Xchat::hook_command("rb_precedent", "rb_prev");
Xchat::hook_command("rb_play", "rb_play");
Xchat::hook_command("rb_pause", "rb_pause");
Xchat::hook_command("rb_version", "rb_version");
Xchat::hook_command("rb_aide", "rb_help");
sub arb
{
# Check if a rhythmbox process exists.
if (`ps -C rhythmbox` =~ /rhythmbox/) {
# Get current playing song information.
$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
chop $song_info;
Xchat::command("ame est à l'écoute:: ".$song_info);
} else {
Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
}
return 1;
}
sub rb_announce
{
# Check if a rhythmbox process exists.
if (`ps -C rhythmbox` =~ /rhythmbox/) {
# Get current playing song information.
$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
chop $song_info;
Xchat::command("me est à l'écoute: ".$song_info);
} else {
Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
}
return 1;
}
sub rb_announcerepall
{
# Check if a rhythmbox process exists.
if (`ps -C rhythmbox` =~ /rhythmbox/) {
# Get current playing song information.
$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
chop $song_info;
Xchat::command("timer -repeat 0 1800 ame est à l'écoute: ".$song_info);
} else {
Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
}
return 1;
}
sub rb_announceall
{
# Check if a rhythmbox process exists.
if (`ps -C rhythmbox` =~ /rhythmbox/) {
# Get current playing song information.
$song_info = `rhythmbox-client --print-playing-format %ta\\ -\\ %at\\ -\\ %tt\\ -\\ "(%te/%td)"`;
chop $song_info;
Xchat::command("ame est à l'écoute: ".$song_info);
} else {
Xchat::print("Rhythmbox n'est pas en cours d'exécution.");
}
return 1;
}
sub rb_next
{
# Skip to the next track.
eval `rhythmbox-client --next`;
Xchat::print("S'est arrêté à la piste suivante.");
return 1;
}
sub rb_prev
{
# Skip to the previous track.
eval `rhythmbox-client --previous`;
Xchat::print("S'est arrêté à la piste précédente..");
return 1;
}
sub rb_play
{
# Start playback.
eval `rhythmbox-client --play`;
Xchat::print("Commencé la lecture.");
return 1;
}
sub rb_pause
{
# Pause playback.
eval `rhythmbox-client --pause`;
Xchat::print("La lecture en pause.");
return 1;
}
sub rb_version
{
# Display version information to a channel.
Xchat::command("me utilise ".$script_name." ".$script_version." avec Rhythmbox ".$rhythmbox_traductionmodif." ".$rhythmbox_version." et XChat ".Xchat::get_info("version"));
return 1;
}
sub rb_help
{
# Display help screen.
Xchat::print("\002\037".$script_name." Help:\037\002");
Xchat::print(" \002About:\002");
Xchat::print(" * Author: Tim Denholm <tim\@codestrorm.net>");
Xchat::print(" * URL: http://www.ircfr.com/codes/MODIFICATION-TRADUCTION-SCRIPT-RHYTHMBOX-XCHAT-ANNOUNCER_52648.aspx");
Xchat::print(" * Script Version: ".$script_version);
Xchat::print(" * traduction et modification: ".$rhythmbox_traductionmodif);
Xchat::print(" * Rhythmbox Version: ".$rhythmbox_version);
Xchat::print(" * XChat Version: ".Xchat::get_info("version"));
Xchat::print(" \002Commands:\002");
Xchat::print(" * /rb - idem que /rb_announce.");
Xchat::print(" * /rbtous - idem que /rb_annoncetous.");
Xchat::print(" * /rb_annonce - Afficher la chanson en cours de lecture à un canal.");
Xchat::print(" * /rb_annoncetous - Afficher la chanson en cours de lecture à tout les canaux.");
Xchat::print(" * /rb_rep - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
Xchat::print(" * /rb_repetition - Timer qui affiche la chanson en cours de lecture à tout les canaux toute les 30 minutes.");
Xchat::print(" * /rb_suivant - Passer à la piste suivante.");
Xchat::print(" * /rb_precedent - Passer à la piste précédente.");
Xchat::print(" * /rb_play - Lancez la lecture.");
Xchat::print(" * /rb_pause - Pause de la lecture.");
Xchat::print(" * /rb_version - Affiche la version du script, Rhythmbox et XChat à un canal.");
Xchat::print(" * /rb_aide - Afficher cet écran d'aide.");
return 1;
}
Historique
- 26 décembre 2010 23:03:30 :
- Je me suis répété dans une commande :P je viens de le remarquer
- 26 décembre 2010 23:54:00 :
- Dans le nom et dans une commande mal traduite
- 26 décembre 2010 23:56:29 :
- ...
Sources de la même categorie
Commentaires et avis
Discussions en rapport avec ce code source dans le forum
recuperer l'host en perl (xchat) [ par aeled ]
J'essaie de faire une commande en perl qui récupere l'host d'un user placé en parametre.en gros /host [nick] doit renvoyer un truc du style : *!*@xxx.
events pour xchat en perl [ par Jamu ]
Salut a tous Je me suis mis au perl il y a peu de temps et ce que je voudrais fair c virer les evenements textuel d'origine de mon xchat pour me coder
add_handler - Script Perl pour Xchat [ par advi ]
Bonjour à tous,j'ai créé un script Perl pour Xchat. Il fonctionne parfaitement, j'ai juste un probleme.Je suis capable de déclencher mon script sur de
Aide pour petit script pour IRC (débutant + python) [ par SteFoy ]
Bonjour! J'explique la situation en premier lieu. Il y a un jeu qui s'appelle "!bombe". C'est une bombe qui s'allume en tappant "!allume" et on peut
Perl [ par uaip ]
Bonjour, depuis peu je me suis lancé dans le Perl, mais je ne trouve pas la rubrique qui lui est attribuée ici, est-ce normal ? y-en a t-il une ?merci
Xchat et clé wanadoo [ par LiLitheuh ]
Bonsoir,J'utilise depuis longtemps l'add-on de Vestax (ca doit s'écrire comme ca...) "wanakey", qui génere la clé orange tout seul comme un grand sans
Xchat [ par elwi ]
bonjour,voila je decouvre le monde de linux depuis une semainej'ai donc réussi a installer xchat, j'ai trouvé comment mettre des alias, remotes etc ..
pb de if() pour bot Perl [ par uaip ]
Bonjour à tous, ma question est très simple : quelqu'un sait-il comment coder en Perl l'hypothèse de la présence d'un user sur un salon IRC ? C'est en
eeexubuntu, xchat 1 et couleurs permanentes [ par Orkydee51 ]
bonjour suis sur eee xubuntu...on se moque pas de mon ignorance...=), j'aurais aimé savoir si quel'qun puvait me donner le tuto integral pour pouvoir
[Xchat] Créé un compteur de ligne par pseudo [ par Mattis ]
Bonjour, j'aimerais un script pour Xchat qui permet de compter le nombre de lignes qu'un pseudo a dit.Du genre je tappe !cpt_mattiset ça me donne le n
|
Derniers Blogs
ETENDRE LE TEAM WEB ACCESS DE TFS 2012 - STEP 0ETENDRE LE TEAM WEB ACCESS DE TFS 2012 - STEP 0 par Philess
L'extensibilité du Team Web Access
Le Web Access (site d'équipe) de Team Foundation Server a été complètement réécrit dans la version 2012 avec pas moins de 400.000 lignes de JavaScript. Ce nouveau modèle a été pensé pour offrir de grandes...
Cliquez pour lire la suite de l'article par Philess SIMULER FACILEMENT L'ENVOI DE MAILSIMULER FACILEMENT L'ENVOI DE MAIL par JeremyJeanson
il m'a été demandé, à plusieurs reprises, comment je faisais pour simuler l'envoi de mail lors de mes démos de Workflow Foundation. Ma solution est plutôt simple : j'utilise la configuration par défaut du SmtpClient et j'oriente les mails vers un dossier ...
Cliquez pour lire la suite de l'article par JeremyJeanson VOTEZ POUR LE TOP 10 DES INFLUENCEURS SHAREPOINT FRANCOPHONES !VOTEZ POUR LE TOP 10 DES INFLUENCEURS SHAREPOINT FRANCOPHONES ! par Patrick Guimonet
Si ce n'est déjà fait (comme plus de 600 personnes déjà), il est encore temps de voter pour le concours TOP 10 des influenceurs SharePoint francophones ! Il est organisé par harmon.ie et accessible ici : http://harmon.ie/top-...
Cliquez pour lire la suite de l'article par Patrick Guimonet [CONF'SHAREPOINT] DERNIER RAPPEL ! :-)[CONF'SHAREPOINT] DERNIER RAPPEL ! :-) par Patrick Guimonet
La Conf'SharePoint en chiffres c'est : 3 jours de SharePoint ! 4 parcours et 60 sessions 17 partenaires représentant toutes les fac...
Cliquez pour lire la suite de l'article par Patrick Guimonet
Forum
LANGAGE 4DLANGAGE 4D par wvalter
Cliquez pour lire la suite par wvalter PROBLEME MIRCPROBLEME MIRC par PaTaTe
Cliquez pour lire la suite par PaTaTe PERFECTIONPERFECTION par gorby10
Cliquez pour lire la suite par gorby10
Logiciels
Easy-Planning (4.5.0.11)EASY-PLANNING (4.5.0.11)Easy-Planning permet de créer des plannings sous la représentation de diagrammes et est adapté a... Cliquez pour télécharger Easy-Planning CVEasy (3.1.0.51)CVEASY (3.1.0.51)PHMSD-CVEasy est un logiciel d'aide à la rédaction de CV d'une simplicité déconcertante.
PHMSD-C... Cliquez pour télécharger CVEasy LettresFaciles 2011 (8.6.0.31)LETTRESFACILES 2011 (8.6.0.31)LettresFaciles est un logiciel facilitant la création et la rédaction de lettres types.
Son inte... Cliquez pour télécharger LettresFaciles 2011 sDEVIS-FACTURES vlPRO (8.4.2.62)SDEVIS-FACTURES VLPRO (8.4.2.62)sDEVIS-FACTURES vlPRO a été mis au point pour les particuliers, créateurs, entrepreneurs, artisa... Cliquez pour télécharger sDEVIS-FACTURES vlPRO Devis-Factures PHMSD (2.1.0.11)DEVIS-FACTURES PHMSD (2.1.0.11)Configuration minimale
Nécessite Windows™ 2000, XP, Windows 7, 8, Vista (Service Pack à... Cliquez pour télécharger Devis-Factures PHMSD
|