xmltv/filter tv_imdb,1.27,1.28

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

Modified Files:
	tv_imdb 
Log Message:
add options to add keywords and plot summary to output

Index: tv_imdb
===================================================================
RCS file: /cvsroot/xmltv/xmltv/filter/tv_imdb,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** tv_imdb	19 Apr 2014 08:25:43 -0000	1.27
--- tv_imdb	2 May 2014 06:35:43 -0000	1.28
***************
*** 10,17 ****
  
  tv_imdb --imdbdir <dir> [--help] [--quiet] [--download]
!        [--prepStage (1-7,all)]
  
  tv_imdb --imdbdir <dir> [--help] [--quiet]
!        [--movies-only][--stats][--output FILE] [FILE...]
  
  =head1 DESCRIPTION
--- 10,19 ----
  
  tv_imdb --imdbdir <dir> [--help] [--quiet] [--download]
!        [--prepStage (1-9,all)]
  
  tv_imdb --imdbdir <dir> [--help] [--quiet]
!        [--with-keywords] [--with-plot]
!        [--movies-only] [--stats] [--debug]
!        [--output FILE] [FILE...]
  
  =head1 DESCRIPTION
***************
*** 22,26 ****
  XMLTV::IMDB package.
  
! B<--output FILE> write to FILE rather than standard output
  
  B<--quiet> disable all status messages (that normally appear on stderr).
--- 24,32 ----
  XMLTV::IMDB package.
  
! B<--output FILE> write to FILE rather than standard output.
! 
! B<--with-keywords> include IDMb keywords in the output file.
! 
! B<--with-plot> include IDMb plot summary in the output file.
  
  B<--quiet> disable all status messages (that normally appear on stderr).
***************
*** 28,32 ****
  B<--download> try to download data files if they are missing (in --prepStage).
  
! B<--stats> force output of grab stats (stats output disabled in --quiet mode).
  
  B<--movies-only> only augment programs that look like movie listings (4 digit
--- 34,40 ----
  B<--download> try to download data files if they are missing (in --prepStage).
  
! B<--stats> output grab stats (stats output disabled in --quiet mode).
! 
! B<--debug> output info from movie matching 
  
  B<--movies-only> only augment programs that look like movie listings (4 digit
***************
*** 81,84 ****
--- 89,96 ----
  B<8.> imdb user ratings added to E<39>star-ratingsE<39> field.
  
+ B<9.> imdb keywords added to E<39>keywordE<39> fields.
+ 
+ B<10.> imdb plot summary is added.
+ 
  =head1 HOWTO
  In order to use tv_imdb, you need:
***************
*** 158,163 ****
  use XMLTV::Usage <<END
  $0: augment listings with data from imdb.com
! $0 --imdbdir <dir> [--help] [--quiet] [--download] [--prepStage (1-7,all)]
! $0 --imdbdir <dir> [--help] [--quiet] [--download] [--movies-only][--stats][--output FILE] [FILE...]
  
  END
--- 170,175 ----
  use XMLTV::Usage <<END
  $0: augment listings with data from imdb.com
! $0 --imdbdir <dir> [--help] [--quiet] [--download] [--prepStage (1-9,all)]
! $0 --imdbdir <dir> [--help] [--quiet] [--download] [--with-keywords] [--with-plot] [--movies-only][--stats][--debug][--output FILE] [FILE...]
  
  END
***************
*** 172,176 ****
--- 184,191 ----
      $opt_download,
      $opt_stats,
+     $opt_debug,
      $opt_movies_only,
+     $opt_with_keywords,
+     $opt_with_plot,
     );
  
***************
*** 179,191 ****
  	   'prepStage=s' => \$opt_prepStage,
  	   'imdbdir=s' => \$opt_imdbDir,
  	   'movies-only' => \$opt_movies_only,
  	   'quiet' => \$opt_quiet,
  	   'download' => \$opt_download,
! 	   'stats' => \$opt_stats) or usage(0);
  
  usage(1) if $opt_help;
  usage(1) if ( not defined($opt_imdbDir) );
  
  $opt_movies_only=0 if ( !defined($opt_movies_only) );
  
  $opt_quiet=(defined($opt_quiet));
--- 194,213 ----
  	   'prepStage=s' => \$opt_prepStage,
  	   'imdbdir=s' => \$opt_imdbDir,
+ 	   'with-keywords' => \$opt_with_keywords,
+ 	   'with-plot'     => \$opt_with_plot,
  	   'movies-only' => \$opt_movies_only,
  	   'quiet' => \$opt_quiet,
  	   'download' => \$opt_download,
! 	   'stats'         => \$opt_stats,
! 	   'debug'         => \$opt_debug,
! 	   ) or usage(0);
  
  usage(1) if $opt_help;
  usage(1) if ( not defined($opt_imdbDir) );
  
+ $opt_with_keywords=0 if ( !defined($opt_with_keywords) );
+ $opt_with_plot=0     if ( !defined($opt_with_plot) );
  $opt_movies_only=0 if ( !defined($opt_movies_only) );
+ $opt_debug=0         if ( !defined($opt_debug) );
  
  $opt_quiet=(defined($opt_quiet));
***************
*** 196,199 ****
--- 218,222 ----
      $opt_stats=(defined($opt_stats));
  }
+ $opt_debug=0  if $opt_quiet;
  
  if ( defined($opt_prepStage) ) {
***************
*** 211,215 ****
  
      if ( $opt_prepStage eq "all" ) {
! 	for (my $stage=1 ; $stage <= 7 ; $stage++ ) {
  	    my $n=new XMLTV::IMDB::Crunch(%options);
  	    if ( !$n ) {
--- 234,238 ----
  
      if ( $opt_prepStage eq "all" ) {
! 	for (my $stage=1 ; $stage <= 8 ; $stage++ ) {
  	    my $n=new XMLTV::IMDB::Crunch(%options);
  	    if ( !$n ) {
***************
*** 230,234 ****
  	}
  	my $ret=$n->crunchStage(int($opt_prepStage));
! 	if ( $ret == 0 && int($opt_prepStage) == 6 ) {
  	    print STDERR "database load complete, let the games begin !\n" if ( !$opt_quiet);
  	}
--- 253,257 ----
  	}
  	my $ret=$n->crunchStage(int($opt_prepStage));
! 	if ( $ret == 0 && int($opt_prepStage) == 9 ) {
  	    print STDERR "database load complete, let the games begin !\n" if ( !$opt_quiet);
  	}
***************
*** 251,257 ****
  
  my $imdb=new XMLTV::IMDB('imdbDir' => $opt_imdbDir,
! 			 'verbose' => !$opt_quiet,
  			 'cacheLookups' => 1,
! 			 'cacheLookupSize' => 1000);
  
  #$imdb->{verbose}++;
--- 274,283 ----
  
  my $imdb=new XMLTV::IMDB('imdbDir' => $opt_imdbDir,
! 			 'verbose'         => $opt_debug,
  			 'cacheLookups' => 1,
! 			 'cacheLookupSize' => 1000,
! 			 'updateKeywords'  => $opt_with_keywords,
! 			 'updatePlot'      => $opt_with_plot,
! 			 );
  
  #$imdb->{verbose}++;


------------------------------------------------------------------------------
"Accelerate Dev Cycles with Automated Cross-Browser Testing - For FREE
Instantly run your Selenium tests across 300+ browser/OS combos.  Get 
unparalleled scalability from the best Selenium testing platform available.
Simple to use. Nothing to install. Get started now for free."
http://p.sf.net/sfu/SauceLabs
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.