NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums General General Discussion v
« Previous 1 … 101 102 103 104 105 … 159 Next »
Tool to merge tags in XMLTV files

 
  • 0 Vote(s) - 0 Average
Tool to merge tags in XMLTV files
agerdin
Offline

Senior Member

Posts: 692
Threads: 96
Joined: Sep 2004
#1
2007-01-29, 01:32 PM
Hi,

Does anyone know of any program/tool that can be used to merge tags in XMLTV files. What I am looking for is to move information from tags such as actor, year, episode, aspect, etc into the desc tag which is supported by GBPVR.

Let me know if anyone has any ideas.

\\Agerdin
Koenie
Offline

Senior Member

Posts: 356
Threads: 31
Joined: Aug 2005
#2
2007-01-29, 05:58 PM
Ton wrote a little progam called epgfilter. Have a look at this threat:
http://forums.nextpvr.com/showthread.php...=epgfilter
Regards Koen,

GBPVR 1.4.7
AMD 780G with X2 BE2350, 2gb ram, LCD-TV, Win XP
PVR500, PVR150 & PVC150 MCE MediaMVP D3A, 2 networked clients
agerdin
Offline

Senior Member

Posts: 692
Threads: 96
Joined: Sep 2004
#3
2007-01-30, 08:16 AM
Koenie Wrote:Ton wrote a little progam called epgfilter. Have a look at this threat:
http://forums.nextpvr.com/showthread.php...=epgfilter

Looks promising, but I can not see where it may be downloaded from. Checked both the thread and wiki???

\\Agerdin
Wim Fabri
Offline

Junior Member

Posts: 10
Threads: 0
Joined: Oct 2006
#4
2007-01-30, 01:55 PM
you can use an xslt file to do this. I use msxsl.exe to process it. (you can download it from microsoft)

xmltv.xslt :
Code:
<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xml" indent="yes" encoding="UTF-8"/>

<xsl:template match="@* | node()">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>

<xsl:template match="/tv/programme">
<xsl:copy>
<xsl:apply-templates select="@*" />
<xsl:apply-templates select="title" />
<xsl:apply-templates select="sub-title" />
<xsl:apply-templates select="icon" />
<xsl:apply-templates select="category" mode="m1"/>
<desc>
<xsl:apply-templates select="episode-num" />
<xsl:apply-templates select="desc" />
<xsl:apply-templates select="credits" />
<xsl:apply-templates select="rating" />
<xsl:apply-templates select="country" />
<xsl:apply-templates select="date" />
</desc>
</xsl:copy>
</xsl:template>

<xsl:template match="/tv/programme/title">
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy>
</xsl:template>

<xsl:template match="/tv/programme/sub-title">
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy>
</xsl:template>

<xsl:template match="/tv/programme/icon">
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy>
</xsl:template>

<xsl:template match="/tv/programme/category" mode="m1">
<xsl:copy><xsl:apply-templates select="@*|node()" /></xsl:copy>
</xsl:template>

<xsl:template match="/tv/programme/episode-num">
<xsl:text>Episode </xsl:text><xsl:value-of select="." />
<xsl:choose>
<xsl:when test="not(../category) and not(../country) and not(../date)"><xsl:text>
</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="/tv/programme/category" mode="m2">
<xsl:value-of select="." />
<xsl:choose>
<xsl:when test="not(../country) and not(../date)"><xsl:text>
</xsl:text></xsl:when>
<xsl:otherwise><xsl:text> | </xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="/tv/programme/country">
<xsl:text>Land : </xsl:text>
<xsl:value-of select="." />
<xsl:choose>
<xsl:when test="not(../date)"><xsl:text>
</xsl:text></xsl:when>
<xsl:otherwise><xsl:text></xsl:text></xsl:otherwise>
</xsl:choose>
</xsl:template>

<xsl:template match="/tv/programme/date">
<xsl:text> - Jaar : </xsl:text>
<xsl:value-of select="." /><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="/tv/programme/desc">
<xsl:value-of select="." /><xsl:text>
</xsl:text>
</xsl:template>

<xsl:template match="/tv/programme/credits">
<xsl:apply-templates select="presenter" />
<xsl:apply-templates select="guest" />
<xsl:apply-templates select="producer" />
<xsl:apply-templates select="director" />
<xsl:apply-templates select="actor" />
<xsl:apply-templates select="writer" />
</xsl:template>

<xsl:template match="/tv/programme/credits/presenter">
<xsl:if test="position()=1">Moderation: </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>
<xsl:template match="/tv/programme/credits/guest">
<xsl:if test="position()=1">Te Gast : </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>
<xsl:template match="/tv/programme/credits/producer">
<xsl:if test="position()=1">Van : </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>
<xsl:template match="/tv/programme/credits/director">
<xsl:if test="position()=1">Regie : </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>
<xsl:template match="/tv/programme/credits/actor">
<xsl:if test="position()=1">Met : </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>
<xsl:template match="/tv/programme/credits/writer">
<xsl:if test="position()=1">Boek : </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>

<xsl:template match="/tv/programme/rating">
<xsl:if test="@system='FSK'">FSK: <xsl:value-of select="value/." /></xsl:if>
</xsl:template>

<xsl:template name="comma"><xsl:if test="not(position()=last())">, </xsl:if></xsl:template>
<xsl:template name="newline">
<xsl:if test="position()=last()">
<xsl:text>
</xsl:text>
</xsl:if>
</xsl:template>

</xsl:stylesheet>
agerdin
Offline

Senior Member

Posts: 692
Threads: 96
Joined: Sep 2004
#5
2007-01-30, 09:33 PM
Wim, thats exactly what I need. Is there anywhere a description of the stylesheet. My XML knowledge is limited. I can always try my way forward.

Many Thanks

\\Agerdin
agerdin
Offline

Senior Member

Posts: 692
Threads: 96
Joined: Sep 2004
#6
2007-02-01, 08:42 AM
Wim, I got it to work and it was exactly what I needed. However, I have 2 questions,

1. In my XMLTV file I have 2 entries for episode-num and I want the stylesheet to exclude one of them (the first one) but I can not figure out how to do that.
Code:
<episode-num system="xmltv_ns">2004 . 13/24 . </episode-num>
    <episode-num system="onscreen">Del 14 av 24 säsong 2005</episode-num>

2. How can I use Swedisch characters (å, ä, ö) for literals in the stylesheet, msxsl.exe issues an error when using these characters.

Code:
<xsl:template match="/tv/programme/credits/actor">
<xsl:if test="position()=1">Skådespelare: </xsl:if>
<xsl:value-of select="." />
<xsl:call-template name="comma"/>
<xsl:call-template name="newline"/>
</xsl:template>

Thanks

\\Agerdin
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#7
2007-02-01, 08:51 AM
Try changing encoding from "UTF-8" to "iso-8859-1" for å,ä,ö.
I'm not always right
GB-PVR 1.2.9
Accent HT-400 Case, AMD Athlon 64 3800+ 1024MB, 1TB+300GB+180GB, WinXP Pro-SP2, NVidia 7600GT
Nova-T USB2, PVR-350 recording from Dilog 355 DVB-T box, USB-UIRT (receiving & transmitting)
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#8
2007-02-01, 08:53 AM
Don't know whether it's case sensitive, by the way. Maybe it should be "ISO-8859-1".
I'm not always right
GB-PVR 1.2.9
Accent HT-400 Case, AMD Athlon 64 3800+ 1024MB, 1TB+300GB+180GB, WinXP Pro-SP2, NVidia 7600GT
Nova-T USB2, PVR-350 recording from Dilog 355 DVB-T box, USB-UIRT (receiving & transmitting)
agerdin
Offline

Senior Member

Posts: 692
Threads: 96
Joined: Sep 2004
#9
2007-02-01, 09:31 AM
Tried that already, but with no luck. The problem is not with åäö in the xmltv file but rather in the stylesheet itself.


Header of my stylesheet:
Code:
<xsl:stylesheet version = '1.0' xmlns:xsl='http://www.w3.org/1999/XSL/Transform'>
<xsl:output method="xml" indent="yes" encoding="ISO-8859-1"/>

Thanks anyway Stefan,

\\Agerdin
stefan
Offline

Posting Freak

Posts: 3,116
Threads: 81
Joined: Oct 2004
#10
2007-02-01, 10:09 AM
Ah, gotcha. Don't know the answer, though. We certainly use å,ä,ö in our stylesheets, but we don't use the msxsl exe, though. And something tells me you're not willing to setup an entire tomcat/cocoon solution Smile
I'm not always right
GB-PVR 1.2.9
Accent HT-400 Case, AMD Athlon 64 3800+ 1024MB, 1TB+300GB+180GB, WinXP Pro-SP2, NVidia 7600GT
Nova-T USB2, PVR-350 recording from Dilog 355 DVB-T box, USB-UIRT (receiving & transmitting)
« Next Oldest | Next Newest »

Users browsing this thread: 2 Guest(s)

Pages (2): 1 2 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  UK XMLTV recommendations? bgowland 14 1,590 2025-05-22, 07:56 PM
Last Post: boringgit
  zap2it xmltv different than listing SamM 4 2,021 2023-12-11, 02:42 PM
Last Post: Prsa01
  XMLTV - Schedules Direct JSON service changes 2022-05-20 gtb 1 1,175 2022-05-20, 07:34 PM
Last Post: mvallevand
  Help with MCEBuddy moving files to nas bighick 1 1,802 2018-10-27, 10:33 AM
Last Post: p37307
  UK - xmltv.exe now included atlas metabroadcast martint123 3 3,980 2013-12-23, 09:37 AM
Last Post: martint123
  Android application for watching TS files over Wifi ? XJW 1 4,751 2011-11-13, 02:41 AM
Last Post: XJW
  XMLTV GUI : XMLTV Radio Times 3.14.01 released steeb 1 1,885 2011-07-09, 07:40 PM
Last Post: martint123
  codec selection tool? smajor 2 2,211 2011-06-12, 09:55 PM
Last Post: smajor
  Any Freeware H264 ts Editing Tool Recommendation Lao Pan 5 2,899 2011-03-18, 01:33 AM
Last Post: pcostanza
  tool to combine movie files elbryyan 6 2,553 2011-02-17, 05:31 PM
Last Post: elbryyan

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode