Welcome To Australia's No.1 Media Center Community!
You Are Currently Viewing As A Guest - you'll need to register in order to participate in our community and make this annoying message disappear!
By registering you'll be able to post & reply to questions, set up your own image gallery & blog, communicate privately with other members, create & respond to polls, access downloads and other "members only" features.
Registration is fast, simple and absolutely free so why not join our community today - you'll be glad you did!
For any problems with the registration process or your account, please contact support.
xmltvAlter is a command-line application that will modify XMLTV files based on user supplied rules. Used in conjunction with other XMLTV applications, this application can help automate various XMLTV or EPG generation functions.
Supported Operating Systems: Windows 2000 Service Pack 3; Windows 98; Windows 98 Second Edition; Windows ME; Windows Server 2003; Windows Vista Business; Windows Vista Enterprise; Windows Vista Home Basic; Windows Vista Home Premium; Windows Vista Starter; Windows Vista Ultimate; Windows XP Service Pack 2
DOWNLOAD
Zip archive contains three (3) files: "xmltvAlter.exe", "xmltvAlter.exe.config" and "xmltvRules.xml"
<?xml version="1.0" standalone="yes"?>
<alterXmltv>
<!--
xmltvAlter.exe - Manipulate XMLTV data file using Delete, Replace, Rename, Duplicate, etc operations.
Copyright (c) 2008 epgStream.net
INSTRUCTIONS
~~~~~~~~~~~~
Add the required rules in the order you want them to execute as many times as you like.
Remember that each rule may effect the outcome of a subsequent rule. For instance:
SCENARIO - Incorrect!
In the following rule sequence, rule #1 will delete "TEN-SYDNEY" which
means rule #2 won't be able to duplicate "TEN-SYDNEY"
[rule type="deleteChannel" channelId="TEN-SYDNEY" /]
[rule type="duplicateChannel" sourceChannelId="TEN-SYDNEY" destinationChannelId="TENHD-SYDNEY" /]
SCENARIO - Correct!
The same two rules again, but in a different, but correct order. Where "TEN-SYDNEY"
is duplicated by rule #1 and then deleted by rule #2.
[rule type="duplicateChannel" sourceChannelId="TEN-SYDNEY" destinationChannelId="TENHD-SYDNEY" /]
[rule type="deleteChannel" channelId="TEN-SYDNEY" /]
Some rules are also dependant on the order of elements in the input XMLTV file.
EXCEPTION
~~~~~~~~~
The "mergeChannels" rules are the only rules that executes out of order *after* all other
rule types have executed.
STANDARD RULE FORMATS
~~~~~~~~~~~~~~~~~~~~~
Standard rule formats are simply "off-the-shelf" rules you can use to perform common XMLTV alterations.
"addProgrammeSubtitle"
- Splits a programme title into Title and SubTitle.
[titleStartsWith] - When a programme title is found that starts with this value, the TITLE text
is pushed into the SUB-TITLE and the [titleStartsWith] text is then removes from the
SUB-TITLE.
(TYPE=String)(MANDATORY)
[newTitle] - Replaces the programme TITLE with this new value.
(TYPE=String)(MANDATORY)
Example:
Parameters - [titleStartsWith]="The Simpsons: ", [newTitle]="The Simpsons"
The programme TITLE, "The Simpsons: Lisa Gets A Pony" is encountered. The SUB-TITLE is set
to "Lisa Gets a Pony" ([titleStartWith] parameter text is removed) and the new programme
title is set to "The Simpsons" ([newTitle]).
"changeChannelDisplayName"
- Changes a channel's display name.
[currentName] - The channel DISPLAY-NAME value to find.
(TYPE=String)(MANDATORY)
[newName] - The channel's new DISPLAY-NAME value.
(TYPE=String)(MANDATORY)
"changeProgrammeCategory"
- Changes a programme category from one value to another.
[currentCategory] - The programme CATEGORY value to find.
(TYPE=String)(MANDATORY)
[newCategory] - The new CATEGORY value.
(TYPE=String)(MANDATORY)
"changeProgrammeTitle"
- Changes a programme title from one value to another.
[currentTitle] - The programme TITLE value to find.
(TYPE=String)(MANDATORY)
[newTitle] - The new programme TITLE value.
(TYPE=String)(MANDATORY)
"changeChannelId"
- Changes a channel's id from one value to another.
[currentId] - The channel's ID value to find.
(TYPE=String)(MANDATORY)
[newId] - The new channel ID value.
(TYPE=String)(MANDATORY)
"changeProgrammeTimeZone"
- Changes a programme's timezone for start/stop times.
[channelId] - Only programmes with this channel id will be adjusted. If left blank then
all programmes will be changed.
(TYPE=String)(OPTIONAL)(DEFAULT="")
[timeZone] - The new timezone to apply. Format is "+nnnn". Example, "+1000", "+0930"
(TYPE=String)(MANDATORY)
"adjustProgrammeTime"
- Adjusts a programme's raw start/stop times (ignores timezone). NOTE: This does not change the timezone.
[channelId] - Only programmes with this channel id will be adjusted. If left blank then
all programmes will be changed.
(TYPE=String)(OPTIONAL)(DEFAULT="")
[adjustment] - The number of minutes to adjust the start/stop times by.
Example: "60" = Add one hour, "-60" = Substracts one hour.
(TYPE=String)(MANDATORY)
"duplicateChannel"
- Copies a channel (including attached programmes) with an id matching [sourceChannelId] and
create a "new" duplicate channel with the id [destinationChannelId]
[sourceChannelId] - The source channel ID to copy.
(TYPE=String)(MANDATORY)
[destinationChannelId] - The copied channel's new destination ID.
(TYPE=String)(MANDATORY)
"mergeChannels"
- Merges one existing channel's programmes over (or under) another channel.
[sourceChannelId] - The source channel in the merge operation.
(TYPE=String)(MANDATORY)
[destinationChannelId] - The destination channel in the merge operation.
(TYPE=String)(MANDATORY)
[removePartialOverrides] - If "True" then any programme that is partially overridden by another
will be removed.
Example: If source programme "News" 6pm-7pm, overrides "Tennis" 4pm-7pm,
then "Tennis" will be removed and a *gap* will appear from 4pm-6pm.
If "False" then the programme that is partially overridden with have have it's start/stop
times adjusted to *fit*.
Example: If source programme "News" 6pm-7pm, overrides "Tennis" 4pm-7pm,
then "Tennis" will be changed to run from 4pm-6pm.
(TYPE=Boolean)(OPTIONAL)(DEFAULT="False")
"deleteChannel"
- Deletes a specific channel and associated programmes.
[channelId] - The channel ID to be deleted.
(TYPE=String)(MANDATORY)
"deleteAllChannels"
- Deletes all channels as associated programmes with the exception of those listed in [excludedChannelIdList].
[excludedChannelIdList] - A list of channel ID's *not* to be deleted, separated by
the[listSeparator] character. Example: "ABC|ABC2|SevenHD"
(TYPE=String)(MANDATORY)
[listSeparator] - The character used to separate channel ID's in [excludedChannelIdList].
(TYPE=String)(OPTIONAL)(DEFAULT="|")
ADVANCED RULE FORMATS
~~~~~~~~~~~~~~~~~~~~~
Advanced rule formats are lower-level rules you can use to perform more complex XMLTV alterations.
Each advanced rule uses an [xmlPath] parameter that signifies the level it operates on. The [xmlPath]
is based on the element or attribute you want to affect. Elements and attributes are treaded in
slightly different ways. For instance:
To manipulate a PROGRAMME element your xmlPath is "/tv/programme".
To manipulate a CATEGORY element your xmlPath is "/tv/programme/category".
To manipulate a CHANNEL's ID attribute your xmlPath is "/tv/channel.id".
To manipulate a PROGRAMME's CHANNEL attribute your xmlPath is "/tv/programme.channel".
Example: To delete all CATEGORY elements from your XMLTV file you would use a "deleteNode"
rule and specify an [xmlPath] of "/tv/programme/category".
"clearNode"
- Clears the text value of node.
[xmlPath] - See Above. (TYPE=String)(REQUIRED)
"deleteNode"
- Delete node.
[xmlPath] - See Above. (TYPE=String)(REQUIRED)
"deleteNodeByText"
- Deletes nodes which have a text value exactly equal to [findText].
[xmlPath] - See Above. (TYPE=String)(REQUIRED)
[comparisonType] - Comparison operator. A value of "Equal" means the text value of the
node must exactly equal [findText] to be deleted. A value of "Contains" means the
the text value of the node must contain [findText] to be deleted.
(TYPE=String)(OPTIONAL)(DEFAULT="Equal")
[findText] - The value to find within the text value of the node. (TYPE=String)(REQUIRED)
"deleteNodeByAttributeText"
- Deletes nodes with an [attributeName] attribute which has a text value equal to, or contains [findText].
[xmlPath] - See Above. (TYPE=String)(REQUIRED)
[comparisonType] - Comparison operator. A value of "Equal" means the text value of the
node must exactly equal [findText] to be deleted. A value of "Contains" means the
the text value of the node must contain [findText] to be deleted.
(TYPE=String)(OPTIONAL)(DEFAULT="Equal")
[attributeName] - The node attribute to search for [findText]. (TYPE=String)(REQUIRED)
[findText] - The value to find within the [attributeName] text value of the node.
(TYPE=String)(REQUIRED)
"replaceNodeText"
- Replaces all occurrance of [findText] with [replaceText] in a node's text value.
[xmlPath] - See Above. (TYPE=String)(REQUIRED)
[findText] - The value to find within the text value of the node and replace with [replaceText].
(TYPE=String)(REQUIRED)
[replaceText] - The value to replace [findText] within the text value of the node.
(TYPE=String)(REQUIRED)
"renameNodeText"
- Replaces node's text value with [replaceText] when node's text value equals exactly [replaceText].
[xmlPath] - See Above. (TYPE=String)(REQUIRED)
[findText] - The value that the text value of the node must equal exactly. (TYPE=String)(REQUIRED)
[replaceText] - The value to replace the node's text value with. (TYPE=String)(REQUIRED)
LOGGING
~~~~~~~
To enable logging to see what is going on on a PER RULE BASIS, simply add the attribute
(log="true") to the rule. Remember that logging to the console *WILL DECREASE PERFORMANCE*, especially
when that rule executes thousands of times.
Example:
[rule type="deleteChannel" channelId="TEN-SYDNEY" log="true" /]
RULE TEMPLATES
~~~~~~~~~~~~~~
<rule type="addProgrammeSubtitle" titleStartsWith="" newTitle="" />
<rule type="changeChannelDisplayName" currentName="" newName="" />
<rule type="changeProgrammeCategory" currentCategory="" newCategory="" />
<rule type="changeProgrammeTitle" currentTitle="" newTitle="" />
<rule type="changeChannelId" currentId="" newId="" />
<rule type="changeProgrammeTimeZone" channelId="" timeZone="" />
<rule type="adjustProgrammeTime" channelId="" adjustment="" />
<rule type="duplicateChannel" sourceChannelId="" destinationChannelId="" />
<rule type="mergeChannels" sourceChannelId="" destinationChannelId="" removePartialOverrides="" />
<rule type="deleteChannel" channelId="" />
<rule type="deleteAllChannels" excludedChannelIdList="" listSeparator="" />
<rule type="clearNode" xmlPath="" />
<rule type="deleteNode" xmlPath="" />
<rule type="deleteNodeByText" xmlPath="" comparisonType="" findText="" />
<rule type="deleteNodeByAttributeText" xmlPath="" comparisonType="" attributeName="" findText="" />
<rule type="replaceNodeText" xmlPath="" currentText="" newText="" />
<rule type="renameNodeText" xmlPath="" findText="" replaceText="" />
-->
<rule type="duplicateChannel" sourceChannelId="Seven-Syd" destinationChannelId="SevenHD-Syd" />
<rule type="duplicateChannel" sourceChannelId="Ten-Syd" destinationChannelId="TenHD-Syd" />
<rule type="mergeChannels" sourceChannelId="SevenHD" destinationChannelId="SevenHD-Syd" removePartialOverrides="false" log="true" />
<rule type="mergeChannels" sourceChannelId="TenHD" destinationChannelId="TenHD-Syd" removePartialOverrides="false" log="true" />
</alterXmltv>
HISTORY
v0.99.07 (9-Feb-2008)
Public pre-release for user acceptance testing.