xmltv/grab/uk_atlas tv_grab_uk_atlas, 1.16, 1.17 tv_grab_uk_atlas.map.channels.conf, 1.3, 1.4 tv_grab_uk_atlas.map.genres.conf, 1.1, 1.2 tv_grab_uk_atlas.pa.genres.conf, 1.1, 1.2 CHANGELOG, 1.10, NONE FAQ, 1.3, NONE INSTALL, 1.3, NONE TODO, 1.1, NONE
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-serv2179
Modified Files:
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
Removed Files:
CHANGELOG FAQ INSTALL TODO
Log Message:
- remove non-standard files
- enhance POD information
- use new --info option
- fix 'premiere' flag
Index: tv_grab_uk_atlas.map.genres.conf
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_atlas/tv_grab_uk_atlas.map.genres.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tv_grab_uk_atlas.map.genres.conf 5 Dec 2013 15:21:30 -0000 1.1
--- tv_grab_uk_atlas.map.genres.conf 21 Jan 2014 10:53:56 -0000 1.2
***************
*** 1,6 ****
#
# Translate programme genres
#
! cat==General Movie==
! cat==Advertisement==Shopping
!
--- 1,6 ----
+ # DO NOT EDIT THIS FILE - put your changes in tv_grab_uk_atlas.user.map.conf
#
# Translate programme genres
#
! #cat==General Movie==
! #cat==Advertisement==Shopping
--- CHANGELOG DELETED ---
Index: tv_grab_uk_atlas
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_atlas/tv_grab_uk_atlas,v
retrieving revision 1.16
retrieving revision 1.17
diff -C2 -d -r1.16 -r1.17
*** tv_grab_uk_atlas 9 Jan 2014 12:15:29 -0000 1.16
--- tv_grab_uk_atlas 21 Jan 2014 10:53:56 -0000 1.17
***************
*** 5,8 ****
--- 5,10 ----
# This code is distributed under the GNU General Public License v2 (GPLv2) .
#
+ # For extended help information run
+ # tv_grab_uk_atlas --info
#
***************
*** 32,35 ****
--- 34,38 ----
use XMLTV::Configure::Writer;
use XMLTV::Ask;
+ use XMLTV::Get_nice 0.005065;
use File::Path;
***************
*** 75,81 ****
no warnings 'redefine';
local *XMLTV::Options::PrintUsage = sub {
! use Pod::Usage;
! pod2usage(-verbose => 0);
! #exit 1;
};
use warnings 'redefine';
--- 78,82 ----
no warnings 'redefine';
local *XMLTV::Options::PrintUsage = sub {
! use Pod::Usage; pod2usage(-verbose => 0)
};
use warnings 'redefine';
***************
*** 92,96 ****
version => $VERSION,
description => $GRABBER_DESC,
! extra_options => [qw/hours=i date=s dst channel=s info/],
defaults => {'hours'=>0, 'channel'=>''}
});
--- 93,97 ----
version => $VERSION,
description => $GRABBER_DESC,
! extra_options => [qw/hours=i date=s dst channel=s/],
defaults => {'hours'=>0, 'channel'=>''}
});
***************
*** 98,108 ****
#print Dumper($conf, $opt); exit;
- # --info option prints a 'man' style page from our POD.
- if ($opt->{'info'}) {
- use Pod::Usage;
- pod2usage(-verbose => 2);
- exit 1;
- }
-
# any overrides?
if (defined( $conf->{'generator-info-name'} )) { $generator_info_name = $conf->{'generator-info-name'}->[0]; }
--- 99,102 ----
***************
*** 583,587 ****
push @{$xmlprog{'subtitles'}}, {'type' => 'deaf-signed'} if $bcast{'deaf_signed'};
push @{$xmlprog{'subtitles'}}, {'type' => 'deaf-signed'} if $bcast{'audio_signed'};
! $xmlprog{'premiere'} = {} if $bcast{'premiere'};
$xmlprog{'previously-shown'} = {} if $bcast{'repeat'};
$xmlprog{'new'} = {} if $bcast{'new_series'} || $bcast{'new_episode'};
--- 577,581 ----
push @{$xmlprog{'subtitles'}}, {'type' => 'deaf-signed'} if $bcast{'deaf_signed'};
push @{$xmlprog{'subtitles'}}, {'type' => 'deaf-signed'} if $bcast{'audio_signed'};
! $xmlprog{'premiere'} = [] if $bcast{'premiere'};
$xmlprog{'previously-shown'} = {} if $bcast{'repeat'};
$xmlprog{'new'} = {} if $bcast{'new_series'} || $bcast{'new_episode'};
***************
*** 1044,1048 ****
# Extract the available channels
! my $data = JSON::PP->new()->utf8(0)->decode($res->content);
$res = undef;
--- 1038,1043 ----
# Extract the available channels
! #my $data = JSON::PP->new()->utf8(0)->decode($res->content);
! my $data = get_nice_json($url,'',1);
$res = undef;
***************
*** 1461,1465 ****
=head1 NAME
! tv_grab_uk_atlas - Grab TV listings for UK from Atlas Metabroadcast website.
=head1 SYNOPSIS
--- 1456,1460 ----
=head1 NAME
! tv_grab_uk_atlas - Grab TV and radio programme listings for UK from MetaBroadcast website (Atlas database).
=head1 SYNOPSIS
***************
*** 1511,1515 ****
Output TV listings in XMLTV format for many channels available in UK.
! The data come from http://atlas.metabroadcast.com
First you must run B<tv_grab_uk_atlas --configure> to choose which channels
--- 1506,1510 ----
Output TV listings in XMLTV format for many channels available in UK.
! The data come from L<http://atlas.metabroadcast.com>
First you must run B<tv_grab_uk_atlas --configure> to choose which channels
***************
*** 1569,1572 ****
--- 1564,1709 ----
B<--info> Print a help page and exit.
+ =head1 INSTALLATION
+
+ 1.
+ First you must obtain an Atlas API key from 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:
+ L<http://metabroadcast.com/blog/getting-full-uk-listings-data-from-atlas-it-s-easy>
+
+ You will need to enter your API key during the --configure stage.
+
+ 2.
+ Grabber configuration consists of the usual:
+ B<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 F<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".
+
+
+ IMPORTANT: the downloaded "tv_grab_uk_atlas.user.map.conf" contains example lines
+ to illustrate the format - you should edit this file to suit your own purposes!
+
+ =head1 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 has 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 config file and retrieve
+ data for a specific channel:
+
+ tv_grab_uk_atlas --offset -4 --hours 12 --channel cbdm
+
+
+ =head1 BROWSER INTERFACE
+
+ If you wish to run the fetcher via a browser then you can install the supplied
+ cgi script.
+
+ (Note you must obviously have a webserver installed or be using a web-host for
+ this to work.)
+
+ Copy the file F<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
+
+
=head1 ERROR HANDLING
***************
*** 1584,1588 ****
=head1 SUPPORTED CHANNELS
! For information on supported channels, see $HOME/.xmltv/supplement/tv_grab_uk_atlas/tv_grab_uk_atlas.map.channels.conf
=head1 AUTHOR
--- 1721,1768 ----
=head1 SUPPORTED CHANNELS
! For information on supported channels, see
! $HOME/.xmltv/supplement/tv_grab_uk_atlas/tv_grab_uk_atlas.map.channels.conf
!
! =head1 XMLTV VALIDATION
!
! B<tv_validate_grabber> may report an error similar to:
!
! "Line 5 Invalid channel-id BBC 1"
!
! This is a because ValidateFile.pm 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.
!
! =head1 FAQs
!
! 1. What does "Enter your Atlas API key" mean?
!
! You must obtain an API key free from Atlas MetaBroadcast before you can use
! this grabber. Instructions are available here:
! L<http://metabroadcast.com/blog/getting-full-uk-listings-data-from-atlas-it-s-easy>
!
!
! 2. I"m getting the error "Status: 400 Bad Request"
!
! Typically this is because you haven"t entered your API key during the
! --configure stage.
! Or if you requested a particular channel with the --channel option but the
! channel cannot be found.
!
!
! =head1 DISCLAIMER
!
! The MetaBroadcast free license for these data does not allow non-personal use.
!
! Certainly any commercial use of listings data obtained by using this grabber
! will breach copyright law, but if you are just using the data for your own
! personal use then you are probably fine.
!
! By using this grabber you aver you are using the listings data for your own
! personal use only and you absolve the author(s) from any liability under
! copyright law or otherwise.
=head1 AUTHOR
***************
*** 1593,1602 ****
=head1 COPYRIGHT
! Copyright (C) 2013 Geoff Westcott.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
! as published by the Free Software Foundation; either version 2
! of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,
--- 1773,1781 ----
=head1 COPYRIGHT
! Copyright (c) 2013 Geoff Westcott.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
! (version 2) as published by the Free Software Foundation.
This program is distributed in the hope that it will be useful,
***************
*** 1605,1613 ****
GNU General Public License for more details.
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the
- Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
- Boston, MA 02110-1301, USA.
-
=head1 SEE ALSO
--- 1784,1787 ----
--- FAQ DELETED ---
Index: tv_grab_uk_atlas.pa.genres.conf
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_atlas/tv_grab_uk_atlas.pa.genres.conf,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -d -r1.1 -r1.2
*** tv_grab_uk_atlas.pa.genres.conf 5 Dec 2013 15:21:30 -0000 1.1
--- tv_grab_uk_atlas.pa.genres.conf 21 Jan 2014 10:53:56 -0000 1.2
***************
*** 1,2 ****
--- 1,6 ----
+ # DO NOT EDIT THIS FILE - any changes you make will be overwritten
+ #
+ # You can change the genre text by editing tv_grab_uk_atlas.user.map.conf
+ #
# PressAssociation genre codes
#
Index: tv_grab_uk_atlas.map.channels.conf
===================================================================
RCS file: /cvsroot/xmltv/xmltv/grab/uk_atlas/tv_grab_uk_atlas.map.channels.conf,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** tv_grab_uk_atlas.map.channels.conf 20 Dec 2013 07:10:02 -0000 1.3
--- tv_grab_uk_atlas.map.channels.conf 21 Jan 2014 10:53:56 -0000 1.4
***************
*** 1,2 ****
--- 1,4 ----
+ # DO NOT EDIT THIS FILE - put your changes in tv_grab_uk_atlas.user.map.conf
+ #
# CHANNELS for all Atlas channels mapped to an RFC2838 compliant channel id
# Cross-references the RadioTimes channel id (where one exists)
--- INSTALL DELETED ---
--- TODO DELETED ---
------------------------------------------------------------------------------
CenturyLink Cloud: The Leader in Enterprise Cloud Services.
Learn Why More Businesses Are Choosing CenturyLink Cloud For
Critical Workloads, Development Environments & Everything In Between.
Get a Quote or Start a Free Trial Today.
http://pubads.g.doubleclick.net/gampad/clk?id=119420431&iu=/4140/ostg.clktrk