/usr/share/xmltv/tv_augment/augment.rules is in xmltv-util 0.5.69-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
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 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 | #
# Sample "rules" file for use with tv_augment
#
# $Id: augment.rules,v 1.3 2016/06/27 23:56:59 knowledgejunkie Exp $
#
#
###############################################################################
#
# This file contains the rules used by XMLTV::Augment.
#
# The objective is to fix errors and inconsistencies in the incoming data from
# a grabber, and to enhance the programme xml where certain data are missing.
#
# For example:
# Some programme entries in the listings data may contain subtitle/episode
# information in the title field, others may contain the programme title
# and subtitle reversed, and yet more may contain 'episode' information that
# should be in the episode-num field.
#
# Rules are divided into a number of 'types' according to what they do.
# Individual types (rule sets) can be switched off in the augmentation config
# file.
#
# Matching is usually (but not exclusively) done by comparing the incoming
# <title> against the title specified in the rule below.
#
# A 'rule' definition consists of the rule 'type' separated rom the rule
# content by a pipe character ('|'). The rule content has a variable (but fixed
# for any given rule type) number of fields separated by tilde characters ('~')
#
# The action taken depends on the rule type:
#
# 1) non_title_info
# The content is text that is to be removed from any programme titles where
# this text occurs at the beginning of the <title> element followed by
# any of : ; or ,
# e.g.
# 1|Action Heroes Season
# "Action Heroes Season: Rambo" --> "Rambo"
#
# 2) mixed_title_subtitle
# The content is the desired title of a programme when the incoming title
# contains both the programme's title *and* episode separated by : ; or -
# ($title:$episode). We reassign the episode information to the <episode>
# element, leaving only the programme title in the <title> element.
# e.g.
# 2|Blackadder II
# "Blackadder II: Potato / " --> "Blackadder II / Potato"
#
# 3) mixed_subtitle_title
# The content is the desired title of a programme when the incoming title
# contains both the programme's episode *and* title separated by : ; or -
# ($episode:$title). We reassign the episode information to the <episode>
# element, leaving only the programme title in the <title> element.
# e.g.
# 3|Storyville
# "Kings of Pastry: Storyville / " --> "Storyville / Kings of Pastry"
#
# 4) reversed_title_subtitle
# The content is the desired title of a programme which is listed as the
# programme's episode (i.e. the title and episode details have been
# reversed). We therefore reverse the <title> and <episode> elements.
# e.g.
# 4|Storyville
# "Kings of Pastry / Storyville" --> "Storyville / Kings of Pastry"
#
# 5) replacement_titles
# The content contains two programme titles, separated by a
# tilde (~). The first title is replaced by the second in the listings
# output.
# This is useful to fix inconsistent naming (e.g. "Law and Order" vs.
# "Law & Order") or inconsistent grammar ("xxxx's" vs. "xxxxs'")
# e.g.
# 5|A Time Team Special~Time Team
# "A Time Team Special / Doncaster" --> "Time Team / Doncaster"
#
# 6) replacement_genres
# The content contains a programme title and a programme category(-ies)
# (genres), separated by tilde (~). Categories can be assigned to
# uncategorised programmes (which can be seen in the stats log).
# (Note that *all* categories are replaced for the title.)
# e.g.
# 6|Antiques Roadshow~Entertainment~Arts~Shopping
# "Antiques Roadshow / " category "Reality" -->
# "Antiques Roadshow / " category "Entertainment" + "Arts" + "Shopping"
#
# 7) replacement_episodes
# The content contains a programme title, an old episode value and a new
# episode value, separated by tildes (~).
# e.g.
# 7|Time Team~Time Team Special: Doncaster~Doncaster
# "Time Team / Time Team Special: Doncaster" --> "Time Team / Doncaster"
#
# 8) replacement_titles_episodes
# The content contains an old programme title, an old episode value, a new
# programme title and a new episode value. The old and new titles MUST be
# given, the episode fields can be left empty but the field itself must be
# present.
# e.g.
# 8|Top Gear USA Special~Detroit~Top Gear~USA Special
# "Top Gear USA Special / Detroit" --> "Top Gear / USA Special"
#
# 8|Top Gear USA Special~~Top Gear~USA Special
# "Top Gear USA Special / " --> "Top Gear / USA Special"
#
# 9) replacement_ep_from_desc
# The content contains a programme title, a new episode value to update,
# and a description (or at least the start of it) to match against. When
# title matches incoming data and the incoming description startswith the
# text given then the episode value will be replaced.
# e.g.
# 9|Heroes of Comedy~The Goons~The series celebrating great British
# comics pays tribute to the Goons.
# "Heroes of Comedy / " desc> = "The series celebrating great British
# comics pays tribute to the Goons."
# --> "Heroes of Comedy / The Goons"
# Should be used with care; e.g.
# "Heroes of Comedy / Spike Milligan" desc> = "The series celebrating
# great British comics pays tribute to the Goons."
# would *also* become
# "Heroes of Comedy / The Goons"
# this may not be what you want!
#
# 10) replacement_titles_desc
# The content contains an old programme title, an old episode value, a new
# programme title, a new episode value and the episode description (or at
# least the start of it) to match against.
# The old and new titles and description MUST be given, the episode fields
# can be left empty but the field itself must be present.
# This is useful to fix episodes where the series is unknown but can be
# pre-determined from the programme's description.
# e.g.
# 10|Which Doctor~~Gunsmoke~Which Doctor~Festus and Doc go fishing, but
# are captured by a family that is feuding with the Haggens.
# "Which Doctor / " desc> = "Festus and Doc go fishing, but are captured
# by a family that is feuding with the Haggens. [...]"
# --> "Gunsmoke / Which Doctor"
#
# 11) demoted_titles
# The content contains a programme 'brand' and a new title to be extracted
# from subtitle field and promoted to programme title, replacing the brand
# title.
# In other words, if title matches, and sub-title starts with text then
# remove the matching text from sub-title and move it into the title.
# Any text after 'separator' (any of .,:;-) in the sub-title is preserved.
# e.g.
# 11|Blackadder~Blackadder II
# "Blackadder / Blackadder II: Potato" --> "Blackadder II / Potato"
#
# 12) replacement_film_genres
# The content contains a film title and a category (genre) or categories,
# separated by a tilde (~).
# If title matches the rule's text and the prog has category "Film" or
# "Films", then use the replacement category(-ies) supplied.
# Use case: some film-related programmes are incorrectly flagged as films
# and should to be re-assigned to a more suitable category.
# (Note ALL categories are replaced, not just "Film")
# e.g.
# 12|The Hobbit Special~Entertainment~Interview
# "The Hobbit Special / " category "Film" + "Drama" -->
# "The Hobbit Special / " category "Entertainment" + "Interview"
#
# 13) subtitle_remove_text
# The content contains a programme title and arbitrary text to
# be removed from the start/end of the programme's subtitle. If the text to
# be removed precedes or follows a "separator" (any of .,:;-), the
# separator is removed also.
# e.g.
# 13|Time Team~A Time Team Special
# "Time Team / Doncaster : A Time Team Special" -->
# "Time Team / Doncaster"
#
# 14) process_replacement_genres
# The content contains a category (genre) value followed by replacement
# category(-ies) separated by a tilde (~).
# Use case: useful if your PVR doesn't understand some of the category
# values in the incoming data; you can translate them to another value.
# e.g.
# 14|Adventure/War~Action Adventure~War
# "The Guns of Navarone" category "Adventure/War" -->
# "The Guns of Navarone" category "Action Adventure" + "War"
#
# 15) process_add_genres_to_channel
# The content contains a channel id followed by replacement
# category(-ies) separated by a tilde (~).
# Use case: this can add a category if data from your supplier is always
# missing; e.g. add "News" to a news channel, or "Music" to a music
# vid channel.
# e.g.
# 15|travelchannel.co.uk~Travel
# "World's Greatest Motorcycle Rides" category "Motoring" -->
# "World's Greatest Motorcycle Rides" category "Motoring" + "Travel"
# 15|cnbc.com~News~Business
# "Investing in India" category "" -->
# "Investing in India" category "News" + "Business"
# You should be very careful with this one as it will add the category you
# specify to EVERY programme broadcast on that channel. This may not be what
# you always want (e.g. Teleshopping isn't really "music" even if it is on MTV!)
#
#
###############################################################################
#
# Some sample rules follow; obviously you should delete these and replace with
# your own!
#
1|Action Heroes Season
1|Western Season
1|Python Night
2|Blackadder II
2|Comic Relief
2|Old Grey Whistle Test
3|Storyville
4|Storyville
4|Timewatch
5|A Time Team Special~Time Team
5|Cheaper By the Dozen~Cheaper by the Dozen
5|Later - with Jools Holland~Later... with Jools Holland
6|Antiques Roadshow~Entertainment~Arts~Shopping
6|Deal or No Deal~Game show
6|Men Behaving Badly~Sitcom
7|Time Team~Time Team Special: Doncaster~Doncaster
8|Top Gear USA Special~Detroit~Top Gear~USA Special
9|Heroes of Comedy~The Goons~The series celebrating great British comics pays tribute to the Goons.
10|Which Doctor~~Gunsmoke~Which Doctor~Festus and Doc go fishing, but are captured by a family that is feuding with the Haggens.
11|Blackadder~Blackadder II
11|Formula One~Live Formula One
11|Man on Earth~Man on Earth with Tony Robinson
12|The Hobbit Special~Entertainment~Interview
12|Hell on Wheels~Drama
13|Time Team~A Time Team Special
13|World's Busiest~World's Busiest
14|Adventure/War~Action Adventure~War
14|Soccer~Football
14|NFL~American Football
15|travelchannel.co.uk~Travel
15|smashhits.net~Music
#
# (the sample rules shown here are in sorted order but that is not necessary
# in your live file)
###############################################################################
|