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
INTéGRATION YAMMER ET SHAREPOINT ONLINE (OFFICE 365), éTAPE 1 .INTéGRATION YAMMER ET SHAREPOINT ONLINE (OFFICE 365), éTAPE 1 . par Patrick Guimonet
#Yammer Certains s'en sont déjà fait l'écho (ici en allemand par exemple : Yammer Integration in Office 365 Phase 1) ou bien sûr sur le blog SharePoint : Make Yammer your default social network in Office 365 en anglais. Mais c'e...
Cliquez pour lire la suite de l'article par Patrick Guimonet [DYNAMICS CRM] AJOUTER LES DOSSIERS DE CRM AU DOSSIER FAVORIS D'OUTLOOK[DYNAMICS CRM] AJOUTER LES DOSSIERS DE CRM AU DOSSIER FAVORIS D'OUTLOOK par bianca
Objectif
Pour aller plus rapidement dans les menus de Dynamics CRM depuis votre client CRM pour Outlook, vous pouvez utiliser le dossier des Favoris d'Outlook. En effet, par simple glisser/déplacer, vous pouvez déposer un éléme...
Cliquez pour lire la suite de l'article par bianca VISUAL STUDIO 2013VISUAL STUDIO 2013 par Etienne Margraff
Ahh, ENFIN ! c'est officiel, il va y avoir un VS et un TFS 2013. De nouvelles fonctionnalités qui vont à mon sens assoir la maturité de TFS qui est maintenant l'outil incontournable pour tout projet (.NET, mais pas seulement !). Si vous n'avez pas jet...
Cliquez pour lire la suite de l'article par Etienne Margraff CONFIGURER LA COLLATION SQL SERVER POUR SHAREPOINT CONFIGURER LA COLLATION SQL SERVER POUR SHAREPOINT par JeremyJeanson
Note : Je poste cet article à titre de pense-bête. Cela fait des années que je me trimballe avec une capture d'écran, car je ne me rappel jamais comment choisir la collation d'un SQL Server pour SharePoint. Pour SharePoint, il est conseillé de choisir la ...
Cliquez pour lire la suite de l'article par JeremyJeanson ETENDRE LE TEAM WEB ACCESS DE TFS 2012 - STEP 1: CRéATION DU PLUGINETENDRE LE TEAM WEB ACCESS DE TFS 2012 - STEP 1: CRéATION DU PLUGIN par Philess
Dans cet article nous allons créer un plugin installable sur le Team Web Access qui s'intègrera dans l'architecture du site et se chargera au moment où on le décidera.
Avant de lire ce billet et si cela n'est pas encore fait j...
Cliquez pour lire la suite de l'article par Philess
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
Logiciels
Nego Facturation (1.85)NEGO FACTURATION (1.85)Nego Facturation est un logiciel complet qui permet de gérer vos factures et devis très simplemen... Cliquez pour télécharger Nego Facturation Devis-Factures PHMSD (2.2.0.1)DEVIS-FACTURES PHMSD (2.2.0.1)Configuration minimale
Nécessite Windows™ 2000, XP, Windows 7, 8, Vista (Service Pack à... Cliquez pour télécharger Devis-Factures PHMSD WDmemoCode (2.0.0.1)WDMEMOCODE (2.0.0.1)WDmemoCode a été conçu pour aider les développeurs Windev à créer/compléter et conserver une base... Cliquez pour télécharger WDmemoCode ProtoMedic (4.0.0.11)PROTOMEDIC (4.0.0.11)ProtoMedic est un logiciel destiné principalement aux médecins généralistes.
ProtoMedic permet d... Cliquez pour télécharger ProtoMedic MyCurriculum 2011 (7.4.1.12)MYCURRICULUM 2011 (7.4.1.12)Rédigez votre Curriculum Vitae mais également ceux de votre famille ou de vos amis très facilemen... Cliquez pour télécharger MyCurriculum 2011
|