Gnus development mailing list
 help / color / mirror / Atom feed
From: Antoine Levitt <antoine.levitt@gmail.com>
To: ding@gnus.org
Subject: Re: Problem with nnrss-generate-download-script
Date: Fri, 07 Sep 2012 16:42:33 +0200	[thread overview]
Message-ID: <87r4qdx5ba.fsf@gmail.com> (raw)
In-Reply-To: <87txv9rk9b.fsf@karnak.MagnumOpus.khem>

[-- Attachment #1: Type: text/plain, Size: 901 bytes --]

09/07/2012 16:16, Charles Philip Chan
> Antoine Levitt <antoine.levitt@gmail.com> 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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: patch-fetch-rss.diff --]
[-- Type: text/x-diff, Size: 2124 bytes --]

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);

  reply	other threads:[~2012-09-07 14:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-07  9:27 Charles Philip Chan
2012-09-07 12:06 ` Antoine Levitt
2012-09-07 12:21   ` Charles Philip Chan
2012-09-07 12:40     ` Adam Sjøgren
2012-09-07 13:09       ` Charles Philip Chan
2012-09-07 14:06         ` Antoine Levitt
2012-09-07 14:16           ` Charles Philip Chan
2012-09-07 14:42             ` Antoine Levitt [this message]
  -- strict thread matches above, loose matches on Subject: below --
2004-05-23 18:48 Nevin Kapur

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87r4qdx5ba.fsf@gmail.com \
    --to=antoine.levitt@gmail.com \
    --cc=ding@gnus.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).