{"id":19263700,"url":"https://github.com/trapd00r/file-patternmatch","last_synced_at":"2026-06-10T20:31:10.289Z","repository":{"id":1293690,"uuid":"1235086","full_name":"trapd00r/File-PatternMatch","owner":"trapd00r","description":"Parse media information from filenames","archived":false,"fork":false,"pushed_at":"2024-06-08T08:07:53.000Z","size":45,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-05T10:42:43.925Z","etag":null,"topics":["auto-download","downloads","flexget","scene","scenereleases"],"latest_commit_sha":null,"homepage":"","language":"Perl","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/trapd00r.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2011-01-09T13:17:25.000Z","updated_at":"2021-04-19T09:05:35.000Z","dependencies_parsed_at":"2022-07-18T16:29:00.308Z","dependency_job_id":"ef94bca5-167d-45ac-adef-d656213a67a9","html_url":"https://github.com/trapd00r/File-PatternMatch","commit_stats":{"total_commits":18,"total_committers":2,"mean_commits":9.0,"dds":0.2222222222222222,"last_synced_commit":"3eb07710ed8638525c602244e3a11e6579ca9494"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FFile-PatternMatch","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FFile-PatternMatch/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FFile-PatternMatch/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/trapd00r%2FFile-PatternMatch/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/trapd00r","download_url":"https://codeload.github.com/trapd00r/File-PatternMatch/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240364364,"owners_count":19789760,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["auto-download","downloads","flexget","scene","scenereleases"],"created_at":"2024-11-09T19:36:32.787Z","updated_at":"2026-06-10T20:31:10.259Z","avatar_url":"https://github.com/trapd00r.png","language":"Perl","funding_links":["https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=65SFZJ25PSKG8\u0026currency_code=SEK\u0026source=url"],"categories":[],"sub_categories":[],"readme":"[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations\u0026business=65SFZJ25PSKG8\u0026currency_code=SEK\u0026source=url) - Every tiny cent helps a lot!\n\n# NAME\n\nFile::PatternMatch - parse media information from filenames\n\n![rel](/extra/rel.png)\n\n# SYNOPSIS\n\n    use File::PatternMatch;\n\n    my @files = glob(\"$ENV{HOME}/music/*\");\n\n    my $plain = patternmatch(@files);\n\n    my $extended_colors = patternmatch(256, @files);\n\n\n\n# DESCRIPTION\n\n**File::PatternMatch** takes a list of filenames and tries to parse relevant\ninformation from them. If a filename contains the string 'S01E01' we can safely\nassume it's a new TV show, the first episode from the first season, and thus we\nlabel it 'New Show'.\n\nThere are filters for various music genres, tv shows and music videos.\n\nThe labels can be formatted in three ways (output formats):\n\n## plaintext\n\nRaw, plain text.\n\n## colored\n\nColored using extended escape sequences (see [Term::ExtendedColor](https://metacpan.org/pod/Term::ExtendedColor)).\n\n## dzen2\n\nFormatted using the [dzen2(1)](http://man.he.net/man1/dzen2) notation.\n\n# EXPORTS\n\n## patternmatch()\n\nParameters: $output\\_format, @files\n\nReturns:    \\\\%results\n\n**patternmatch()** takes a list of filenames and tries to match them aginst\nspecific patterns. The result might look like:\n\n    # Plain text\n    2 =\u003e {\n      'Prison.Break.S01E01-FOOBAR'  =\u003e 'New Show',\n    },\n    42 =\u003e {\n      'Laleh-Prinsessor-FOOBAZ'     =\u003e 'Pop/Rock',\n    },\n\n    # Using extended color escape sequences\n    2 =\u003e {\n      'Prison.Break.S01E01-FOOBAR'  =\u003e \"\\e[38;5;160mNew Show\\e[0m\",\n    },\n\n    # Using dzen2 format\n    2 =\u003e {\n      'Prison.Break.S01E01-FOOBAR'  =\u003e '^fg(#ff0000)New Show^fg()',\n    },\n\n# SEE ALSO\n\n[https://github.com/trapd00r/rel](https://github.com/trapd00r/rel)\n\n# AUTHOR\n\n    Magnus Woldrich\n    CPAN ID: WOLDRICH\n    m@japh.se\n    http://japh.se\n\n# REPORTING BUGS\n\nReport bugs and/or feature requests:\n\n[https://rt.cpan.org](https://rt.cpan.org)\n\n[https://github.com/trapd00r/Foo-Bar/issues](https://github.com/trapd00r/Foo-Bar/issues)\n\n[m@japh.se](https://metacpan.org/pod/m@japh.se)\n\n# COPYRIGHT\n\nCopyright 2011, 2018- Magnus Woldrich \u003cm@japh.se\u003e. This program is free\nsoftware; you may redistribute it and/or modify it under the same terms as\nPerl itself.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapd00r%2Ffile-patternmatch","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftrapd00r%2Ffile-patternmatch","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftrapd00r%2Ffile-patternmatch/lists"}