Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Parse media information from filenames

NotificationsYou must be signed in to change notification settings

trapd00r/File-PatternMatch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Donate - Every tiny cent helps a lot!

NAME

File::PatternMatch - parse media information from filenames

rel

SYNOPSIS

use File::PatternMatch;my @files = glob("$ENV{HOME}/music/*");my $plain = patternmatch(@files);my $extended_colors = patternmatch(256, @files);

DESCRIPTION

File::PatternMatch takes a list of filenames and tries to parse relevantinformation from them. If a filename contains the string 'S01E01' we can safelyassume it's a new TV show, the first episode from the first season, and thus welabel it 'New Show'.

There are filters for various music genres, tv shows and music videos.

The labels can be formatted in three ways (output formats):

plaintext

Raw, plain text.

colored

Colored using extended escape sequences (seeTerm::ExtendedColor).

dzen2

Formatted using thedzen2(1) notation.

EXPORTS

patternmatch()

Parameters: $output_format, @files

Returns: \%results

patternmatch() takes a list of filenames and tries to match them aginstspecific patterns. The result might look like:

# Plain text2 => {  'Prison.Break.S01E01-FOOBAR'  => 'New Show',},42 => {  'Laleh-Prinsessor-FOOBAZ'     => 'Pop/Rock',},# Using extended color escape sequences2 => {  'Prison.Break.S01E01-FOOBAR'  => "\e[38;5;160mNew Show\e[0m",},# Using dzen2 format2 => {  'Prison.Break.S01E01-FOOBAR'  => '^fg(#ff0000)New Show^fg()',},

SEE ALSO

https://github.com/trapd00r/rel

AUTHOR

Magnus WoldrichCPAN ID: WOLDRICHm@japh.sehttp://japh.se

REPORTING BUGS

Report bugs and/or feature requests:

https://rt.cpan.org

https://github.com/trapd00r/Foo-Bar/issues

m@japh.se

COPYRIGHT

Copyright 2011, 2018- Magnus Woldrichm@japh.se. This program is freesoftware; you may redistribute it and/or modify it under the same terms asPerl itself.

About

Parse media information from filenames

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp