From 3c038727a427004f68438a850ee36e7baf00e078 Mon Sep 17 00:00:00 2001 From: allo Date: Fri, 17 Mar 2006 19:55:03 +0000 Subject: [PATCH] x-chat script from cato git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1911 6c8d7289-2bf4-0310-a012-ef5d649a1542 --- addon/yacy-xchat-plugin.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 addon/yacy-xchat-plugin.py diff --git a/addon/yacy-xchat-plugin.py b/addon/yacy-xchat-plugin.py new file mode 100644 index 000000000..72a11d6ec --- /dev/null +++ b/addon/yacy-xchat-plugin.py @@ -0,0 +1,18 @@ +import xchat +import urllib +import re +import string + +__module_name__ = "yacy" +__module_version__ = "0.1" +__module_description__ = "Shows yacys current PPM" + +user = "admin" +password = "password" +host = "localhost:8080" +def yacy_ppm(word, word_eol, userdata): + for line in urllib.urlopen("http://"+user+":"+password+"@"+host+"/xml/status_p.xml").readlines(): + if re.compile("").search(line): + xchat.command("me 's YaCy is crawling at "+line.strip().strip("")+" pages per minute.") + +xchat.hook_command("YACY_SHOW",yacy_ppm,help="/yacy_show - shows the current ppm")