summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2003-02-17 09:14:47 +0000
committerPeter Palfrader <peter@palfrader.org>2003-02-17 09:14:47 +0000
commit320e35d1bcdc3952c9a78515a81852379fbf99ce (patch)
treeea2fded185f5c7139469c24b975b1c1121e69f84
parent2123fb6af0fa319ff43286580d035e8f986e4397 (diff)
Create an index.txt file in the thesaurus directory which holds id, nick, and address for each remailer in the thesaurussnapshot/2003-02-17
-rw-r--r--Echolot/Thesaurus.pm15
-rw-r--r--NEWS3
-rw-r--r--TODO4
3 files changed, 17 insertions, 5 deletions
diff --git a/Echolot/Thesaurus.pm b/Echolot/Thesaurus.pm
index afce0d9..6662e5e 100644
--- a/Echolot/Thesaurus.pm
+++ b/Echolot/Thesaurus.pm
@@ -1,7 +1,7 @@
package Echolot::Thesaurus;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Thesaurus.pm,v 1.14 2003/01/14 05:25:35 weasel Exp $
+# $Id: Thesaurus.pm,v 1.15 2003/02/17 09:14:47 weasel Exp $
#
=pod
@@ -56,7 +56,7 @@ sub build_thesaurus() {
my $data;
for my $filename (@files) {
- my ($id, $what) = $filename =~ /^(\d+)\.(adminkey|conf|help|key|stats)$/;
+ my ($id, $what) = $filename =~ /^(\d+)\.(adminkey|conf|help|key|stats)$/;
next unless (defined $id && defined $what);
my $remailer = Echolot::Globals::get()->{'storage'}->get_address_by_id($id);
@@ -84,6 +84,7 @@ sub build_thesaurus() {
$data->{$remailer->{'address'}}->{$what.'_href'} = $filename;
$data->{$remailer->{'address'}}->{$what.'_date'} = $date;
$data->{$remailer->{'address'}}->{$what.'_time'} = $time;
+ $data->{$remailer->{'address'}}->{'id'} = $id;
};
@@ -105,6 +106,16 @@ sub build_thesaurus() {
'thesaurusindexfile',
Echolot::Config::get()->{'buildthesaurus'},
remailers => \@data);
+
+ open(F, ">$dir/index.txt") or
+ Echolot::Log::warn ("Cannot open '$dir/index.txt': $!."),
+ return 0;
+ for my $remailer (@data) {
+ printf F "%s\t%s\t%s\n", $remailer->{'nick'}, $remailer->{'id'}, $remailer->{'address'};
+ };
+ close(F) or
+ Echolot::Log::warn ("Cannot close '$dir/index.txt': $!."),
+ return 0;
};
diff --git a/NEWS b/NEWS
index 909c0ad..f0619a9 100644
--- a/NEWS
+++ b/NEWS
@@ -21,6 +21,9 @@ Changes in version
Several other settings control the details of chain pinging.
You probably don't want or need to tweak them. See
the pingd.conf(5) manual page for details.
+ * Create an index.txt file in the thesaurus directory which
+ holds id, nick, and address for each remailer in the thesaurus.
+ This helps additional tools to utilize Echolot's data.
Changes in version 2.0.10 - 2003-02-03
* Return undef rather than 0 if we cannot open a Maildir.
diff --git a/TODO b/TODO
index feafda2..246b13e 100644
--- a/TODO
+++ b/TODO
@@ -1,4 +1,4 @@
-$Id: TODO,v 1.46 2003/02/16 14:11:28 weasel Exp $
+$Id: TODO,v 1.47 2003/02/17 09:14:47 weasel Exp $
Legend:
- Not done
@@ -8,8 +8,6 @@ Legend:
D Deferred
X Abandoned
- - help riot admin's export?
-
can be done later:
- allow capsstring overrides/additions
- check gnupg version number on startup