Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support
Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support
Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support
Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support Windows 7, Vista & Linux Media Center Support


Go Back   Australian Media Center Community > Windows Media Center Solutions > Windows Media Center - EPG Discussion & Support

Community Information

Reply
 
Thread Tools
Old 10th February 2008, 06:14 AM   #1 (permalink)
MC Guru
 
epgStream's Avatar
Status epgStream is Offline:
ActivityPosts: 1,000
Reputation & Thanks Support Rating:
epgStream epgStream epgStream epgStream epgStream epgStream epgStream
Points Earned: 711

epgStream has been Thanked 246 times in 116 posts
"xmltvAlter.exe" XMLTV Tool

xmltvAlter.exe Tool

OVERVIEW
  • 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.


SYSTEM REQUIREMENTS
  • Framework: Microsoft .NET Framework Version 2.0 Redistributable Package (x86)
  • 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"

    LATEST VERSION
    PREVIOUS VERSIONS
    • None

SUPPORTED FUNCTIONS
  • "Add Programme Sub-title" - Splits a programme title into title and sub-title parts.
  • "Change Channel Display Name" - Changes a channel's display name.
  • "Change Programme Category" - Changes a programme's category.
  • "Change Programme Title" - Changes a programme's title.
  • "Change Channel ID" - Changes a channel's and associated programme's channel ID.
  • "Change Programme TimeZone" - Changes a programme's time zone for selected channels.
  • "Alter Programme Time" - Alters a programme's start and stop times for selected channels.
  • "Duplicate Channel" - Duplicates an existing channel and it's associated programmes.
  • "Delete Channel" - Deletes a specific channel and it's associated programmes.
  • "Delete All Channels" - Deletes all channels (except for those that are excluded) and their associated programmes.
  • "Merge Channels" - Merges one channel and it's associated programmes into an existing channel. Great for merging those SD and HD channel listings!

INSTRUCTIONS
  • Download and unzip the latest xmltvAlter version (above) into your working folder.

    "xmltvAlter.exe" Command-Line Execution

    Code:
    D:\XMLTV\xmltvAlter.exe /?
    xmltvAlter v0.99.7 (Pre-Release Evaluation)
    Copyright © 2008 epgStream.net
    
    XMLTVALTER [ruleFile] [sourceFile] [destinationFile]
    
      [ruleFile]         File containing XMLTV processing rules.
                         Optional, Default="xmltvRules.xml"
    
      [sourceFile]       Source XMLTV file to alter.
                         Optional, Default="xmltvInput.xml"
    
      [destinationFile]  Altered destination XMLTV file.
                         Optional, Default="xmltvOutput.xml"
    
    D:\XMLTV>
    "xmltvAlter.exe.config" Application Settings

    Code:
    <?xml version="1.0" encoding="utf-8" ?>
    <configuration>
    	<!--
    		xmltvAlter.exe - Manipulate XMLTV data file using Delete, Replace, Rename, Duplicate, etc operations.
    		Copyright © 2008 epgStream.net
    	   
    		"xmlFormatting"
    		- Indicates if XML file formatting should be used.
    			"indented" - Each XML element is placed on a new line and indented according to hierarchy.
    			"none" - No formatting is applied.
    		  (TYPE=String)(OPTIONAL)(DEFAULT="Indented")
    
    		"applicationExitDelay"
    		- The number of seconds to wait before exiting application.
    		  (TYPE=Integer)(OPTIONAL)(DEFAULT="0")
    				
    		<add key="xmlFormatting" value="Indented"/>
    		<add key="applicationExitDelay" value="0"/>
    
    	-->
    	<appSettings>
    		<add key="xmlFormatting" value="Indented"/>
    		<add key="applicationExitDelay" value="30"/>
    	</appSettings>
    </configuration>
    "xmltvRules.xml" XMLTV Rules

    Code:
    <?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.
__________________
banger @epgStream.net

Visit us at www.epgStream.net! || Forum Support at http://forum.epgstream.net!
Email us at free-epg@epgstream.net! || Talk to us on +61 2 80113647
Help us out with a small donation if you find our service useful!
  Reply With Quote
Reply

Bookmarks

Thread Tools


Similar Threads
Thread Thread Starter Forum Replies Last Post
Free*EPG XMLTV Service epgStream MythTV General Discussion 1 29th January 2008 06:07 AM
Bladerunner Pro 3.5 & XMLTV GUI paulm187 Windows Media Center - EPG Discussion & Support 0 17th August 2006 09:19 PM
BRP and XMLTV feeds? valain Windows Media Center - EPG Discussion & Support 6 9th August 2006 03:57 AM
Importance of MCE Reset tool bella XP Media Center 2005 - The Software 6 4th July 2006 06:01 PM
XPMCE: XMLTV grabbers in Australia Wilbur Windows Media Center - EPG Discussion & Support 3 16th April 2005 11:46 AM


Advertisers
Terms Of Service - Contact Us - Advertise With Us - Archive - Privacy Statement - FAQ
Microsoft©, Windows XP©, Windows XP Media Center© & Windows Vista© are registered trademarks of Microsoft Corporation.
www.xpmediacentre.com.au has no relationship with, nor is affiliated in any way with Microsoft Corporation.
All original content on this website © 2004 - 2008 xpmediacentre.com.au, All rights reserved
Forum by vBulletin Version 3.7.3 - Copyright Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.2.0 RC7
Local time now is 12:08 AM AEDT.