Linux and UNIX Man Pages

Linux & Unix Commands - Search Man Pages

xmltv::validatefile(3pm) [debian man page]

ValidateFile(3pm)					User Contributed Perl Documentation					 ValidateFile(3pm)

NAME
XMLTV::ValidateFile - Validates an XMLTV file DESCRIPTION
Utility library that validates that a file is correct according to http://wiki.xmltv.org/index.php/XMLTVFormat. EXPORTED FUNCTIONS
All these functions are exported on demand. LoadDtd Load the xmltv dtd. Takes a single parameter which is the name of the xmltv dtd file. LoadDtd must be called before ValidateFile can be called. ValidateFile Validate that a file is valid according to the XMLTV dtd and try to check that it contains valid information. ValidateFile takes a filename as parameter and optionally also a day and an offset and prints error messages to STDERR. ValidateFile returns a list of errors that it found with the file. Each error takes the form of a keyword: ValidateFile checks the following: notwell The file is not well-formed XML. notdtd The file does not follow the XMLTV DTD. unknownid No channel-entry found for a channelid that is used in a programme-entry. duplicatechannel More than one channel-entry found for a channelid. noprogrammes No programme entries were found in the file. channelnoprogramme There are no programme entries for one of the channels listed with a channel-entry. invalidid An xmltvid does not look like a proper id, i.e. it does not match /^[-a-zA-Z0-9]+(.[-a-zA-Z0-9]+)+$/. noid A programme-entry without an id was found. emptytitle A programme entry with an empty or missing title was found. emptydescription A programme entry with an empty desc-element was found. The desc-element shall be omitted if there is no description. badstart A programme entry with an invalid start-time was found. badstop A programme entry with an invalid stop-time was found. badepisode A programme entry with an invalid episode number was found. badiso8859 The file is encoded in iso-8859 but contains characters that have no meaning in iso-8859 (or are control characters). If it's iso-8859-1 aka Latin 1 it might be some characters in windows-1252 encoding. badutf8 The file is encoded in utf-8 but contains characters that look strange. 1) Mis-encoded single characters represented with [EF][BF][BD] bytes 2) Mis-encoded single characters represented with [C3][AF][C2][BF][C2][BD] bytes 3) Mis-encoded single characters in range [C2][80-9F] If no errors are found, an empty list is returned. BUGS
It is currently necessary to specify the path to the xmltv dtd-file. This should not be necessary. COPYRIGHT
Copyright (C) 2006 Mattias Holmlund. 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. perl v5.14.2 2011-06-22 ValidateFile(3pm)

Check Out this Related Man Page

ValidateGrabber(3pm)					User Contributed Perl Documentation				      ValidateGrabber(3pm)

NAME
XMLTV::ValidateGrabber - Validates an XMLTV grabber DESCRIPTION
Utility library that validates that a grabber properly implements the capabilities described at http://wiki.xmltv.org/index.php/XmltvCapabilities 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 ConfigureGrabber( "./tv_grab_new", "./tv_grab_new.conf" ) ValidateGrabber 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: o a short name for the grabber. This is only used when printing error messages. o the command to run the grabber. o the name of a configuration-file for the grabber. o a file-prefix that is added to all output-files. o 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. o 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: noparamcheck The grabber accepts any parameter without returning an error-code. noversion The grabber returns an error when run with --version. nodescription The grabber returns an error when run with --description. nocapabilities The grabber returns an error when run with --capabilities. nobaseline The grabber does not list 'baseline' as one of its supported capabilities. nomanualconfig The grabber does not list 'manualconfig' as one of its supported capabilities. noconfigurationfile The specified configuration-file does not exist. graberror The grabber returned with an error-code when asked to grab data. notquiet The grabber printed something to STDERR even though the --quiet option was used. outputdiffers The grabber produced different output when called with different combinations of --output and --quiet. caterror tv_cat returned an error-code when we asked it to process the output from the grabber. sorterror tv_sort found errors in the data generated by the grabber. Probably overlapping programmes. notadditive 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. COPYRIGHT
Copyright (C) 2006 Mattias Holmlund. 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. perl v5.14.2 2011-01-26 ValidateGrabber(3pm)
Man Page