From 34a1890bf75ecd202e1cb3cd06d67368458fa222 Mon Sep 17 00:00:00 2001 From: Peter Palfrader Date: Sat, 6 Jul 2002 14:08:05 +0000 Subject: changed format --- Echolot/Thesaurus.pm | 25 +++++++++++++++---------- 1 file changed, 15 insertions(+), 10 deletions(-) diff --git a/Echolot/Thesaurus.pm b/Echolot/Thesaurus.pm index 1e10e4c..f707e04 100644 --- a/Echolot/Thesaurus.pm +++ b/Echolot/Thesaurus.pm @@ -1,7 +1,7 @@ package Echolot::Thesaurus; # (c) 2002 Peter Palfrader -# $Id: Thesaurus.pm,v 1.1 2002/07/06 00:50:27 weasel Exp $ +# $Id: Thesaurus.pm,v 1.2 2002/07/06 14:08:05 weasel Exp $ # =pod @@ -47,14 +47,14 @@ sub build_thesaurus() { my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday) = gmtime($mtime); - my $date = sprintf("%04d-%02d-%02d %02d:%02d", - $year+1900, $mon+1, $mday, - $hour, $min); + my $date = sprintf("%04d-%02d-%02d", $year+1900, $mon+1, $mday); + my $time = sprintf("%02d:%02d", $hour, $min); $data->{$remailer->{'address'}}->{$what} = { 'href' => $filename, 'date' => $date, + 'time' => $time, }; }; @@ -72,19 +72,24 @@ sub build_thesaurus() { print F "nickAddressconfhelpkeystatsadminkey\n"; for my $addr (sort { $data->{$a}->{'nick'} cmp $data->{$b}->{'nick'} } keys (%$data)) { - printf F "%s%s%s%s%s%s%s\n", + printf F '%s%s%s%s%s%s%s'."\n", $data->{$addr}->{'nick'}, $addr, defined ($data->{$addr}->{'conf'}) ? - sprintf('%s', $data->{$addr}->{'conf'}->{'href'}, $data->{$addr}->{'conf'}->{'date'}) : 'N/A', + sprintf('%s
%s
', $data->{$addr}->{'conf'}->{'href'}, $data->{$addr}->{'conf'}->{'date'}, + $data->{$addr}->{'conf'}->{'time'}) : 'N/A', defined ($data->{$addr}->{'help'}) ? - sprintf('%s', $data->{$addr}->{'help'}->{'href'}, $data->{$addr}->{'help'}->{'date'}) : 'N/A', + sprintf('%s
%s
', $data->{$addr}->{'help'}->{'href'}, $data->{$addr}->{'help'}->{'date'}, + $data->{$addr}->{'help'}->{'time'}) : 'N/A', defined ($data->{$addr}->{'key'}) ? - sprintf('%s', $data->{$addr}->{'key'}->{'href'}, $data->{$addr}->{'key'}->{'date'}) : 'N/A', + sprintf('%s
%s
', $data->{$addr}->{'key'}->{'href'}, $data->{$addr}->{'key'}->{'date'}, + $data->{$addr}->{'key'}->{'time'}) : 'N/A', defined ($data->{$addr}->{'stats'}) ? - sprintf('%s', $data->{$addr}->{'stats'}->{'href'}, $data->{$addr}->{'stats'}->{'date'}) : 'N/A', + sprintf('%s
%s
', $data->{$addr}->{'stats'}->{'href'}, $data->{$addr}->{'stats'}->{'date'}, + $data->{$addr}->{'stats'}->{'time'}) : 'N/A', defined ($data->{$addr}->{'adminkey'}) ? - sprintf('%s', $data->{$addr}->{'adminkey'}->{'href'}, $data->{$addr}->{'adminkey'}->{'date'}) : 'N/A'; + sprintf('%s
%s
', $data->{$addr}->{'adminkey'}->{'href'}, $data->{$addr}->{'adminkey'}->{'date'}, + $data->{$addr}->{'adminkey'}->{'time'}) : 'N/A', }; print F ''; close (F); -- cgit v1.2.3