4259 links
  • Arnaud's links
  • Home
  • RSS Feed
  • Tag cloud
  • Login
search: tag:xchat tag:python tag:auto tag:redmine — newest first
  • Créer un module xchat (python)

    Objectif : tapper /obug dans xchat m'ouvre un onglet dans ff vers l'url du bug

    1) activer le module python dans les options
    2) créer un fichier .py dans /home/arnaud/.xchat2/
    3)
    module_name = "openbuginredmine"
    module_version = "1.0"
    module_description = "module to open bug in redmine"

    import os
    import xchat

    def obug(word, word_eol, userdata):
    if len(word) < 2:
    print "Second arg must be the bug number!"
    else:
    #xchat.command("NOTICE @%s %s" % (xchat.get_info("channel"), word_eol[1]))
    os.system("firefox https://monurlredmine.com/issues/"+word[1])
    return xchat.EAT_ALL

    xchat.hook_command("obug", obug, help="/obug open bug in ff")

    Et voilà, plus qu'à reboot le xchat, ou bien /load nomdufichier.py

    ça peut etre appliqué à plein de trucs : pouvoir lancer ce qu'on veut depuis xchat

    November 5, 2013 - permalink - http://xchat.org/docs/xchatpython.html#head-cf24838660500eceef2367deb88df5963483c852
    auto module python redmine xchat