X-Git-Url: http://www.average.org/gitweb/?p=mkgallery.git;a=blobdiff_plain;f=mkindex.pl;h=5600ca30f498006e116b6ea32e9a610b8b07c0f1;hp=99a90610b55cd2b2113aa6fdd67ca317be24c6b5;hb=ae4e0ac1653ec096fabe59e3a25253cf61b0a795;hpb=f04746d096a80eab7143900e50f02ab0660e1975 diff --git a/mkindex.pl b/mkindex.pl index 99a9061..5600ca3 100755 --- a/mkindex.pl +++ b/mkindex.pl @@ -1,5 +1,29 @@ #!/usr/bin/perl +# $Id$ + +# Create per-month index assuming that directory structure is ./YYYY/MM/... +# non-four-numeric subtis are put on a separate list. +# Output to stdout (redirect >index.html if you wish) + +# Copyright (c) 2006 Eugene G. Crosser + +# This software is provided 'as-is', without any express or implied +# warranty. In no event will the authors be held liable for any damages +# arising from the use of this software. +# +# Permission is granted to anyone to use this software for any purpose, +# including commercial applications, and to alter it and redistribute it +# freely, subject to the following restrictions: +# +# 1. The origin of this software must not be misrepresented; you must not +# claim that you wrote the original software. If you use this software +# in a product, an acknowledgment in the product documentation would be +# appreciated but is not required. +# 2. Altered source versions must be plainly marked as such, and must not be +# misrepresented as being the original software. +# 3. This notice may not be removed or altered from any source distribution. + use strict; use Carp; use CGI qw/:html *table *Tr *center/; @@ -54,9 +78,11 @@ foreach my $yr(sort @years) { } print end_table,p,"\n"; +print start_table({-cellspacing=>3}),"\n"; foreach my $sub(sort @subdirs) { - print td(a({-href=>$sub.'/'},$sub)); + print Tr(td({-bgcolor=>"#ffffc0"},a({-href=>$sub.'/'},$sub))); } +print end_table,"\n"; print end_center,"\n"; print end_html,"\n";