From: | "David E(dot) Wheeler" <david(at)kineticode(dot)com> |
---|---|
To: | Josh Berkus <josh(at)agliodbs(dot)com> |
Cc: | PostgreSQL www <pgsql-www(at)postgresql(dot)org> |
Subject: | Re: Need perl/shell/php script: PostgreSQL Media |
Date: | 2009-07-31 22:47:49 |
Message-ID: | 671DEDCC-0458-42D9-8CC0-CB8E1ACA262C@kineticode.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-www |
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
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2009-07-31 23:23:15 | Re: Put up Professional Services listing policies |
Previous Message | Josh Berkus | 2009-07-31 22:13:43 | Put up Professional Services listing policies |