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

Поиск
Список
Период
Сортировка
От David E. Wheeler
Тема Re: Need perl/shell/php script: PostgreSQL Media
Дата
Msg-id 671DEDCC-0458-42D9-8CC0-CB8E1ACA262C@kineticode.com
обсуждение исходный текст
Ответ на Need perl/shell/php script: PostgreSQL Media  (Josh Berkus <josh@agliodbs.com>)
Список 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


В списке pgsql-www по дате отправления:

Предыдущее
От: Josh Berkus
Дата:
Сообщение: Put up Professional Services listing policies
Следующее
От: Alvaro Herrera
Дата:
Сообщение: Re: Put up Professional Services listing policies