X-Git-Url: https://git.sesse.net/?p=webpdf;a=blobdiff_plain;f=last.pl;fp=last.pl;h=e668edfb799a4ab85a41a10dd19661e2531646b5;hp=0000000000000000000000000000000000000000;hb=b943073892273418899c8187f9055d7faede1a0d;hpb=07e40b2b0a31439e2697b08f27d51b2dea31b615 diff --git a/last.pl b/last.pl new file mode 100755 index 0000000..e668edf --- /dev/null +++ b/last.pl @@ -0,0 +1,74 @@ +#! /usr/bin/perl +use CGI; +use HTML::Entities; +use POSIX; +use strict; +use warnings; +require './config.pm'; + +my $num_last = 20; + +# Find the latest N PNG thumbnails. Somewhat ineffective, but I assume +# we'll get to that later :-) +my @thumbnails = (sort { -M $a <=> -M $b } <$pdfweb::config::outputdir/*.png>); +my $real_num_last = scalar @thumbnails; +if ($real_num_last > $num_last) { + $real_num_last = $num_last; +} + +# Sorry, no HTML templating. I didn't want to pull in yet another +# dependency :-) + +print <<"EOF"; +Content-type: text/html; charset=utf-8 + + + + +
+Web PDF converter, © 2005 Steinar H. Gunderson.
+ + +EOF