I am switching from using my tired Tivo series 3 to using Kodi. I have been struggling to create a scrapper that will read metadata stored in text files for each of the TV shows I have archived from my the Tivo. For some backgroung, the text file is generated by a program called KMTTG that downloads from the Tivo and uses a third program called pyTivo to generate the metadata file with the same filename but ending in txt. Unfortuanely, althought the data in it has a lot in common with an NFO file, it is not in the NFO format, but rather is a list of name/value pairs separated by a colon (see below).
title : Sample Title
seriesTitle : Sample Title
description : As something happens deep down in the Midnight Zone, something else happens somewhere else..
time : 2015-02-18T00:02:00Z
mpaaRating : G1
isEpisode : true
iso_duration : PT16M
episodeTitle : The Episode title goes here.
isEpisodic : true
showingBits : 1
tvRating : x3
displayMajorNumber : 22
callsign : ABC2/ABC4
seriesId : SH0000262601
programId : EP0000262601-0004454490
vProgramGenre : Animation
vSeriesGenre : Animation
vSeriesGenre : Interests
I have been reading the scrappers wiki at "http://kodi.wiki/view/HOW-TO_Write_Media_Info_Scrapers" and other posts on this forum, such as from PKO66 (http://forum.kodi.tv/showthread.php?tid=36422). It looks to me like it shouldn't be too difficult to put together a scrapper to parse the metadata text file and populate the library with at least the Title and plot. Maybe it isn't too hard, but I can't get it to work. The logic I worked on was that it was much like scrapping an NFO file. This is what I have tried to do:
1. Change the extension of the text file to .NFO
2. Make a scrapper XML with an NFO section that simply sent everything to the getdetails section.
<NfoUrl dest="3">
<RegExp input="$$1" output="\1" dest="3">
<expression noclean="1"/>
</RegExp>
</NfoUrl>
3. In the getdtails section make the regex convert the name:value pairs to generate the listing of detailed information in the correct format as detailed in section 1.3 on HOW-TO_Write_Media_Info_Scrapers (wiki)
I have used ScraperXMLEditor3_6_9_5 to test the regex and feeding in the appropriate test data it looks like I am getting a good output from the GetDetails section... so I think my regex there is ok. What I suspect i going wrong is that the NFO section of the scraper does not like that the content of the file is not in the correct NFO format and is not parsing it to the GetDetails section.
This looked like it would be an elegant solution, but it doesn't appear to be working.
Any thoughts or recommendations?
Regards,
David
title : Sample Title
seriesTitle : Sample Title
description : As something happens deep down in the Midnight Zone, something else happens somewhere else..
time : 2015-02-18T00:02:00Z
mpaaRating : G1
isEpisode : true
iso_duration : PT16M
episodeTitle : The Episode title goes here.
isEpisodic : true
showingBits : 1
tvRating : x3
displayMajorNumber : 22
callsign : ABC2/ABC4
seriesId : SH0000262601
programId : EP0000262601-0004454490
vProgramGenre : Animation
vSeriesGenre : Animation
vSeriesGenre : Interests
I have been reading the scrappers wiki at "http://kodi.wiki/view/HOW-TO_Write_Media_Info_Scrapers" and other posts on this forum, such as from PKO66 (http://forum.kodi.tv/showthread.php?tid=36422). It looks to me like it shouldn't be too difficult to put together a scrapper to parse the metadata text file and populate the library with at least the Title and plot. Maybe it isn't too hard, but I can't get it to work. The logic I worked on was that it was much like scrapping an NFO file. This is what I have tried to do:
1. Change the extension of the text file to .NFO
2. Make a scrapper XML with an NFO section that simply sent everything to the getdetails section.
<NfoUrl dest="3">
<RegExp input="$$1" output="\1" dest="3">
<expression noclean="1"/>
</RegExp>
</NfoUrl>
3. In the getdtails section make the regex convert the name:value pairs to generate the listing of detailed information in the correct format as detailed in section 1.3 on HOW-TO_Write_Media_Info_Scrapers (wiki)
I have used ScraperXMLEditor3_6_9_5 to test the regex and feeding in the appropriate test data it looks like I am getting a good output from the GetDetails section... so I think my regex there is ok. What I suspect i going wrong is that the NFO section of the scraper does not like that the content of the file is not in the correct NFO format and is not parsing it to the GetDetails section.
This looked like it would be an elegant solution, but it doesn't appear to be working.
Any thoughts or recommendations?
Regards,
David