Skip site navigation (1) Skip section navigation (2)

Re: Need perl/shell/php script: PostgreSQL Media

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 (view raw or flat)
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

In response to

pgsql-www by date

Next:From: Alvaro HerreraDate: 2009-07-31 23:23:15
Subject: Re: Put up Professional Services listing policies
Previous:From: Josh BerkusDate: 2009-07-31 22:13:43
Subject: Put up Professional Services listing policies

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group