From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/82281 Path: news.gmane.org!not-for-mail From: Antoine Levitt Newsgroups: gmane.emacs.gnus.general Subject: Re: Problem with nnrss-generate-download-script Date: Fri, 07 Sep 2012 16:42:33 +0200 Message-ID: <87r4qdx5ba.fsf@gmail.com> References: <87hararxn1.fsf@karnak.MagnumOpus.khem> <878vcmjauf.fsf@gmail.com> <87627qrpl8.fsf@karnak.MagnumOpus.khem> <87mx12nh0a.fsf@topper.koldfront.dk> <87y5kmq8sb.fsf@karnak.MagnumOpus.khem> <87ehmex6zc.fsf@gmail.com> <87txv9rk9b.fsf@karnak.MagnumOpus.khem> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1347028993 5534 80.91.229.3 (7 Sep 2012 14:43:13 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Fri, 7 Sep 2012 14:43:13 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M30548@lists.math.uh.edu Fri Sep 07 16:43:16 2012 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1T9zm7-0006xP-J3 for ding-account@gmane.org; Fri, 07 Sep 2012 16:43:15 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1T9zlq-0006II-A8; Fri, 07 Sep 2012 09:42:58 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1T9zlo-0006I5-Ff for ding@lists.math.uh.edu; Fri, 07 Sep 2012 09:42:56 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1T9zlm-0007aq-Kj for ding@lists.math.uh.edu; Fri, 07 Sep 2012 09:42:56 -0500 Original-Received: from plane.gmane.org ([80.91.229.3]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1T9zll-0004tE-7a for ding@gnus.org; Fri, 07 Sep 2012 16:42:53 +0200 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1T9zll-0006YN-Ng for ding@gnus.org; Fri, 07 Sep 2012 16:42:53 +0200 Original-Received: from portable112.ceremade.dauphine.fr ([193.48.71.112]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Sep 2012 16:42:53 +0200 Original-Received: from antoine.levitt by portable112.ceremade.dauphine.fr with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Fri, 07 Sep 2012 16:42:53 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 107 Original-X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: portable112.ceremade.dauphine.fr Mail-Copies-To: never User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2.50 (gnu/linux) X-Spam-Score: -1.0 (-) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:82281 Archived-At: --=-=-= Content-Type: text/plain 09/07/2012 16:16, Charles Philip Chan > Antoine Levitt writes: > > Hi Antoine: > >> I too have some feeds I don't want on gwene. What I do is I have a local >> leafnode server running (added benefit : no latency for gnus). Leafnode >> mirrors gwene on the feeds I'm interesed in, and I also have local >> groups (available from leafnode 2, I believe), which I fill with the >> software for gwene that Lars published >> (https://github.com/larsmagne/gwene). It works fine. > > Ah, I also use Leafnode. I didn't know the software behind Gwene will > work with Leafnode. Thanks for the pointer. If you use it (or if anybody finds this thread with the goal to run gwene on their personal computer, and has trouble like me finding what libraries are needed), here's a trivial patch that fixes a couple of issues and includes comments on how to install on a debian-like distro. --=-=-= Content-Type: text/x-diff Content-Disposition: attachment; filename=patch-fetch-rss.diff diff --git a/fetch-rss b/fetch-rss index 953b0ef..bb64d15 100755 --- a/fetch-rss +++ b/fetch-rss @@ -1,8 +1,16 @@ #!/usr/bin/perl +# require "/usr/local/src/XML-TreePP-0.41/blib/lib/XML/TreePP.pm"; +# require "/usr/local/src/XML-FeedPP-0.42/blib/lib/XML/FeedPP.pm"; -require "/usr/local/src/XML-TreePP-0.41/blib/lib/XML/TreePP.pm"; -require "/usr/local/src/XML-FeedPP-0.42/blib/lib/XML/FeedPP.pm"; -#use XML::FeedPP; + +# On debian : +# mkdir /var/tmp/gwene +# install curl libdigest-sha-perl libxml-feedpp-perl libberkeleydb-perl libdb5.1-dev +# perl -MCPAN -e shell +# install Digest::SHA1 +# install BerkeleyDB + +use XML::FeedPP; use Encode qw/encode decode/; use Date::Parse; use POSIX qw(strftime); @@ -90,17 +98,23 @@ sub my_description { $tmp = "/tmp/feed.$$.rss"; -system("curl", "-s", "-o", $tmp, "-m", "5", "-L", - "-A", "Gwene/1.0 (The gwene.org rss-to-news gateway)", - $source); -if ($? != 0) { - if (-f $tmp) { - unlink $tmp; +if($source =~ /http/) { + system("curl", "--compressed", "-s", "-S", "-o", $tmp, "-m", "10", "-L", + "-A", "Gwene/1.0 (The gwene.org rss-to-news gateway)", "--retry", "3", + $source); + if ($? != 0) { + if (-f $tmp) { + unlink $tmp; + } + exit; } - exit; } +else { + system("cp", $source, $tmp) +} + -system("/home/larsi/gwene/encode-content", $tmp, "$tmp.code"); +system("encode-content", $tmp, "$tmp.code"); rename "$tmp.code", $tmp; eval { @@ -212,7 +226,7 @@ foreach my $item (reverse @items) { $skip = 1; } else { if (! $nntp) { - @nntp = ("news.gmane.org"); + @nntp = ("localhost"); $nntp = Net::NNTP->new(@nntp) || die "cannot connect to NNTP server"; } for ($i = 1; $i < 10; $i++) { @@ -300,8 +314,9 @@ foreach my $item (reverse @items) { undef @art; undef $art; $a = 0; - $nntp->quit; - $nntp = Net::NNTP->new(@nntp) || die "cannot connect to NNTP server"; + # why is this here? + # $nntp->quit; + # $nntp = Net::NNTP->new(@nntp) || die "cannot connect to NNTP server"; if ($old_newsgroups) { @groups = split(/,/, $old_newsgroups); --=-=-=--