-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathINSTALL
170 lines (90 loc) · 5.32 KB
/
INSTALL
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
tv_grab_uk_atlas
================
Fetch TV and radio programme listings from Atlas data store and reformat into XMLTV format.
INSTALLATION - Linux
============
Assumes you already have a working copy of "XMLTV".
Files should be installed in the following locations:
/usr/bin
--------
tv_grab_uk_atlas (make sure it has execute permission)
$HOME/.xmltv/supplement/tv_grab_uk_atlas
----------------------------------------
tv_grab_uk_atlas.map.channels.conf
tv_grab_uk_atlas.map.genres.conf
tv_grab_uk_atlas.pa.genres.conf
tv_grab_uk_atlas.user.map.conf
CONFIGURATION
=============
1.
First you must obtain an API key from Atlas Metabroadcast. This is free (at the present time) for personal use and is necessary to allow you to access the full schedule published by the Press Association. Any commercial use of the data obtained from Atlas will require a paid-for license.
Instructions are available here: http://metabroadcast.com/blog/create-and-manage-your-atlas-api-key
You will need to enter your API key during the --configure stage.
Remember to request Press Association (PA) as the content provider on your Atlas API key.
2.
Grabber configuration consists of the usual
tv_grab_uk_atlas --configure
Atlas have regionalised data which means you can obtain listings specific to your TV region. When you run the --configure option you will be asked which viewing platform (e.g. Freeview; Sky HD) and region (e.g. London; South East) you wish to access. (You can select only 1 region!).
Then you select which channels you want to fetch.
3.
The file 'tv_grab_uk_atlas.user.map.conf' has two purposes. Firstly you can map the channel ids used by Atlas into something more meaningful to your PVR. E.g.
map==cbdm==FILM4
will change 'cbdm' to 'FILM4' in the output XML.
Note: the lines are of the form "map=={channel id}=={my name}".
The second purpose is to likewise translate genre names. So if your PVR doesn't have a category for 'Science Fiction' but uses 'Sci-fi' instead, then you can specify
cat==Science Fiction==Sci-fi
and the output XML will have 'Sci-fi'.
USAGE
=====
All the normal XMLTV capabilities are included but there is an additional parameter "--hours". Atlas allows schedule data to be retrieved either by number-of-days or by number-of-hours.
Where possible you should use this 'hours' facility to reduce unnecessary load on the Atlas server.
When --hours is specified the --offset is interpreted as hours.
For example:
- to retrieve a schedule for the next 12 hours:
tv_grab_uk_atlas --hours 12
- to retrieve a schedule for the next 12 hours starting tomorrow:
tv_grab_uk_atlas --hours 12 --offset 24
Alternatively you can use the familiar 'days' format:
tv_grab_uk_atlas --days 1
tv_grab_uk_atlas --days 1 --offset 1
Negative numbers are allowed, so for example the following are valid:
tv_grab_uk_atlas --offset -4 --hours 12
tv_grab_uk_atlas --offset -1 --days 1
Note that Atlas only have data for a maximum 14 days ahead and it varies; some channels have less than this.
An additional parameter "--date YYYYMMDD" allows you to fetch the schedule just for this date. (This is obviously similar to --days 1 with an appropriate --offset but avoids you having to calculate the offset; this is easier for some automated fetchers.) E.g.
tv_grab_uk_atlas --date 20130923
A new parameter "--dst" allows you to add an extra hour to the schedule fetched from Atlas. Some PVRs have trouble with BST times and 'lose' an hour at the end of the day's schedule. This parameter might help to alleviate that.
tv_grab_uk_atlas --days 1 --dst
A new parameter "--channel" allows you to override the 'conf' file and retrieve data for a specific channel:
tv_grab_uk_atlas --offset -4 --hours 12 --channel cbdm
For extended help information run
tv_grab_uk_atlas --info
BROWSER INTERFACE
=================
If you wish to run the fetcher via a browser then you can install the cgi script.
(Note you must obviously have a webserver installed or be using a web-host for this to work!).
Copy the file getatlas.pl into the cgi-enabled directory on your web space. (Hint: This directory is often called "cgi-bin".) Ensure the file has execute permission.
(Tech note: use a 'normal' cgi handler to run this file; fastcgi may not work.)
Specify the parameters on the URI as follows:
offset=xxxx
hours=xxxx
days=xxxx
date=YYYYMMDD
channel=xxxx
dst
e.g.
http://my.webspace.com/cgi-bin/getatlas.pl?hours=12
http://my.webspace.com/cgi-bin/getatlas.pl?hours=12&offset=6
http://my.webspace.com/cgi-bin/getatlas.pl?date=20130930
http://my.webspace.com/cgi-bin/getatlas.pl?days=1&dst
Valid combinations are:
'offset' and 'hours'
or 'offset' and 'days' - in which case the offset is 'days' also (otherwise it's 'hours')
or 'date' - fetch just this day
VALIDATION
==========
tv_validate_grabber may report an error similar to:
"Line 5 Invalid channel-id 'FILM4'"
This is a bug in ValidateFile.pm (lines 201-202) which insists the channel-id adheres to RFC2838 despite the xmltv.dtd only saying "preferably" not "SHOULD".
(Having channel ids of the form "bbc1.bbc.co.uk" will be rejected by many PVRs since they require the data to match their own list.)
This error can be ignored.