/
merge-xmltv.ini
93 lines (89 loc) · 4.62 KB
/
merge-xmltv.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
**------------------------------------------------------------------------------------------------
* @header_start
* WebGrab+Plus ini for grabbing EPG data from TvGuide websites
* @Site: merge-xmltv
* @MinSWversion: v3.0
* @Revision 5 - [03/09/2023] WGT
* @Revision 4 - [19/11/2019] WGT
* @Revision 3 - [21/01/2016] Francis De Paemeleere
* - add show icon
* @Revision 2 - [21/10/2015] Francis De Paemeleere
* - speedup for large files
* @Revision 1 - [17/10/2015] Jan van Straaten
* - allows multiple xmltv input file to merge
* @Revision 0 - [09/05/2014] Jan van Straaten
* - creation
* @Remarks:
* @header_end
**------------------------------------------------------------------------------------------------
*** edit - timezone=UTC+00:00 - to the timezone for which the xmltv data is created
*** edit (optional) - cultureinfo=en-GB - to the cultureinfo of the country for which the xmltv data is created
site {url=merge-xmltv|timezone=UTC-01:00|maxdays=31.1|cultureinfo=en-GB|charset=UTF-8|titlematchfactor=90|ratingsystemkeepindexpage}
*
*** eventually enable and adapt ratingsystem and episodesystem to your requiements
*site {ratingsystem=GB|episodesystem=onscreen}
*
*** edit - path_of_the_xmltv_file2merge.xml - to your requirements
*** more than one file2merge or just one:
*subpage.format {list|path_of_the_1st_xmltv_file2merge.xml|path_of_the_2nd_xmltv_file2merge.xml|etc}
*** example
subpage.format {list|C:\Users\user\AppData\Local\WebGrab+Plus\myepg.xmltv}
url_index{url|file://|subpage|}
scope.range {(datelogo)|end}
index_variable_element.modify {addstart|'config_site_id'}
global_temp_1.scrub {regex||<channel [^>]*id="[^\"]*"[^>]*>.*?</channel>||}
end_scope
index_urlchannellogo.modify {substring(type=regex)|'global_temp_1' "<channel id="'index_variable_element'\">.*?<icon src="([^"]*)\".*?\/>"}
index_showsplit.scrub {regex||<programme [^>]*channel=\"'index_variable_element'\"[^>]*>.*?</programme>||}
index_start.scrub {single|start="||"|>}
index_stop.scrub {single|stop="||"|>}
index_title.scrub {single|<title|>|</title>|</title>}
index_subtitle.scrub {single|<sub-title|>|</sub-title>|</sub-title>}
index_description.scrub {single|<desc|>|</desc>|</desc>}
index_actor.scrub {multi|<actor|>|</actor>|</actor>}
index_temp_6.scrub {multi|<actor role="||">|">}
index_temp_2.modify {set|0}
loop{(each "index_temp_3" in 'index_actor')|end}
index_temp_4.modify {substring(type=element)|'index_temp_6' 'index_temp_2' 1}
index_temp_4.modify {addstart(not "")|(role=}
index_temp_4.modify {addend(~ "role=")|)}
index_temp_5.modify {addend|'index_temp_3''index_temp_4'##}
index_temp_2.modify {calculate(format=F0)|1 +}
end_loop
index_actor.modify {set|'index_temp_5'}
index_actor.modify {replace|##|\|}
index_writer.scrub {multi|<writer>||</writer>|</writer>}
index_producer.scrub {multi|<producer>||</producer>|</producer>}
index_presenter.scrub {multi|<presenter>||</presenter>|</presenter>}
index_productiondate.scrub {single|<year>||</year>|</year>}
index_category.scrub {multi|<category|>|</category>|</category>}
index_rating.scrub {single|<rating|<value>|</value>|</rating>}
index_temp_7.scrub {single|<rating system="||">|">}
index_rating.modify {addend(['index_rating' notnull] ['index_temp_7' not ""] &)|(system='index_temp_7')}
index_starrating.scrub {single|<star-rating>|<value>|</value>|</star-rating>}
index_episode.scrub {multi|<episode-num|>|</episode-num>|</episode-num>}
index_showicon.scrub {regex||<icon src=\"([^\"]*)||}
scope.range {(indexshowdetails)|end}
* extract times
*start="20120922004200" stop="20120922021200"
index_start.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_start' 0 2} * the hours
index_start.modify {substring(type=char)|2 2} * the minutes
index_start.modify {addstart|'index_temp_1':}
index_stop.modify {substring(type=char)|8 4}
index_temp_1.modify {substring(type=char)|'index_stop' 0 2} * the hours
index_stop.modify {substring(type=char)|2 2} * the minutes
index_stop.modify {addstart|'index_temp_1':}
index_description.modify {cleanup}
end_scope
** _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
** ##### CHANNEL FILE CREATION (only to create the xxx-channel.xml file)
** @auto_xml_channel_start
*index_site_id.scrub {regex||<channel [^>]*id="[^\"]*"[^>]*>.*?</channel>||}
*scope.range {(channellist)|end}
*index_site_channel.modify {addstart|'index_site_id'}
*index_site_id.modify {substring(type=regex)|<channel [^>]*id="([^\"]*)"[^>]*>}
*index_site_channel.modify {substring(type=regex)|<display-name [^>]*>(.*?)</display-name>}
*index_site_id.modify {cleanup(removeduplicates=equal link="index_site_channel")}
*end_scope
** @auto_xml_channel_end