# $ApsCVS: www/wml/include/macros.inc,v 1.32 2003/03/03 12:36:46 bernd Exp $ #use wml::std::tags #use wml::std::href #use wml::std::box #use wml::des::space #use wml::des::typography #include "styledefs.inc" sub isotime { my ($time) = @_; my ($sec, $min, $hour, $mday, $mon, $year, $wday, $yday, $isdst) = localtime($time); my ($str) = sprintf("%02d/%02d/%04d %02d:%02d:%02d", $mday, $mon+1, $year+1900, $hour, $min, $sec); return $str; } sub get_description { my($file) = @_; my($string) = ""; open FH , "<${file}.caption" or die "can't open ${file}.caption"; while () { $string .= $_; } close (FH); $string; } sub human_readable { my $s=shift; my $ss; if ($s < 1000) { ($ss) = sprintf("%d", $s); } elsif ($s < 1000000) { ($ss) = sprintf("%dK", $s/1000); } else { ($ss) = sprintf("%.1fM", $s/1000000); } $ss; } sub translate_name { my $f = shift; # lose underscores $f =~ s/_/ /g; # lose extension $f =~ s/[0-9]*\..*//g; # capitalise first letters $f =~ s/\b([A-Za-z]+)/ucfirst($1)/ge; $f; } sub filelength { my($fname) = @_; my($size) = 0; my($d) = 0; if (-e $fname) { ($d,$d,$d,$d,$d,$d,$d,$size,$d,$d,$d,$d,$d) = stat $fname; return $size; } else { return 0; } } sub bytes { my($fname) = @_; my($size) = 0; $size = filelength($fname); if ($size < 1024) { return sprintf("%d", $size); } elsif ($size < 1048576) { return sprintf("%dK", $size/1024); } else { return sprintf("%.1fM", $size/(1024*1024)); } } sub mlsize { my($mlist) = @_; my($count) = 0; open FH , "< $(MLPATH)/${mlist}" or return 0; while() { $count++; } return $count; } sub dldsize { my($fname) = @_; my($size) = 0; my($d) = 0; $fname = "$(WWWROOT)/download/" . $fname; if (-e $fname) { ($d,$d,$d,$d,$d,$d,$d,$size,$d,$d,$d,$d,$d) = stat $fname; return $size; } else { return 0; } } $(MYEMAIL) $(MYURL) %body

%body

# URL mappings Apsfilter BSD Cosmo Project Debian Linux JOIN Plus.line DPN FreeBSD FreeBSD Ports Collection FreeBSD ALPHA Ghostscript LPRng Mailing List Archive NetBSD OpenBSD UGU Unix WML # apsfilter core team Andreas Klemm Bernd Walter Joerg Wunsch Stacey Roberts # apsfilter developers Michael Lossin # apsfilter.org mailinglists majordomo@apsfilter.org apsfilter-announce@apsfilter.org apsfilter-chat@apsfilter.org apsfilter-current@apsfilter.org apsfilter-cvs@apsfilter.org apsfilter-devel@apsfilter.org apsfilter-doc@apsfilter.org apsfilter-hackers@apsfilter.org apsfilter-help@apsfilter.org apsfilter-hilfe@apsfilter.org apsfilter-printing@apsfilter.org apsfilter-stable@apsfilter.org # Unix manpage mappings lpd(8) # 64Bits Siggi Holz # Display counter only on www.apsfilter.org, which is hosted on srv1...
counter
# Release Texts for download page This is the apsfilter STABLE release.
Download this release for production environment.
Please download and apply patches if available !
Report problems and comments to mailinglist.
This is the apsfilter-current developer release.
This SNAPSHOT release will become the new apsfilter version.
Please test this experimental version and give us your feedback.
Usually even this new stuff is working well, but please don't
blame us, if you expect problems in production environment.
Report problems and comments to mailinglist.
cellpadding= \ bgcolor="" border=0> \ >> "bgcolor=\"\""> \ cellspacing=0 width="100%" cellpadding= \ border=0>
\ "\">">\ %body\ "">\
>>
\ \ \
\
\
{:\
[[s|&|&|sg]]\
[[s|<|<|sg]]\
[[s|>|>|sg]]\
[[s|\n+\s*$||s]]\
%body\
:}\
\
\
\
\
\
\ \ %body\ \ \ {: [[s| |_|sg]] %0 :} \ \ \ \
\ \ \ \ \
\ \ \ \ \
\ \
\ \ %body
\
\
\ \ \ \ \ \ \ \ \
\ > \ unknown >
\ %body
\ \
\ \ \ \ \ \ \ \ \
\ \ <:=bytes(""):>
\ %body
\ \
[md5] or <:=dldsize(""):> bytes
[md5] <:=dldsize(""):> bytes
<:=dldsize(""):> bytes
[ANNOUNCE] [ChangeLog] [README] [INSTALL] [KNOWN_BUGS]
%body
\
\ \ \ \ \
\ \ \ \
%body

\ \ \ \ $(file) \ \
\ \
\ \ \ \ \ \
\ \ \ \ \
\ \ \ \ \
%body
\
\
\ \

\ bgcolor= bdspace=10>\ <: { my $fl = ""; my $tl = ""; if (! (-f "t_$fl")) { `convert -quality 60 -geometry 250x250 $fl t_$fl`; } my $alt = "alt=\"%s\""; print ""; printf ("", $tl); print ""; } :>

\ %body\
\
\
bgcolor= bdspace=10> <: my $pat = ''; my $rej = ''; my (@F, @R, $f, $r, @T); # @F = sort { (stat($a))[9] <=> (stat($b))[9]; } (glob($pat)); @F = sort (glob($pat)); MAIN:foreach $f (@F) { if ('$rej') { @R = (glob("$rej")); foreach (@R) { next MAIN if ($f =~ /$_/); } } # $f = "$f/" if (-d $f); next if (-d $f); printf("\n", -s $f, $f, $f); } :>
%"."8d %"."s
bgcolor= bdspace=5> <: my $pat = ''; my $rej = ''; my $tw = ''; my $th = ''; my $cols = ''; my $donames = ''; my $shownames = ''; my $i = 0; my @FF; # my @F = sort { -M $a <=> -M $b; } (glob($pat)); my @F = sort (glob($pat)); MAIN:for $f (@F) { next if ( $f =~ /^t_.*/ ); if ('$rej' ne '') { @R = (glob("$rej")); for (@R) { next MAIN if ($f =~ /$_/); } } next if (-d $f); push(@FF, $f); } for $f (@FF) { $ss = human_readable( -s $f ); if ($donames eq 'yes') { $fname = translate_name($f); } else { $fname = ""; } # Now for thumbnails if (! (-f "t_$f")) { my $geom = join ("x", $tw, $th); `convert -quality 60 -geometry $geom $f t_$f`; } print "" unless ($i); print ""; $i++; if($i == $cols || $i == @FF) { print "\n"; $i = 0; } } :>
\n"; print "
"; if (! ($shownames eq 'no')) { print "$fname
"; } print "$ss
\n"; print "
bgcolor= bdspace=5> <: my $pat = ''; my $rej = ''; my $tw = ''; my $th = ''; my @FF; # my @F = sort { -M $a <=> -M $b; } (glob($pat)); my @F = sort (glob($pat)); MAIN:for $f (@F) { next if ( $f =~ /^t_.*/ ); if ('$rej' ne '') { @R = (glob("$rej")); for (@R) { next MAIN if ($f =~ /$_/); } } next if (-d $f); push(@FF, $f); } for $f (@FF) { $desc = get_description($f); # Now for thumbnails if (! (-f "t_$f")) { my $geom = join ("x", $tw, $th); `convert -quality 60 -geometry $geom $f t_$f`; } print ""; print ""; print ""; print "\n"; } :>
\n"; print "

$desc

"; print "\n"; print "
# vim: set ft=perl: