XMLTV::ValidateGrabber man page

XMLTV::ValidateGrabber — Validates an XMLTV grabber


Utility library that validates that a grabber properly implements the capabilities described at


The ValidateGrabber call first asks the grabber which capabilities it claims to support and then validates that it actually does support these capabilities.

Exported Functions

All these functions are exported on demand.

ConfigureGrabber( "./tv_grab_new", "./tv_grab_new.conf" )

Run the validation for a grabber.

ValidateGrabber( "tv_grab_new", "./tv_grab_new", "./tv_grab_new.conf",
                 "/tmp/new_", "./blib/share", 0 )

ValidateGrabber takes the following parameters:

a short name for the grabber. This is only used when printing error messages.
the command to run the grabber.
the name of a configuration-file for the grabber.
a file-prefix that is added to all output-files.
a path to a directory with metadata for the grabber. This path is passed to the grabber via the --share option if the grabber supports the capability 'share'. undef if no --share parameter shall be used.
a boolean specifying if the --cache parameter shall be used for grabbers that support the 'cache' capability.

ValidateGrabber returns a list of errors that it found with the grabber. Each error takes the form of a keyword:

The grabber accepts any parameter without returning an error-code.
The grabber returns an error when run with --version.
The grabber returns an error when run with --description.
The grabber returns an error when run with --capabilities.
The grabber does not list 'baseline' as one of its supported capabilities.
The grabber does not list 'manualconfig' as one of its supported capabilities.
The specified configuration-file does not exist.
The grabber returned with an error-code when asked to grab data.
The grabber printed something to STDERR even though the --quiet option was used.
The grabber produced different output when called with different combinations of --output and --quiet.
tv_cat returned an error-code when we asked it to process the output from the grabber.
tv_sort found errors in the data generated by the grabber. Probably overlapping programmes.
grabbing data for tomorrow first and then for the day after tomorrow and concatenating them does not yield the same result as grabbing the data for tomorrow and the day after tomorrow at once.

Additionally, the list of errors will contain error keywords from XMLTV::ValidateFile if the xmltv-file generated by the grabber was not valid.

If no errors are found, an empty list is returned.