summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Palfrader <peter@palfrader.org>2002-08-10 01:36:47 +0000
committerPeter Palfrader <peter@palfrader.org>2002-08-10 01:36:47 +0000
commit0b94c34343aee2dfb449166f4884f16a71e3c7fe (patch)
tree7248e7742d43b40b8bc79bb135a7ea576e51ac46
parenteccb64b18dbc0c65e8b0a218b478d5bae73893a9 (diff)
Produce echolot.html, an index file for echolot resultsecholot-2.0beta25
-rw-r--r--Echolot/Config.pm3
-rw-r--r--Echolot/Stats.pm34
-rw-r--r--NEWS3
-rw-r--r--README6
-rwxr-xr-xpingd4
5 files changed, 34 insertions, 16 deletions
diff --git a/Echolot/Config.pm b/Echolot/Config.pm
index 9d818f9..ee15d58 100644
--- a/Echolot/Config.pm
+++ b/Echolot/Config.pm
@@ -1,7 +1,7 @@
package Echolot::Config;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Config.pm,v 1.34 2002/08/05 17:46:17 weasel Exp $
+# $Id: Config.pm,v 1.35 2002/08/10 01:36:47 weasel Exp $
#
=pod
@@ -137,6 +137,7 @@ sub init($) {
# templates
templates => {
+ 'indexfile' => 'templates/echolot.html',
'thesaurusindexfile' => 'templates/thesaurusindex.html',
'mlist' => 'templates/mlist.html',
'mlist2' => 'templates/mlist2.html',
diff --git a/Echolot/Stats.pm b/Echolot/Stats.pm
index 0311bf9..5d64f35 100644
--- a/Echolot/Stats.pm
+++ b/Echolot/Stats.pm
@@ -1,7 +1,7 @@
package Echolot::Stats;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: Stats.pm,v 1.26 2002/08/10 00:56:24 weasel Exp $
+# $Id: Stats.pm,v 1.27 2002/08/10 01:36:47 weasel Exp $
#
=pod
@@ -273,28 +273,35 @@ sub read_file($;$) {
sub write_file($$;$) {
my ($filebasename, $html_template, $output) = @_;
- my $filename = $filebasename.'.txt';
- open(F, '>'.$filename) or
- cluck("Cannot open $filename: $!\n"),
- return 0;
- print F $output;
- close (F);
+ my $filename;
+ if (defined $output) {
+ $filename = $filebasename.'.txt';
+ open(F, '>'.$filename) or
+ cluck("Cannot open $filename: $!\n"),
+ return 0;
+ print F $output;
+ close (F);
+ };
return 1 unless defined $html_template;
- $output =~ s/&/&amp;/g;
- $output =~ s/"/&quot;/g;
- $output =~ s/</&lt;/g;
- $output =~ s/>/&gt;/g;
my $template = HTML::Template->new(
filename => $html_template,
strict => 0,
+ die_on_bad_params => 0,
global_vars => 1 );
- $template->param ( list => $output );
+ if (defined $output) {
+ $output =~ s/&/&amp;/g;
+ $output =~ s/"/&quot;/g;
+ $output =~ s/</&lt;/g;
+ $output =~ s/>/&gt;/g;
+ $template->param ( list => $output );
+ };
$template->param ( CURRENT_TIMESTAMP => scalar gmtime() );
$template->param ( SITE_NAME => Echolot::Config::get()->{'sitename'} );
$template->param ( seperate_rlist => Echolot::Config::get()->{'seperate_rlists'} );
$template->param ( combined_list => Echolot::Config::get()->{'combined_list'} );
+ $template->param ( thesaurus => Echolot::Config::get()->{'thesaurus'} );
$template->param ( version => Echolot::Globals::get()->{'version'} );
$filename = $filebasename.'.html';
@@ -557,6 +564,9 @@ sub build_lists() {
build_clist( $clist, $broken1, $broken2, $sameop, Echolot::Config::get()->{'private_resultdir'}.'/'.'clist', Echolot::Config::get()->{'templates'}->{'clist'});
build_clist( $pubclist, $broken1, $broken2, $sameop, Echolot::Config::get()->{'resultdir'}.'/'.'clist', Echolot::Config::get()->{'templates'}->{'clist'});
};
+
+
+ write_file(Echolot::Config::get()->{'resultdir'}.'/'.'echolot', Echolot::Config::get()->{'templates'}->{'indexfile'});
};
diff --git a/NEWS b/NEWS
index 170b998..084b375 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,6 @@
+Changes in version 2.0beta25 - 2002-08-10
+ * Produce echolot.html, an index file for echolot results.
+
Changes in version 2.0beta24 - 2002-08-10
* Remove »x« from end of pubring.mix summary lines.
diff --git a/README b/README
index 9c9e9d3..cc6fbca 100644
--- a/README
+++ b/README
@@ -1,4 +1,4 @@
-$Id: README,v 1.23 2002/08/02 02:20:47 weasel Exp $
+$Id: README,v 1.24 2002/08/10 01:36:47 weasel Exp $
#####################################################################
## R E A D M E F O R E C H O L O T ###########################
#####################################################################
@@ -128,6 +128,10 @@ o In the tools directory you find the »pingctl« wrapper for Echolot.
/etc/init.d or similar and link it from the runlevel directories
if your init is SysV style.
+o Echolot puts its stats in the result directory. It also produces
+ an index file name echolot.html. If you want to have it as your
+ default index page, symlink it to index.html with something like
+ »ln -s echolot.html index.html« in the result directory.
CONFIGURATION
-------------
diff --git a/pingd b/pingd
index 44d7143..0a5fc23 100755
--- a/pingd
+++ b/pingd
@@ -3,7 +3,7 @@
$| = 1;
# (c) 2002 Peter Palfrader <peter@palfrader.org>
-# $Id: pingd,v 1.56 2002/08/10 00:57:08 weasel Exp $
+# $Id: pingd,v 1.57 2002/08/10 01:36:47 weasel Exp $
#
=pod
@@ -281,7 +281,7 @@ use POSIX qw(setsid);
delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'};
-my $VERSION = '2.0beta24';
+my $VERSION = '2.0beta25';
my $redirected_stdio = 0;