On Jul 31, 2009, at 12:20 PM, Josh Berkus wrote:
> We could use a script which goes through a specified subdirectory
> tree for media.postgresql.org and produces a wiki page with:
>
> filename filesize format
>
> This will greatly aid us in getting videos where people can see them.
#!/usr/bin/perl -w
use strict;
use warnings;
use File::Find;
use MIME::Types;
my $types = MIME::Types->new;
sub file_info { print $File::Find::name, "\t", -s, "\t", $types->mimeTypeOf($_) ||
'application/octet-stream',$/ if -f;
}
find \&file_info, @ARGV;
Best,
David