Added the new chatscript by Allo and _cato

The usual language stuff
Reordered superseed.txt after reliability

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@2003 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
rramthun 2006-04-06 15:46:16 +00:00
parent c5087710a4
commit 52d3d7b008
6 changed files with 188 additions and 77 deletions

View File

@ -1,19 +0,0 @@
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("<ppm>").search(line):
xchat.command("me 's YaCy is crawling at "+line.strip().strip("<ppm/>")+" pages per minute.")
return xchat.EAT_ALL
xchat.hook_command("YACY_SHOW",yacy_ppm,help="/yacy_show - shows the current ppm")

176
addon/yacy_chatscript.pl Normal file
View File

@ -0,0 +1,176 @@
#!/usr/bin/perl
$VERSION = "0.05";
%IRSSI = (
authors => "Alexander Schier & Robert Weidlich",
contact => "",
name => "YaCy Script",
description => "A script to monitor and control YaCy",
license => "GPL",
url => "http://www.yacy-websuche.de",
changed => "Wed Apr 05 2006"
);
#use Irssi;
use strict;
use XML::Simple;
use LWP::Simple;
use Data::Dumper;
use vars qw($VERSION %IRSSI);
my $help = "/yacy show ppm|peer|version|network\n".
" set host|port|user|pass value\n".
" get host|port|user|pass\n".
" help";
our %cmds =
(
show => ["ppm","peer","version","network"],
set => ["user","pass","host","port"],
help => []
);
my $prog;
if ( defined(&Xchat::print) ) {
$prog = "xchat";
Xchat::register($IRSSI{'name'},$VERSION,$IRSSI{'description'});
} elsif ( defined(&Irssi::print) ) {
$prog = "irssi";
}
sub setting_init() {
if ($prog eq "irssi") {
Irssi::settings_add_str("yacy_script.pl", "yacy_host", "localhost");
Irssi::settings_add_int("yacy_script.pl", "yacy_port", 8080);
Irssi::settings_add_str("yacy_script.pl", "yacy_user", "admin");
Irssi::settings_add_str("yacy_script.pl", "yacy_pass", "");
} elsif ($prog eq "xchat") {
if ( ! -e Xchat::get_info('xchatdir')."/yacy.xml" ) {
my $data = {
host => "localhost",
port => "8080",
user => "admin",
pass => ""
};
XMLout($data, NoAttr => 1, OutputFile => Xchat::get_info('xchatdir')."/yacy.xml");
}
}
}
sub setting_set($$) {
if ($prog eq "xchat") {
my $data = XMLin(Xchat::get_info('xchatdir')."/yacy.xml");
$data->{$_[0]} = $_[1];
open my $fh, '>', Xchat::get_info('xchatdir')."/yacy.xml";
XMLout($data, NoAttr => 1, OutputFile => $fh);
close $fh;
} elsif ($prog eq "irssi") {
Irssi::settings_set_str("yacy_".$_[0],$_[1]);
}
}
sub setting_get($) {
if ($prog eq "xchat") {
my $data = XMLin(Xchat::get_info('xchatdir')."/yacy.xml");
return $data->{$_[0]};
} elsif ($prog eq "irssi") {
return Irssi::settings_get_str("yacy_".$_[0]);
}
}
sub yacy($$$) {
my ($host, $port, $user, $pass, $cmd, $arg, $arg2, $prnt, $output);
if ($prog eq "irssi") {
($cmd,$arg,$arg2)=split / /, shift;
} elsif ($prog eq "xchat") {
$cmd = $_[0][1];
$arg = $_[0][2];
$arg2 = $_[0][3];
}
$host = setting_get("host");
$port = setting_get("port");
$user = setting_get("user");
$pass = setting_get("pass");
if ($cmd eq "show") {
my $doc=get('http://'.$user.':'.$pass.'@'.$host.':'.$port.'/Network.xml');
if ( ! $doc ) {
$prnt = "Peer is not running.";
} else {
my $data = XMLin($doc);
if ($arg eq "ppm") {
$output = "is now crawling with YaCy at $data->{'your'}->{'ppm'} pages per minute.";
} elsif ($arg eq "peer") {
$output = "operates the $data->{'your'}->{'type'} YaCy peer $data->{'your'}->{'name'}, which is running $data->{'your'}->{'uptime'}";
} elsif ($arg eq "version") {
$output = "uses YaCy version $data->{'your'}->{'version'}";
} elsif ($arg eq "network") {
$output = "'s peer currently knows $data->{'active'}->{'count'} senior and $data->{'potential'}->{'count'} junior peers";
} else {
$prnt="Unknown argument: \"$arg\"\n$help";
}
}
} elsif ($cmd eq "set") {
if ($arg) {
if ($arg2) {
setting_set($arg,$arg2);
} else {
$prnt = "$arg is currently set to \"".setting_get($arg)."\"";
}
} else {
$prnt = "Argument required\n$help";
}
} elsif ($cmd eq "help") {
$prnt=$help;
} else {
$prnt="Unknown command: \"$cmd\"\n$help";
}
if ( $prog eq "irssi" ) {
Irssi::active_win->command("/me $output") if ($output);
Irssi::active_win->print($prnt) if ($prnt);
} elsif ( $prog eq "xchat" ) {
Xchat::print($prnt) if ($prnt);
Xchat::command("me $output") if ($output);
return 3;
}
}
sub cmd_help() {
my ($arg) = @_;
if ( $arg =~ /(yacy)/ ) {
Irssi::print($help);
Irssi::signal_stop();
}
}
sub signal_complete_word {
my ($list, $window, $word, $linestart, $want_space) = @_;
if($linestart =~ /\/yacy/){
Irssi::signal_stop();
my @words=split(/ /, $linestart);
if(@words == 1){
my @cmds2=keys(%cmds);
foreach (@cmds2){
if($_ =~/^$word/i){
push(@$list, $_);
}
}
}elsif(@words == 2){
my @cmds2=$cmds{@words[1]};
for my $i (0 .. $#{$cmds2[0]} ) {
if($cmds2[0][$i] =~/^$word/i){
push(@$list, $cmds2[0][$i]);
}
}
}
}
}
setting_init();
if ( $prog eq "irssi" ) {
Irssi::command_bind("help","cmd_help", "Irssi commands");
Irssi::command_bind('yacy', \&yacy);
Irssi::signal_add('complete word', 'signal_complete_word');
} elsif ( $prog eq "xchat") {
Xchat::hook_command("yacy","yacy",{help_text => $help});
}

View File

@ -1,47 +0,0 @@
#!/usr/bin/perl
use LWP::UserAgent;
$VERSION = "0.01";
%IRSSI = (
authors => "Alexander Schier",
contact => "",
name => "yacy_script",
description => "A Yacy Script for Irssi",
license => "GPL",
url => "http://www.yacy-websuche.de",
changed => "Thu Mar 16 2006"
);
use Irssi;
use strict;
Irssi::settings_add_str("yacy_script.pl", "yacy_host", "localhost");
Irssi::settings_add_int("yacy_script.pl", "yacy_port", 8080);
Irssi::settings_add_str("yacy_script.pl", "yacy_user", "admin");
Irssi::settings_add_str("yacy_script.pl", "yacy_password", "");
my $ua = LWP::UserAgent->new;
$ua->timeout(10);
$ua->env_proxy;
sub yacy_show($$$){
my $host=Irssi::settings_get_str("yacy_host");
my $port=Irssi::settings_get_int("yacy_port");
my $user=Irssi::settings_get_str("yacy_user");
my $pass=Irssi::settings_get_str("yacy_password");
my $BASEURL="http://".$user.":".$pass."@".$host.":".$port;
my $response = $ua->get($BASEURL."/xml/status_p.xml");
my @content=$response->content;
my $PPM=0;
foreach my $line (@content){
if($line=~/<ppm>(.*?)<\/ppm>/){
$PPM=$1;
}
}
#Irssi::active_win->command("/me is now crawling with YaCy at $PPM pages per minute.");
Irssi::active_win->command("/me 's YaCy is crawling at $PPM pages per minute.");
}
Irssi::command_bind('yacy_show', \&yacy_show);

View File

@ -19,8 +19,8 @@ document.getElementById("value").value=element.value;
<h2>Advanced Config</h2>
<p>
Here are all configuration options from YaCy.<br>
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.
For explanation please look into yacy.init
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.<br>
For an explanation of the available options please look into yacy.init
</p>
<select name="options" size="25" style="width: 600">
#{options}#<option id="#[key]#" value="#[value]#" onclick="element_clicked(this)">#[key]#: #[value]#</option>

View File

@ -34,7 +34,7 @@ You may also provide your blacklist to other peers by sharing them; in return yo
collect blacklist entries from other peers.==Im Gegenzug k&ouml;nnen Sie sich selber von anderen Peers Blacklists runterladen.
Edit list:==Liste bearbeiten:
\(active\)\#not active::active\#\(/active\)\# \#\(shared\)\#not shared::shared\#\(/shared\)==(active)#nicht aktiv::aktiv#(/active)# #(shared)#nicht freigegeben::freigegeben#(/shared)
"select"=="w&auml;hle"
"select"=="w&auml;hlen"
New list:==Neue Liste:
"create"=="anlegen"
Enable/disable this list==Liste an/ausschalten
@ -130,7 +130,7 @@ The maximum cache size is==Die maximale Gr&ouml;&szlig;e betr&auml;gt
Advanced Config==Erweiterte Einstellungen
Here are all configuration options from YaCy.==Hier sind alle Konfigurationseinstellungen von YaCy.
You can change anything, but some options need a restart, and some options can crash YaCy, if wrong values are used.==Sie k&ouml;nnen alles &auml;ndern, bedenken Sie aber, dass einige &Auml;nderungen einen Neustart von YaCy erfordern und andere &Auml;nderungen YaCy ganz zum Absturz bringen k&ouml;nnen.
For explanation please look into yacy.init==Eine Erkl&auml;rung finden Sie in der Datei yacy.init
For an explanation of the available options please look into yacy.init==Eine Erkl&auml;rung der einzelnen Optionen finden Sie in der Datei yacy.init
"Save"==Speichern
@ -279,7 +279,7 @@ Cookies==Cookies
YaCy: Help==YaCy: Hilfeseiten
>Help==>Hilfe
This is a distributed web crawler and also a caching HTTP proxy. You are using the <i>online-interface</i> of the application. You can use this interface to configure your personal settings, proxy settings, access control and crawling properties. You can also use this interface to start crawls, send messages to other peers and monitor your index, cache status and crawling processes. Most important, you can use the search page to search either your own or the <i>global</i> index.==YaCy ist eine Suchmaschine, die &auml;hnlich dem Prinzip des verteilten Rechnens (distributed computing wie z.B. SETI@home) funktioniert. Das ganze heisst hier eher "verteiltes Durchsuchen und Indexieren" des Internets. Ausserdem bringt sie einen HTTP Proxy Server mit. Sie benutzen gerade das <i>online-Interface</i> von YaCy. Sie k&ouml;nnen dieses Interface auch zum Konfigurieren Ihrer pers&ouml;nlichen Einstellungen, Proxy-Einstellungen, der Zugriffs-Kontrolle und den Crawl-Einstellungen benutzen. Sie k&ouml;nnen das Interface auch zum Starten von Crawls, Nachrichtenversand an andere YaCy-Nutzer und zur &Uuml;berwachung Ihres Index, Cache-Status und des Crawl-Prozesses benutzen. Besonders wichtig ist, dass man die Suchseite benutzen kann, um entweder den eigenen oder den <i>globalen</i> Index zu durchsuchen.
For more detailed information, visit the====F&uuml;r weitergehende Informationen besuchen Sie bitte die
For more detailed information, visit the==F&uuml;r weitergehende Informationen besuchen Sie bitte die
YaCy homepage==YaCy-Homepage
Local and Global Search: Options and Functions==Lokale und globale Suche: Optionen und Funktionen
The proxy provides a search interface that accesses your local index, created from web pages that passed the proxy.==Der Proxy bringt eine Suchmaschine mit, die einen lokalen Index bildet, der sich aus den Weseiten zusammensetzt, die Sie mit dem Proxy besuchen.

View File

@ -1,16 +1,17 @@
http://www.yacy.net/yacy/seed.txt
http://www.suma-lab.de/yacy/seed.txt
http://home.arcor.de/hermens/yacy/seed.txt
http://www.blowmymind.de/yacy/seed1.txt
http://www.lulabad.de/seed.txt
http://www.roland-ramthun.de/seed.txt
http://borg-0300.dyndns.org:3000/share/seed.txt
http://descovery.losespace.de/downloads/seed.txt
http://dustland.dyndns.org/yacy/seedfile.txt
http://home.arcor.de/hermens/yacy/seed.txt
http://home.arcor.de/k.c.e/yacy/seed.txt
http://lthawk.de/seed.txt
http://seed.paepstin.info/seed.txt
http://trumpkin.de/yacy/seed.txt
http://www-public.tu-bs.de:8080/~y0018680/seed.txt
http://www.anomic.de/yacy/seed.txt
http://www.blowmymind.de/yacy/seed1.txt
http://www.lincksdrachen.de/yacy/seed.txt
http://www.lulabad.de/seed.txt
http://www.mitglied.lycos.de/szymonhp/seed.txt
http://www.suma-lab.de/yacy/seed.txt
http://www.yacy.net/yacy/seed.txt
http://www.mitglied.lycos.de/szymonhp/seed.txt