rpms/emacspeak/F-9 emacspeak-28.0-no-httpd.patch, NONE, 1.1 emacspeak-28.0-tmpfile.patch, NONE, 1.1

Jens Petersen petersen at fedoraproject.org
Fri Sep 26 09:26:41 UTC 2008


Author: petersen

Update of /cvs/pkgs/rpms/emacspeak/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv1394

Added Files:
	emacspeak-28.0-no-httpd.patch emacspeak-28.0-tmpfile.patch 
Log Message:
add patches

emacspeak-28.0-no-httpd.patch:

--- NEW FILE emacspeak-28.0-no-httpd.patch ---
diff -u emacspeak-28.0/Makefile\~ emacspeak-28.0/Makefile
--- emacspeak-28.0/Makefile~	2008-01-28 11:13:27.000000000 +1000
+++ emacspeak-28.0/Makefile	2008-09-25 12:12:45.000000000 +1000
@@ -285,8 +285,6 @@
 	$(INSTALL)  -m 644 ${JS}  $(libdir)/js
 	$(INSTALL) -d $(libdir)/servers
 	$(INSTALL) -d $(libdir)/servers/python
-	$(INSTALL) -d $(libdir)/servers/httpd
-	$(INSTALL)  -m 644 ${TCLHTTPD}  $(libdir)/servers/tts.tcl
 	$(INSTALL) -d $(libdir)/servers/linux-outloud
 	$(INSTALL)  -m 755 ${OUTLOUD}  $(libdir)/servers/linux-outloud
 	cp   ${PYFILES}  $(libdir)/servers/python

emacspeak-28.0-tmpfile.patch:

--- NEW FILE emacspeak-28.0-tmpfile.patch ---
diff -up emacspeak-28.0/etc/extract-table.pl.tmpfile emacspeak-28.0/etc/extract-table.pl
--- emacspeak-28.0/etc/extract-table.pl.tmpfile	2007-05-04 11:08:59.000000000 +1000
+++ emacspeak-28.0/etc/extract-table.pl	2008-09-26 17:50:05.000000000 +1000
@@ -1,36 +1,36 @@
 #!/usr/bin/perl -w
-#$Id: extract-table.pl 4047 2006-08-11 19:11:17Z tv.raman.tv $
+#$Id: extract-table.pl 5842 2008-08-25 18:54:14Z tv.raman.tv $
 # Accepts a URI and table spec
-#returns a csv file
+#returns csv output on STDOUT 
 use strict;
 use FileHandle;
 use LWP::UserAgent;
 use HTML::TableExtract;
 use IO::File;
+use File::Temp qw(tempfile);
 use Getopt::Long;
 use vars qw (%options);
-my ($url, $file, $task, $depth, $count, $cols);
+my ($url, $file, $depth, $count, $cols);
 
-my %options = (task => \$task,
-           url => \$url,
-file => \$file,
-           depth => \$depth,
-count => \$count,
-headers => \$cols);
+my %options = (
+    url => \$url,
+    file => \$file,
+    depth => \$depth,
+    count => \$count,
+    headers => \$cols);
 GetOptions (\%options,
             'file=s',
             'url=s',
-            'task=s',
             'depth=i',
             'count=i',
             'headers=s');
-$task ||= "extract-table";
-my $input;
+
+my ($input, $inputname);
 if (defined ($file)) {
   $input = $file;
 } else {
-  $input="/tmp/$options{task}.html";
-  RetrieveURLToFile($url, $input);
+    ($input, $inputname) = tempfile(suffix=>'.html');
+  RetrieveURLToFile($url, $inputname);
 }
 
 my $te;
@@ -41,8 +41,9 @@ if ( defined ($cols)) {
  $te = new HTML::TableExtract( depth => $depth, count=>$count); 
 }
 $te->parse_file($input);
-my $output = new FileHandle (">  /tmp/$task.csv");
+
 my ($ts,$row);
+my $output =\*STDOUT;
 foreach $ts ($te->table_states) {
           foreach $row ($ts->rows) {
              $output->print ( join(',', @$row), "\n");
@@ -52,7 +53,7 @@ foreach $ts ($te->table_states) {
 $output->close();
 
 if (defined ($url)) {
-  unlink ($input);
+  unlink ($inputname);
 }
 # {{{  retrieve URL to file
 
@@ -64,9 +65,8 @@ sub RetrieveURLToFile {
   # Pass request to the user agent and get a response back
   my $res = $ua->request($req, $filename);
   if ($res->is_success()) {
-    warn"table: Retrieved $url to $filename\n";
   } elsif ($res->is_error()) {
-    exit ("Retrieval for $url failed\n");
+      die ("Retrieval failed  for $url");
   }
 }
 




More information about the fedora-extras-commits mailing list