CleanXMLTV
What is it
XMLTV is a set of utilities to manage your TV viewing. Click here for more information about XMLTV. They work with TV listings stored in the XMLTV format, which is based on XML. Most PVR viewing software (GB-PVR, SageTV, etc.) use these data as input for the TV Guide. Sometimes the software that creates the XML TV listings use codes or format that is not accepted.
For example references to "UTC" (Coordinated Universal Time, in practice equivalent to GMT, Greenwich Mean Time), or references to "CET" (Central European Time, which usually implicitly assumes that the viewing software knows about daylight saving time), or the order of XML items is problematic ("category" coming before "description" may generate errors).


How to use CleanXMLTV
CleanXMLTV is a command-line software for Windows, just like most of the XMLTV tools (when they run under Windows).
Enter parameters:

    CleanXMLTV INPUTFILE --output OUTPUTFILE [--cet [cetoffset]] [--kenmerk] [--tba] [--talpa]

With only the parameters INPUTFILE and OUTPUTFILE CleanXMLTV:

converts all "UTC" references to GMT "+0000" 
converts all "CET" references to either GMT+1 or GMT+2, depending on daylight saving time 
sorts all program details in the order <title>, <sub-title>, <desc> 
If you enter the --cet parameter, to all timecodes without GMT/UTC reference one will be added. If you enter a cetoffset, this will be added or subtracted.

Example: if a timecode for a programme in July is missing, and you use --cet, CleanXMLTV will add "+0200".

The benefit is that CleanXMLTV can calculate the proper daylight saving time offset. If you are in London, and you use the parameter "--cet -1", a timecode in July with missing GMT/UTC reference will receive "+0100". If you are in New York you might want to try "--cet -6", and in Athens "--cet +1"

If timecodes contain UTC or CET reference, CleanXMLTV always converts to a GMT/UTC reference. I.e.: "UTC" is converted to "+0000" and "CET" is converted to +0100 or +0200 according to rules for calculating the daylight saving time offset. If there already is GMT/UTC reference (i.e. "+0100") CleanXMLTV will change nothing.

If you use the excellent grabber (for Dutch channels) TVgids_to_XML the XML data may contain items called "Kenmerken". Since there is no equivalent of this in the standard XMLTV data description, you can add the parameter "--kenmerk". Then the information under "Kenmerken" will be copied to the end of the XMLTV item "<desc>".

If you get data from the RadioTimes (tv_grab_uk_rt), schedules may be so distant in the future that data are unknown. RadioTimes lists "To be announced" or "Movie to be announced". If you use GB-PVR your database will keep these data, and NOT overwrite them when the right data come in. To prevent this, use the option --tba. CleanXMLTV will not copy these XMLTV entries. If the XMLTV data contains "to be announced" somewhere in the beginning of the title, the whole record will be left open.

In the Netherlands Nickelodeon and Talpa are sharing a channel, but the guides are not published in the same XMLTV source. In one source there will be a long block from 18:00 hours until 2:00 hours that only says "Talpa". This complicates merging the two data files for this channel. If you add the "hidden" feature [--talpa], an XML title element that only contains "talpa" (no matter what combination of upper- and lowercase, will be removed.

More information: http://www.prize.nl/software/pvr

**** Update 18-7-2005

Added --tba functionality

**** Update 9-9-2005

Removed bug that converted codes like "&amp;" to "&amp;amp;"
Added Talpa-block removal

**** Update 4-10-2005

"Talpa" block is now recognised no matter if upper- or lowercase
