xchat-exaile eklentisi

XChat Resim Göndericisinden sonra ikinci eklentimi de yaptım. Exaile‘de çalan şarkı türkü ne varsa bulunduğunuz kanalda gösteriyor.

?View Code PYTHON
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
#!/usr/bin/python
# -*- coding: utf-8 -*-
 
import xchat
import commands
import random
 
__module_name__ = "Exaile"
__module_version__ = "0.1"
__module_description__ = "Exailede çalan şarkıyı türküyü şeyeder."
 
def exa(word, word_eol, userdata):
        turkucu = commands.getoutput("exaile --get-artist")
        album = commands.getoutput("exaile --get-album")
        parca = commands.getoutput("exaile --get-title")
 
        xchat.command("me %s - %s albümünden \"%s\" dinliyor. (Exaile)" % (turkucu, album, parca))
 
xchat.hook_command('exa', exa)
xchat.prnt(__module_name__ + ' v' + __module_version__ + ' loaded..')

Bu dosyayı bir yere kaydedip xchat’te XChat » Load Plugin or Script menüsünden dosyayı göstererek çalıştırabilirsiniz. /exa komutu ile o an dinlediğiniz şeyi gösterirsiniz.

Tags: , ,

Leave a Reply