=encoding utf8

=for syntax specification:
https://perldoc.perl.org/perlpod

=head1 NAME

F<createcats> – create F<epgsearchcats.conf> from the VDR's EPG data

=head1 SYNOPSIS

B<createcats> [OPTIONS] F</path_to/epg.data>

=head1 DESCRIPTION

This tool is delivered with the EPGSearch plugin and should exist in the
plugin's source directory after compilation. It helps creating the file
F<epgsearchcats.conf> from the VDR's EPG data if the samples in the directory
F<conf> won't fit the needs.

When called with:

=over 4

    createcats /path_to/epg.data

=back

F<createcats> takes the VDR's file F<epg.data> as argument and scans it
for suitable EPG information. Such information is a tuple of category name
and a corresponding value, like C<Genre: Movie>, located at the beginning
of a line. Line breaks within F<epg.data> are encoded by C<|> characters.

The output is a file F<epgsearchcats.conf> that should be copied to the
plugin's configuration directory. Before productive use, some customizing
may be necessary, because not all findings in the file will be suitable
as extended EPG information.

=head1 OPTIONS

The full set of arguments comprises:

=over 4

=item B<−h>, B<−−help>

Print a concise help.

=item B<−l> I<N>, B<−−maxlength>=I<N>

The maximum length of a text to be accepted as a category value.

If the length of a value is greater than I<N>, this value will
not become part of the list of values.

=item B<−m> I<N>, B<−−minappearance>=I<N>

The minimum number of occurrences for a category be accepted.

The tool counts how often a category is used in the current
EPG data. If this is less than I<N>, this category will not
become part of the resulting F<epgsearchcats.conf>.

=item B<−v> I<N>, B<−−maxvalues>=I<N>

Values of a category are omitted if they exceed this number.

If the number of distinct values for a category is greater than I<N>, no
list of values will be created for this category. As a consequence,
the category will be represented by a string item that can be filled
with arbitrary text. Otherwise, the category will be represented by
a menu item for selecting values from the category's list.

=back

B<Hint:> Results are best if the current EPG data is as large as
possible. When downloading EPG data from an external EPG provider,
the EPG should be updated before running F<createcats>.

=head1 AUTHORS (man pages)

Originally provided by Mike Constabel <epgsearch (at) constabel (dot) net>.

Revised and adapted to recent plugin features by the current maintainers.

=head1 PROJECT SITE

The plugin is maintained as GitHub project:

L<https://github.com/vdr-projects/vdr-plugin-epgsearch/>

=head1 REPORTING BUGS

Issues can be reported, and features be suggested, through the project's
bug tracker:

L<https://github.com/vdr-projects/vdr-plugin-epgsearch/issues/>

=head1 COPYRIGHT and LICENSE

Copyright (C) 2004-2010 Christian Wieninger

Copyright © 2011-2025 TomJoad (VDR-Portal), et al.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Or, point your browser to L<https://www.gnu.org/licenses/old-licenses/gpl-2.0.html>

The original author can be reached via L<cwieninger@gmx.de>.

Current maintainers can be reached via the project's GitHub site (see above).

The MD5 code has been derived from the MD5 Message-Digest Algorithm of RSA Data Security, Inc.

=head1 SEE ALSO

B<epgsearch>(1), B<epgsearch>(4), B<epgsearchcats.conf>(5)
