xmltv/grab/uk_atlas CHANGELOG, NONE, 1.1 INSTALL, NONE, 1.1 TODO, NONE, 1.1

Geoff <[email protected]>
Newsgroups gmane.comp.tv.xmltv.cvs
Message-ID <[email protected]>
Update of /cvsroot/xmltv/xmltv/grab/uk_atlas
In directory sfp-cvs-1.v30.ch3.sourceforge.com:/tmp/cvs-serv15925/uk_atlas

Added Files:
	CHANGELOG INSTALL TODO 
Log Message:
Add new UK grabber

--- NEW FILE: TODO ---
To Do
=====




Done
====

2.  Add actor "role" attribute.   >> 1.010
1.  Allow the channel specified to "--channel" to be a 'mapped' channel name		>> 1.003


--- NEW FILE: INSTALL ---
tv_grab_uk_atlas
================

Fetch TV and radio programme listings from Atlas data store and reformat into XMLTV format.



INSTALLATION - Linux
============

Files should be installed in the following locations:

/usr/bin
--------
tv_grab_uk_atlas   (make sure it has execute permission)

$HOME/.xmltv
------------
tv_grab_uk_atlas.conf

$HOME/.xmltv/supplement/tv_grab_uk_atlas
----------------------------------------
tv_grab_uk_atlas.map.conf
tv_grab_uk_atlas.map.genre.conf
atlasAPIkey



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/getting-full-uk-listings-data-from-atlas-it-s-easy

Once you have your API key then edit the file 'atlasAPIkey' and insert your key as the only line in this file. 


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.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'.


IMPORTANT: the downloaded 'tv_grab_uk_atlas.map.conf' contains example lines to illustrate the format - you should edit this file to suit your own purposes!


4.
The file 'tv_grab_uk_atlas.map.genre.conf' contains mappings from the category codes (genres) used by Press Association into meaningful category names.  You shouldn't need to edit this file.




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 will 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.)


It may also report 

	     "tv_sort failed on the concatenated data. Probably due to overlapping data between days."
	
This is a bug in ValidateGrabber.pm (lines 348-353) which insists on the data retrieved being 00:00-23:59 during its "notadditive" test:

	     "grabbing data for tomorrow first and then for the day after tomorrow and
	     concatenating them does not yield the same result as grabbing the data
	     for tomorrow and the day after tomorrow at once."
	

Both these errors can be ignored.

	     "Grabber validated ok."





--- NEW FILE: CHANGELOG ---

1.012  17-Oct-2013  Add option to change publisher
1.011  14-Oct-2013  Add 'episode_num' tag with the Atlas ids for brand, series and item
1.010  12-Oct-2013  Additional person roles
                    Fix for platforms with no regions (e.g. Saorview)
                    Modified method for determining programme's Title / Sub-title
                    Add 'role' attribute to actors
1.009  3-Oct-2013   Map genre to multiple out values
                    Allow genre removal
1.008  28-Sep-2013  Fix --list-channels
                    Add <icon> to channel details
1.007  23-Sep-2013  Fix channel's <display-name>
--     18-Sep-2013  Validate the generated xml with xmllint
1.006  12-Sep-2013  Ignore comments in 'map' files
1.005  11-Sep-2013  Bug fix in timezone display
1.004  11-Sep-2013  Handle HTTP failures
1.003  11-Sep-2013  Added --dst param
                    Simplified 'from'/'to' code 
                    Allow the channel specified to "--channel" to be a 'mapped' channel name 
1.002  11-Sep-2013  Map 'Film' genre to alternative name if added by 'type' attribute
                    Fixed bug in 'to' time calculation for --hours with --offset
1.001  10-Sep-2013  Fix grabbing of "premiere"
1.000  10-Sep-2013  Initial release



------------------------------------------------------------------------------
October Webinars: Code for Performance
Free Intel webinars can help you accelerate application performance.
Explore tips for MPI, OpenMP, advanced profiling, and more. Get the most from 
the latest Intel processors and coprocessors. See abstracts and register >
http://pubads.g.doubleclick.net/gampad/clk?id=60135031&iu=/4140/ostg.clktrk
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.