File::Media::Sort - sort media based on their release names
use File::Media::Sort qw(media_sort); my @tv = media_sort('tv', glob("$ENV{HOME}/*"));
This module was initially written to be used with Parse::Flexget and File::PatternMatch. The flexget application generates a logfile with downloaded files, Parse::Flexget parses that log while this module 'sorts' it before the results are being sent to File::PatternMatch which basically highlights subpatterns in the release names for terminal/dzen output.
These modules can be used for arbitary lists of files as well.
None by default.
Parameters: $type, @files
Returns: @results;
media_sort() takes a list of files and a type. Type can be 'music', 'mvids' or 'tv'.
media_sort()
The regular expressions used here is far from perfect. In fact, they suck really badly. It's really hard making a regex that matches all music releases, for example. It's even harder trying to match both music videos and regular movies, since there's no way what so ever to distinguish them just by looking at the filename.
Patches and suggestions very welcome.
Magnus Woldrich CPAN ID: WOLDRICH m@japh.se http://japh.se
None required yet.
Copyright 2010, 2011, 2018- the File::Media::Sorts "AUTHOR" and "CONTRIBUTORS" as listed above.
This library is free software; you may redistribute it and/or modify it under the same terms as Perl itself.
Parse::Flexget, File::PatternMatch, App::rel
To install File::Media::Sort, copy and paste the appropriate command in to your terminal.
cpanm
cpanm File::Media::Sort
CPAN shell
perl -MCPAN -e shell install File::Media::Sort
For more information on module installation, please visit the detailed CPAN module installation guide.