Hello Everyone,
I am considering a module to supplement Video::Filename written by
Behan Webster. I have tried reaching out to him in the past couple of
weeks. Submitting a patch to provide support for show
name.yyyy.mm.dd.ext
In the mean time I have been considering if a specific module for TV
Shows only might also be worth while, of course with additional
features and support.
See attached podtotext file.
I have a few questions.
1)
Would it be better to go with Parse, Meta, or Info since we are
attempting to get meta data from from the file naming. There is
already a Video::Info which does the deep dive into the file contents
from what I have read. I have not used the module itself.
2)
Should I keep support for perl below version 5.10 as versions below
this do not support named groups in regex. I have seen on PerlMonks
that there are still questions being asked by people using perl
versions less than 5.10
Looking forward to hearing back.
Best,
Adam Spann
NAME
File::TVShow::Parse
VERSION
Version 0.01
SYNOPSIS
This module is intended to parse and identify information in the file
name of a TV show. These details can then be accessed by calling the
relevant methods. It does NOT attempt to read the contents of the file.
Note: This module will modelled off Video::Filename created by Behan
Webster, but will focus on TV Shows only and with additional features.
If the file name is parsed and can not be identified as a TV show then
"is_tv_show" will return 0.
use File::TVShow::Parse;
my $show = File::TVShow::Parse->new('file');
Methods
new
Create a Parse object to extract meta information from the file name.
my $show = File::TVShow::Parse->new('file');
Data held in the object.
* show_name: Name of the show.
* original_show_name: This will contain the show name found in the
file name without any modifications This will only be defined if
_isolate_name_year has found a year string within the file name such
test.2019, test.(2019), test 2018, test (2018)
* season: Show season
* episode: Show episode
* endep: (Naming under consideration) last Episode number found when
file name contains SXXEXXEXX
* year, month, date: Show date e.g 2019.03.03 This can be accessed
using the method "ymd" Note: year will be defined in two cases. One:
show name contains year Two: File name contains YYYY.MM.DD that are
identified by date.
* resolution: Show resolution 480p/720p and so on. This will be '' if
not found.
* ext: File extension
show_name
Return the show name found in the file name.
original_show_name
Return the original show name. This method will return the orginal show
name if defined original_show_name will be defined if show name
contained a year string (YYYY) or YYYY If not defined it will return
{show_name}
season
Return the season found in the file name. Return '' if no season is
found.
episode
Return the episode found in the file name. Return '' if no episode
found.
is_multi_episode
Return 1 if this is a multi-episode file SXXEXXEXX. Return 0 if false
season_episode
Return SXXEXX or SXXEXXEXX for single or multi episode files. Return ''
if not created
has_year
Returns 1 if $self->{year} is defined else return 0
year
Return the year found in the file name. Return '' is no year found.
month
Return the month found in the file name. Return '' if no month found.
date
Return the date found in the file name. Return '' if no date found.
ymd
Return the complete date string as 'YYYY.MM.DD' Ruturn '' if no
attributes year, month, or date.
resolution
Return resolution found in the file name. Return '' if no resolution
found.
episode_name (Under consideration, difficult to isolate and often ommited)
ext
Return file extension.
is_tv_show
Return 1 if identified as a TV Show. Default is 0
is_by_date
Return 1 if by date. Default is 0
is_by_season
Return 1 if by season. Default is 0
_isolate_name_year
AUTHOR
Adam Spann, "<baspann at gmail.com>"
BUGS
Please report any bugs or feature requests to "bug-file-tvshow-parse at
rt.cpan.org", or through the web interface at
<https://rt.cpan.org/NoAuth/ReportBug.html?Queue=File-TVShow-Parse>. I
will be notified, and then you'll automatically be notified of progress
on your bug as I make changes.
SUPPORT
You can find documentation for this module with the perldoc command.
perldoc File::TVShow::Parse
You can also look for information at:
* RT: CPAN's request tracker (report bugs here)
<https://rt.cpan.org/NoAuth/Bugs.html?Dist=File-TVShow-Parse>
* AnnoCPAN: Annotated CPAN documentation
<http://annocpan.org/dist/File-TVShow-Parse>
* CPAN Ratings
<https://cpanratings.perl.org/d/File-TVShow-Parse>
* Search CPAN
<https://metacpan.org/release/File-TVShow-Parse>
ACKNOWLEDGEMENTS
LICENSE AND COPYRIGHT
Copyright 2019 Adam Spann.
This program is free software; you can redistribute it and/or modify it
under the terms of either: the GNU General Public License as published
by the Free Software Foundation; or the Artistic License.
See <http://dev.perl.org/licenses/> for more information.