Dancer-SearchApp
view release on metacpan or search on metacpan
"Exporter" : "5",
"Filter::signatures" : "0",
"HTML::Entities" : "0",
"HTML::Restrict" : "0",
"HTTP::Date" : "0",
"Image::ExifTool" : "0",
"JSON" : "0",
"MIME::Base64" : "0",
"MIME::QuotedPrint" : "0",
"MIME::WordDecoder" : "0",
"MP3::Tag" : "0",
"Mail::IMAPClient" : "0",
"Moo" : "0",
"Path::Class" : "0",
"Plack::Middleware::Pod" : "0",
"Promises" : "0",
"Scalar::Util" : "0",
"Search::Elasticsearch" : "2.03",
"Search::Elasticsearch::Async" : "2.03",
"Search::Elasticsearch::Client::2_0" : "5.00",
"Search::Elasticsearch::Client::2_0::Async" : "2.03",
Exporter: '5'
Filter::signatures: '0'
HTML::Entities: '0'
HTML::Restrict: '0'
HTTP::Date: '0'
Image::ExifTool: '0'
JSON: '0'
MIME::Base64: '0'
MIME::QuotedPrint: '0'
MIME::WordDecoder: '0'
MP3::Tag: '0'
Mail::IMAPClient: '0'
Moo: '0'
Path::Class: '0'
Plack::Middleware::Pod: '0'
Promises: '0'
Scalar::Util: '0'
Search::Elasticsearch: '2.03'
Search::Elasticsearch::Async: '2.03'
Search::Elasticsearch::Client::2_0: '5.00'
Search::Elasticsearch::Client::2_0::Async: '2.03'
Makefile.PL view on Meta::CPAN
'MIME::WordDecoder' => 0,
'MIME::Base64' => 0,
'MIME::QuotedPrint' => 0,
'Scalar::Util' => 0,
'Encode' => 0,
'Text::Markdown' => 0,
'HTTP::Date' => 0,
'Time::Piece' => 0,
# For media files
'MP3::Tag' => 0,
'Image::ExifTool' => 0,
# For ICAL files
'Cal::DAV' => 0,
},
dist => { COMPRESS => 'gzip -9f', SUFFIX => 'gz', },
clean => { FILES => 'Dancer-SearchApp-*' },
test => { TESTS => join( ' ', @tests ) },
);
bin/index-url.pl view on Meta::CPAN
$res{ author } = undef;
$res{ language } = undef;
$res{ content } = undef;
} else {
#my $meta = $info->meta;
#$res{ mime_type } = $meta->{"Content-Type"};
if( 0 and $res{ mime_type } =~ m!^audio/mpeg$! ) {
require MP3::Tag;
my $mp3 = MP3::Tag->new($url);
my ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
$res{ title } = $title;
$res{ author } = $artist;
$res{ language } = 'en'; # ...
$res{ content } = join "-", $artist, $album, $track, $comment, $genre;
# We should also calculate the duration here, and some more information
# to generate an "HTML" page for the file
} else {
lib/Dancer/SearchApp/Extractor/Audio.pm view on Meta::CPAN
package Dancer::SearchApp::Extractor::Audio;
use strict;
use Carp 'croak';
use Promises 'deferred';
#no warnings 'experimental';
#use feature 'signatures';
use MP3::Tag;
use POSIX 'strftime';
use HTML::Entities;
use vars qw($VERSION);
$VERSION = '0.06';
=head1 File types
This uses L<MP3::Tag> and thus likely only handles mp3 files.
=cut
sub examine {
my( $class, %options ) = @_;
my $info = $options{info};
my $meta = $options{ meta };
my $result = deferred;
my $mime_type = $meta->{"Content-Type"};
lib/Dancer/SearchApp/Extractor/Audio.pm view on Meta::CPAN
my $mp3;
my %res = (
url => $options{ url },
file => $options{ filename },
folder => $options{ folder },
);
my $file = $options{ filename };
# If we have a filename, use that
if( $file ) {
$mp3 = MP3::Tag->new("$file");
my $ctime = (stat $file)[10];
$res{ creation_date } = strftime('%Y-%m-%d %H:%M:%S', localtime($ctime));
} elsif( $options{ content }) {
# If we have in-memory content, just open a filehandle to it
# This involves writing MP3::Tag::File::InMemory, which overrides
# the ->filename and ->open method
croak "In-memory handling is not yet supported, sorry";
}
if( $mp3) {
# go go go
my ($title, $track, $artist, $album, $comment, $year, $genre) = $mp3->autoinfo();
$res{ title } = $title || $file->basename;
$res{ author } = $artist;
( run in 1.452 second using v1.01-cache-2.11-cpan-d7a12ab2c7f )