xmltv

 view release on metacpan or  search on metacpan

ChangeLog  view on Meta::CPAN

2004-01-03 21:55  epaepa

	* grab/it/tv_grab_it.in: Fixed --days and --offset.

2004-01-03 21:24  epaepa

	* grab/dk/tv_grab_dk: --offset was being counted twice.

2004-01-03 14:52  epaepa

	* Makefile.PL, Uninstall.pm, analyse_tvprefs/analyse_tvprefs,
	  choose/tv_pick/merge_tvprefs, filter/Grep.pm,
	  grab/Config_file.pm, grab/Europe_TZ.pm, grab/Get_nice.pm,
	  grab/Grab_XML.pm, grab/Memoize.pm, grab/Mode.pm,
	  grab/nz/tv_grab_nz.PL, grab/uk_rt/tv_grab_uk_rt.PL, lib/Ask.pm,
	  lib/AskTerm.pm, lib/AskTk.pm, lib/Clumps.pm, lib/Date.pm,
	  lib/Gunzip.pm, lib/Summarize.pm, lib/TZ.pm, lib/Usage.pm,
	  lib/XMLTV.pm.in, lib/set_share_dir.pl, t/add_time_info,
	  t/test_filters.t, t/test_library.t, t/test_tv_split.t: Made sure
	  every Perl source file has a CVS Id: thingy.

2004-01-03 14:35  epaepa

ChangeLog  view on Meta::CPAN

2004-01-03 12:10  epaepa

	* t/test_filters.t: Comment.

2004-01-03 12:03  epaepa

	* doc/QuickStart: Updated the list of grabbers.

2004-01-03 11:57  epaepa

	* analyse_tvprefs/analyse_tvprefs: 'use warnings' instead of -w.

2004-01-03 11:52  epaepa

	* grab/Grab_XML.pm: Added __DIE__ handler to print URL.

2004-01-03 11:49  epaepa

	* grab/Get_nice.pm: Comment.

2004-01-03 11:46  epaepa

ChangeLog  view on Meta::CPAN

	  XMLTV::Foo rather than just Foo.

2003-06-21 15:07  epaepa

	* Makefile.PL: Fixed windows_dist target: a line was missing.
	  Converted some spaces to tabs (it didn't seem to matter, but
	  might as well be consistent).

2003-06-21 14:44  epaepa

	* MANIFEST: Added merge_tvprefs to file list.

2003-06-21 14:26  epaepa

	* grab/de/tv_grab_de: Fix up the downloaded XML to have
	  proper-looking channel ids and <channel> elements.

2003-06-21 13:02  epaepa

	* grab/nl/tv_grab_nl: Moved most of write_details() into a new
	  routine process_details_page() which returns a programme hash

ChangeLog  view on Meta::CPAN

	* filter/: Grep.pm, tv_grep.in: Fixed bug found by Jeffrey Arundel
	  Ralph and Robert Eden.  An empty regexp does not 'always match',
	  instead it uses the last successfully matching regexp.  This
	  meant it appeared to work for some users but failed for others.
	  Now there is an explicit check for empty regexp whenever one is
	  used.  The strange thing is that this check already existed in
	  some parts of the code, but not everywhere.

2003-06-08 09:47  epaepa

	* choose/tv_pick/merge_tvprefs: Adding trivial merge_tvprefs script
	  to combine two or more prefs files.

2003-06-07 17:09  epaepa

	* choose/tv_pick/tv_pick_cgi: Removed support for very old tvprefs
	  files with 'maybe'.

2003-06-03 03:38  rmeden

	* Makefile.PL: blank lines were left in new windows_dist code.

2003-06-01 21:11  epaepa

	* grab/Europe_TZ.pm: date_to_eur(): Removed unused $clock_shift
	  variable.

ChangeLog  view on Meta::CPAN

	  non-ASCII characters from the source code.  The characters were
	  mostly in the code in order to purge bad characters from the web
	  pages fetched :-P.  Now we just use \xAB style hex escapes.

	  Also tidied up the tv_check documentation, it previously had some
	  Microsoftisms including the notorious 'smart quotes' and lumps of
	  non-breaking spaces used for layout.

2002-12-23 20:23  epaepa

	* analyse_tvprefs/analyse_tvprefs, choose/tv_pick/tv_pick_cgi,
	  grab/uk_rt/tv_grab_uk_rt.in: Fixed several places with
	  configuration-file-parsing code.  You need to strip comments
	  _before_ stripping trailing spaces, otherwise a space before a
	  comment is left.  Hmm, perhaps this should be factored out.

2002-12-21 02:47  chunkygoodness

	* grab/nz/tv_grab_nz: Fixed tv1 regular expression - the source had
	  changed

ChangeLog  view on Meta::CPAN

	  locale will.	Thanks to Derek J. Kalweit for bringing this to my
	  attention.

2002-12-01 17:14  epaepa

	* Makefile.PL, README, doc/README.win32, lib/XMLTV.pm.in: Version
	  0.5.4.

2002-12-01 16:58  epaepa

	* analyse_tvprefs/analyse_tvprefs: Updated link to top 3000 words
	  in the BNC; now it points to my mirror of that page.

2002-12-01 10:12  epaepa

	* mkdist: Now there are two readme files the mkdist reminder needs
	  to mention them both.

2002-11-24 05:10  rmeden

	* doc/README.win32: Mention the fact that TZ can be determined

ChangeLog  view on Meta::CPAN

	  now used by the whole project and not just by the grabbers.  The
	  Makefile.PL loads this library 'by hand' and uses it to prompt
	  about tv_check.

	  I've also changed tv_check's README to standardize on the name
	  tv_check not TVCHECK or tvcheck... I hope it's author doesn't
	  mind too much :-(.

2002-09-01 11:53  epaepa

	* ChangeLog.old, README, xmltv.dtd, analyse_tvprefs/README,
	  analyse_tvprefs/analyse_tvprefs,
	  choose/tv_check/tv_check_doc.html, choose/tv_pick/tv_pick_cgi,
	  filter/tv_cat, filter/tv_extractinfo_en, filter/tv_grep.in,
	  filter/tv_sort, filter/tv_to_latex, grab/de/tv_grab_de,
	  lib/XMLTV.pm.in, t/parallel_test, t/test_filters.t: Updated
	  references to the XMLTV website, and to my email address.  Purged
	  all traces of my old userid.

2002-08-30 22:35  epaepa

	* Makefile.PL: Fixed (I hope) that problem with certain MakeMaker

ChangeLog  view on Meta::CPAN

	  documentation files.	(BTW, these docs need not be installed -
	  they are there as a guide to the source tree.)

2002-05-23 10:54  epaepa

	* choose/tv_check/README.tv_check: Wrapped lines to 70 columns -
	  hope you don't mind Robert.

2002-05-23 10:50  epaepa

	* analyse_tvprefs/README: Token documentation on the
	  analyse_tvprefs tool.

2002-05-23 10:47  epaepa

	* doc/code/grabber_interface: The grabber_interface file is
	  currently just a placeholder, but at least it now contains a
	  small amount of useful information.

2002-05-23 10:43  epaepa

	* doc/QuickStart: Updated to reflect that binaries will be

ChangeLog  view on Meta::CPAN

	  among programmes sharing a clump.  With the old grabber this was
	  necessary because special fixups to a programme might require
	  others in its clump to be updated.  But the special handlers are
	  no longer used (though I plan to move them into a tool of their
	  own) so there's no need to keep track of clumps beyond just
	  adding the clumpidx to each programme hash.  This is just cutting
	  out dead code.

2002-01-07 15:33  epaepa

	* analyse_tvprefs/analyse_tvprefs: Tidied by removing trailing
	  whitespace on comments; removed CVS logs.

2002-01-07 15:30  epaepa

	* ZapListings.pm: Tidied file by getting rid of spaces on lines
	  that were all spaces.

2002-01-07 15:27  epaepa

	* UK_TZ.pm: Tidied up file by removing trailing whitespace.

ChangeLog  view on Meta::CPAN

	* ClickListings.pm: Changed a lot of 'print STDERR' to 'warn', it
	  makes it clearer what the purpose is.  Debug statements didn't
	  change since they're not actually warnings.

2001-11-11 16:44  epaepa

	* ClickListings.pm, README, README.channels, UK_TZ.pm, XMLTV.pm,
	  ZapListings.pm, channels.dtd, filter_shown, getlistings_ca,
	  getlistings_na, getlistings_uk_ananova, listings_to_latex,
	  mkdist, pick_cgi, sort_listings, xmltv.dtd,
	  analyse_tvprefs/analyse_tvprefs: Whoops, just realized that the
	  last changelog message would itself get keyword-expanded, causing
	  no end of confusion.	I had to perform some emergency censorship
	  of funny dollar signs.

2001-11-11 16:41  epaepa

	* ClickListings.pm, README, README.channels, UK_TZ.pm, XMLTV.pm,
	  ZapListings.pm, channels.dtd, filter_shown, getlistings_ca,
	  getlistings_na, getlistings_uk_ananova, listings_to_latex,
	  mkdist, pick_cgi, sort_listings, xmltv.dtd,
	  analyse_tvprefs/analyse_tvprefs: Rearranged (or added) comments
	  at the start of each file, so the description is near the top and
	  the changelog near the bottom.  Added $Log: $ lines to get an
	  automatically updated changelog from now on; I hope it works.

2001-11-11 15:57  epaepa

	* ChangeLog.old: Added the RCS version history (from rcs2log) to
	  ChangeLog.old.  From now on we will not edit a ChangeLog file,
	  all changes will be logged with CVS commit messages.

ChangeLog  view on Meta::CPAN


2001-11-09 06:18  jveldhuis

	* getlistings_ca: updated to work with tvguide.ca

2001-11-02 18:35  jveldhuis

	* TVChannels.pm, channels_nl.xml, channels_uk.xml, channeltest.pl,
	  doc.html, getlistings_nl, getlistings_pa, pick_process,
	  scrapped_getlistings_uk_ananova, test_memoize, test_xmltv_module,
	  tvprefs, tz.pl, uk_tz.pl: no longer included sometime previous to
	  0.2.10

2001-11-02 18:28  jveldhuis

	* ChangeLog, ClickListings.pm, README, XMLTV.pm, channels.dtd,
	  getlistings_na, getlistings_uk_ananova, sort_listings,
	  towatch.dvi, xmltv.dtd, analyse_tvprefs/bnc_freq.txt:
	  xmltv-0.2.10

2001-11-02 18:25  jveldhuis

	* ChangeLog, ClickListings.pm, README, README.channels, XMLTV.pm,
	  channels.dtd, getlistings_na, getlistings_uk_ananova,
	  listings_to_latex, xmltv.dtd, analyse_tvprefs/analyse_tvprefs:
	  xmltv-0.2.9

2001-11-02 18:24  jveldhuis

	* ChangeLog, ClickListings.pm, README, UK_TZ.pm, XMLTV.pm,
	  getlistings_na, getlistings_uk_ananova, listings_to_latex,
	  pick_cgi, scrapped_getlistings_uk_ananova, test_memoize,
	  test_xmltv_module, xmltv.dtd: xmltv-0.2.8

2001-11-02 18:22  jveldhuis

ChangeLog  view on Meta::CPAN

	* ChangeLog, README, getlistings_uk_ananova, pick_cgi: xmltv-0.2.7

2001-11-02 18:21  jveldhuis

	* ChangeLog, README, listings_to_latex, uk_tz.pl: xmltv-0.2.6

2001-11-02 18:20  jveldhuis

	* ChangeLog, README, README.channels, TVChannels.pm, channels.dtd,
	  channels_nl.xml, channels_uk.xml, channeltest.pl, getlistings_nl,
	  getlistings_uk_ananova, listings_to_latex, pick_cgi, tvprefs,
	  uk_tz.pl: xmltv-0.2.5

2001-11-02 18:15  jveldhuis

	* ChangeLog, README, doc.html, getlistings_ca, getlistings_nl,
	  getlistings_uk_ananova, listings_to_latex, pick_cgi,
	  sort_listings, uk_tz.pl: xmltv-0.2.4

2001-11-02 18:14  jveldhuis

MANIFEST  view on Meta::CPAN

lib/Clumps.pm
lib/IMDB.pm
lib/Usage.pm
lib/Version.pm
lib/Summarize.pm
lib/Gunzip.pm
lib/Date.pm
lib/exe_opt.pl
lib/exe_wrap.pl
lib/set_share_dir.pl
analyse_tvprefs/README
analyse_tvprefs/analyse_tvprefs
analyse_tvprefs/bnc_freq.txt
choose/tv_check/README.tv_check
choose/tv_check/tv_check
choose/tv_check/tv_check_doc.html
choose/tv_check/tv_check_doc.jpg
choose/tv_pick/tv_pick_cgi
choose/tv_pick/merge_tvprefs
doc/COPYING
doc/README.win32
doc/QuickStart
doc/code/coding_standards
doc/code/grabber_interface
filter/tv_cat
filter/tv_split
filter/tv_extractinfo_en
filter/tv_grep.PL
filter/tv_grep.in

analyse_tvprefs/README  view on Meta::CPAN

A silly little tool to work out what things interest you by processing
the 'tvprefs' file generated by tv_pick_cgi.  Please see
<http://membled.com/work/apps/xmltv/analyse_tvprefs.html>.

analyse_tvprefs/analyse_tvprefs  view on Meta::CPAN

#!/usr/bin/perl
#
# Tool for finding frequency of words in programme titles, see
# <http://membled.com/work/apps/xmltv/analyse_tvprefs.html>.
#
# $Id: analyse_tvprefs,v 1.9 2004/01/03 14:52:53 epaepa Exp $
#

use warnings;
use strict;
my $opt_noprefs = 0;
if (@ARGV) {
    if ($ARGV[0] eq '--noprefs') {
	$opt_noprefs = 1;
	shift @ARGV;
    }
    else {
	die "usage: $0 [--noprefs]";
    }
}

my %type_scores = (never  => -2,
		   no     => -1,
		   yes    =>  1,
		   always =>  2);
my (%pos_points, %neg_points);
my ($total_pos, $total_neg);
while (<>) {
    s/\#.*//; s/^\s+//; s/\s+$//;
    next unless /\S/;
    s/^(\w+):\s*//;

    unless ($opt_noprefs) {
	my $type = $1; die if not defined $type;
	my $score = $type_scores{$type};
	if (not defined $score) {
	    die "$ARGV:$.: unknown type $type";
	}
	while (s/(\w+)//) {
	    my $word = lc $1;
	    if ($score > 0) {
		$pos_points{$word} += $score;
		# Add zero just to make sure the entry gets there.  So

analyse_tvprefs/analyse_tvprefs  view on Meta::CPAN

	}
    }

}

# Normalize - first, if we are doing preferences, by rebalancing
# positive and negative scores.  (Normally, there will be many more
# 'never' programmes than any other kind, so without normalizing
# there'd be huge negative scores and a few small positive ones.)
#
unless ($opt_noprefs) {
    if ($total_pos == 0) {
	die "no programmes at all had a positive score\n";
    }
    elsif ($total_neg == 0) {
	die "no programmes at all had a negative score\n";
    }
    my $norm_factor = $total_neg / $total_pos;
    foreach (keys %pos_points) {
	$pos_points{$_} *= $norm_factor;
    }

analyse_tvprefs/analyse_tvprefs  view on Meta::CPAN

# Now we've got +ve and -ve on the same sort of scale, we can add them
# to get an overall score for each word.
#
my %score;
foreach (keys %pos_points) {
    $score{$_} = $pos_points{$_} - $neg_points{$_};
}

# Now divide by the total number of points allocated, so we get
# reasonably similar-sized numbers no matter how large or small the
# prefs file.
#
# Finally, divide each word's score by its frequency in English: so we
# don't end up with a big negative score for 'the', outweighing
# everything else, for example.
#
my $total = $total_pos + $total_neg;
foreach (keys %score) {
    $score{$_} /= $total;
    $score{$_} /= word_freq($_);
}

choose/tv_pick/merge_tvprefs  view on Meta::CPAN

#!/usr/bin/perl -w
#
# usage: merge_tvprefs files
#
# Outputs a new tvprefs file that combines the two.  Where they
# disagree, later files in the list take precedence.  So you might
# invoke as 'merge_tvprefs tvprefs.old tvprefs.new >tvprefs.merged'.
#
# $Id: merge_tvprefs,v 1.2 2004/01/03 14:52:53 epaepa Exp $
#
use strict;
my %wanted;
while (<>) {
    s/\#.*//; s/^\s+//; s/\s+$//;
    next if $_ eq '';
    if (/^(never|no|yes|always): (.+)$/) {
	my ($pref, $prog) = ($1, $2);
	$wanted{$prog} = $pref;
    }

choose/tv_pick/tv_pick_cgi  view on Meta::CPAN


# Scratch file for storage between requests (this should really be
# done with form data or cookies).
#
my $TOWATCH = 'towatch.tmp';

# Final output file
my $OUTPUT = 'towatch.xml';

# Input file containing preferences (killfiled programmes, etc).
my $PREFS_FILE = 'tvprefs';

# Preferred languages - if information is available in several
# languages, the ones in this list are used if possible.  List in
# order of preference.  Passed to best_name().
#
# FIXME should find this out from HTTP headers.
#
my @PREF_LANGS;

# Hopefully the environment variable $LANG will be set

choose/tv_pick/tv_pick_cgi  view on Meta::CPAN

    @PREF_LANGS = ($el);
}
else {
    @PREF_LANGS = ('en'); # change for your language - or just set $LANG
}

########
# End of configuration

# Prototype declarations
sub store_prefs($$);
sub display_form($);
sub print_date_for($;$);
sub clumpidx_to_english($);
sub download_xml();

# Load data into globals $data and @programmes.
my $data = XMLTV::parsefile($LISTINGS);
my $encoding = $data->[0];
my @programmes = @{$data->[3]};

choose/tv_pick/tv_pick_cgi  view on Meta::CPAN

#t('\%wanted=' . d(\%wanted));

my ($skip, $next) = (url_param('skip'), url_param('next'));
foreach ($skip, $next) {
    die "bad URL parameter $_" if defined and tr/0-9//c;
}
#t('$skip=' . d($skip) . ', $next=',  d($next));

if (defined $skip and defined $next) {
    # Must be that the user has submitted some preferences.
    store_prefs($skip, $next);
}
elsif (defined $skip and not defined $next) {
    # This is one of the form pages, skipping some programmes already
    # seen.
    #
    close PREFS;
    display_form($skip);
}
elsif (not defined $skip and not defined $next) {
    # Initial page, corresponding to skip=0.

choose/tv_pick/tv_pick_cgi  view on Meta::CPAN

END
  ;
    close TOWATCH;

    close PREFS;
    display_form(0);
}
else { die 'bad URL parameters' }


# store_prefs()
#
# Store the user's preferences for $CHUNK_SIZE programmes starting
# from 'skip'.
#
# Parameters:
#   number of programmes to skip from the beginning of @programmes
#   the new value of 'skip' for the next page in the list
#
sub store_prefs($$) {
    die 'usage: store_prefs(skip, next)' if @_ != 2;
    my ($skip, $next) = @_;

    for (my $i = 0; $i < @programmes; $i++) {
	my $val = param("prog$i");
	if (defined $val) {
	    # Check that this programme really did appear in the
	    # previous page.
	    #
	    die "bad programme number $i for skip $skip, next $next"
	      unless $skip <= $i and $i < $next;

choose/tv_pick/tv_pick_cgi  view on Meta::CPAN


    # Update $PREFS_FILE with preferences.  'yes' or 'no' preferences
    # are still worth storing because they let us pick the default
    # radio button next time.
    #
    copy($PREFS_FILE, "$PREFS_FILE.old")
      or die "cannot copy $PREFS_FILE to $PREFS_FILE.old: $!";
    flock(PREFS, LOCK_EX);
    truncate PREFS, 0 or die "cannot truncate $PREFS_FILE: $!";
    print PREFS <<END
# 'prefs' file
#
# This file contains stored preferences for programme titles, so that
# the user need never be bothered about these shows again.  It's like
# a killfile.  But as well as saying you 'never' want to watch 'That's
# Esther', you can have a preference of 'always' watching some
# programmes, without being asked.
#
# A 'yes' or 'no' preference will change the default choice, but the
# user will be asked again to check.
#

doc/QuickStart  view on Meta::CPAN

when you've chosen your preferences for everything on the page, press
'Submit' and a page will appear confirming your preferences and
listing which of the programmes will appear in the output ('planning
to watch').  There will probably be several pages of listings, so go
to 'Next page' and repeat as necessary.  Take comfort in the thought
that you'll never have to deal with most of these shows ever
again :-).

At the end a personal listings file towatch.xml is generated, which
you can download with your browser if you want, and your preferences
are stored for next time in the file tvprefs.  It is worth checking
this file after your first use of pick_cgi in case you accidentally
marked something as 'never'.


* Using the tools together

It's probably easiest, once you get used to the tools, to run them
together in a pipeline.  For example,

% tv_grab_fi | tv_sort | tv_extractinfo_en \



( run in 0.884 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )