🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
7 messages
7 total messages Started by Andre Majorel Tue, 05 Feb 2008 12:01
Append all new articles to mbox unattended
#216464
Author: Andre Majorel
Date: Tue, 05 Feb 2008 12:01
17 lines
1761 bytes
Is there a libre software program for Unix to retrieve by NNTP
all new articles in the specified newsgroups and append them to
mbox files, one per newsgroup ?

I think some form of locking is needed so I can keep the mboxes
open in Mutt and no-one overwrites anyone else's changes.
Procmail is known to play nice with Mutt so invoking procmail
once for each article would be acceptable.

Bonus points if it can include the current YYYY-MM in the names
of the mbox files.

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
(Counterfeit: debylod@predicament.com bin@cutesy.com)
"I drink, I smoke, I gamble, I chase girls--but postal chess is
one vice I don't have." -- Mikhail Tal
Re: Append all new articles to mbox unattended
#216465
Author: Tom Newton
Date: Tue, 05 Feb 2008 12:48
33 lines
2413 bytes
On 2008-02-05, Andre Majorel <cheney@halliburton.com> wrote:
> Is there a libre software program for Unix to retrieve by NNTP
> all new articles in the specified newsgroups and append them to
> mbox files, one per newsgroup ?
>
> I think some form of locking is needed so I can keep the mboxes
> open in Mutt and no-one overwrites anyone else's changes.
> Procmail is known to play nice with Mutt so invoking procmail
> once for each article would be acceptable.
>
> Bonus points if it can include the current YYYY-MM in the names
> of the mbox files.

Use leafnode and run a script that will convert the directories
full of files with one post each into an mbox with the name
you want.

I can write that without any problem.

But what date would the mbox have? Would you be downloading
new posts once a week and naming each new mbox for each
newsgroup  with the date and time of the download?

So you'd have a directory for each newsgroup, filling with
mboxes of new posts. Kind of strange..

Mutt has an nntp patch. Does _it_ store posts in mboxes?

Tom

-- 
calhobbit (at)
gmail [DOT] com
Re: Append all new articles to mbox unattended
#216470
Author: Frank Slootweg
Date: Tue, 05 Feb 2008 16:35
23 lines
2119 bytes
Andre Majorel <cheney@halliburton.com> wrote:
> Is there a libre software program for Unix to retrieve by NNTP
> all new articles in the specified newsgroups and append them to
> mbox files, one per newsgroup ?

  tin can do that. See the "AUTOMATIC MAILING AND SAVING NEW NEWS"
section of the tin(1) manual page (for example at
<http://www.tin.org/bin/man.cgi?section=1&topic=tin>. And no, you don't
*have* to mail them - just saving them is fine as the format is mbox -
but you *can* mail them if you want.
  
> I think some form of locking is needed so I can keep the mboxes
> open in Mutt and no-one overwrites anyone else's changes.
> Procmail is known to play nice with Mutt so invoking procmail
> once for each article would be acceptable.

  Why do you want to keep them open? Anyway, as you say, with the proper
mail tools, locking/updating shouldn't be a problem.

> Bonus points if it can include the current YYYY-MM in the names
> of the mbox files.

  SMOSP, Small Matter of Shell Programming.
Re: Append all new articles to mbox unattended
#216471
Author: Andre Majorel
Date: Tue, 05 Feb 2008 16:50
77 lines
4220 bytes
On 2008-02-05, Tom Newton <tom@server.invalid> wrote:
> On 2008-02-05, Andre Majorel <cheney@halliburton.com> wrote:
>> Is there a libre software program for Unix to retrieve by NNTP
>> all new articles in the specified newsgroups and append them to
>> mbox files, one per newsgroup ?
>>
>> I think some form of locking is needed so I can keep the mboxes
>> open in Mutt and no-one overwrites anyone else's changes.
>> Procmail is known to play nice with Mutt so invoking procmail
>> once for each article would be acceptable.
>>
>> Bonus points if it can include the current YYYY-MM in the names
>> of the mbox files.
>
> Use leafnode and run a script that will convert the directories
> full of files with one post each into an mbox with the name
> you want.
>
> I can write that without any problem.

Current solution involves that, with s/leafnode/slrnpull/.
Modifying slrnpull to do what I want is probably somewhat easier
than messing with its spool (that can fail in more ways). What
I'm worried about is locking.

> But what date would the mbox have?

Date of retrieval. If there's a way to reliably get the date at
which it an article was posted, or even at which it arrived on
the news server, I'm not aware of it.

> Would you be downloading new posts once a week and naming each
> new mbox for each newsgroup  with the date and time of the
> download?

That's the idea, except that the program would be run several
times a day. About as often as you'd check your mail.

> So you'd have a directory for each newsgroup, filling with
> mboxes of new posts.

Yes. That or all mboxes in the same directory. Doesn't matter
much.

> Kind of strange..

I'm trying to do three things : read news, post, and archive.

What I used to do was fetching with slrnpull (with infinite
retention) and reading and posting with slrn (working from the
slrnpull spool). There were two problems with that approach :

a) Slrnpull stores each article in a separate file. That does not
   scale well.

b) For Slrn, there are only two possible states for an article :
   read and unread. This is an order of magnitude less convenient
   for me than the mail client three-state view (read, old and
   new).

Replacing the news spool by monthly or quarterly mbox mailboxes
solves a) and lets me replace Slrn by Mutt which solves b).
Unfortunately, that also prevents me from posting as I don't
think Mutt can post via NNTP if it didn't also read via NNTP.
But nothing prevents me from starting Slrn/NNTP to post.

> Mutt has an nntp patch. Does _it_ store posts in mboxes?

If you *save* or *copy* the article, probably. But I'd be
surprised if it preemptively retrieved all articles in the
current newsgroup. Does it do that with IMAP folders ?

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
(Counterfeit: jalegyleg@fleawort.com rymaw@hooligan.com)
"I drink, I smoke, I gamble, I chase girls--but postal chess is
one vice I don't have." -- Mikhail Tal
Re: Append all new articles to mbox unattended
#216505
Author: Tom Newton
Date: Tue, 05 Feb 2008 23:01
86 lines
4559 bytes
On 2008-02-05, Andre Majorel <cheney@halliburton.com> wrote:
> On 2008-02-05, Tom Newton <tom@server.invalid> wrote:
>> On 2008-02-05, Andre Majorel <cheney@halliburton.com> wrote:
>>> Is there a libre software program for Unix to retrieve by NNTP
>>> all new articles in the specified newsgroups and append them to
>>> mbox files, one per newsgroup ?
>>>
>>> I think some form of locking is needed so I can keep the mboxes
>>> open in Mutt and no-one overwrites anyone else's changes.
>>> Procmail is known to play nice with Mutt so invoking procmail
>>> once for each article would be acceptable.
>>>
>>> Bonus points if it can include the current YYYY-MM in the names
>>> of the mbox files.
>>
>> Use leafnode and run a script that will convert the directories
>> full of files with one post each into an mbox with the name
>> you want.
>>
>> I can write that without any problem.
>
> Current solution involves that, with s/leafnode/slrnpull/.
> Modifying slrnpull to do what I want is probably somewhat easier
> than messing with its spool (that can fail in more ways). What
> I'm worried about is locking.
>
>> But what date would the mbox have?
>
> Date of retrieval. If there's a way to reliably get the date at
> which it an article was posted, or even at which it arrived on
> the news server, I'm not aware of it.
>
>> Would you be downloading new posts once a week and naming each
>> new mbox for each newsgroup  with the date and time of the
>> download?
>
> That's the idea, except that the program would be run several
> times a day. About as often as you'd check your mail.
>
>> So you'd have a directory for each newsgroup, filling with
>> mboxes of new posts.
>
> Yes. That or all mboxes in the same directory. Doesn't matter
> much.
>
>> Kind of strange..
>
> I'm trying to do three things : read news, post, and archive.
>
> What I used to do was fetching with slrnpull (with infinite
> retention) and reading and posting with slrn (working from the
> slrnpull spool). There were two problems with that approach :
>
> a) Slrnpull stores each article in a separate file. That does not
>    scale well.
>
> b) For Slrn, there are only two possible states for an article :
>    read and unread. This is an order of magnitude less convenient
>    for me than the mail client three-state view (read, old and
>    new).
>
> Replacing the news spool by monthly or quarterly mbox mailboxes
> solves a) and lets me replace Slrn by Mutt which solves b).
> Unfortunately, that also prevents me from posting as I don't
> think Mutt can post via NNTP if it didn't also read via NNTP.
> But nothing prevents me from starting Slrn/NNTP to post.
>
>> Mutt has an nntp patch. Does _it_ store posts in mboxes?
>
> If you *save* or *copy* the article, probably. But I'd be
> surprised if it preemptively retrieved all articles in the
> current newsgroup. Does it do that with IMAP folders ?
>

Sounds like Frank's Tin idea is a good solution. If it was
me, I'd just get devote a new disk to slrnpull's newsspool
and call it a day.

If you are really into conserving space, then the mboxes should
all be compressed...

Tom

-- 
calhobbit (at)
gmail [DOT] com
Re: Append all new articles to mbox unattended
#216653
Author: Andre Majorel
Date: Fri, 08 Feb 2008 22:14
38 lines
2834 bytes
On 2008-02-05, Frank Slootweg <this@ddress.is.invalid> wrote:
> Andre Majorel <cheney@halliburton.com> wrote:
>> Is there a libre software program for Unix to retrieve by NNTP
>> all new articles in the specified newsgroups and append them to
>> mbox files, one per newsgroup ?
>
>   tin can do that. See the "AUTOMATIC MAILING AND SAVING NEW NEWS"
> section of the tin(1) manual page (for example at
><http://www.tin.org/bin/man.cgi?section=1&topic=tin>. And no, you don't
> *have* to mail them - just saving them is fine as the format is mbox -
> but you *can* mail them if you want.

Very interesting but... Unfortunately, mailing (-M) them is
useless because it does not send articles but messages that
contain the article in the body. Important headers like From: or
References: are hidden from the MUA.

Saving (-S) does not help either because Tin saves each article
to a separate file, just like Slrnpull does.

Back to square one. But thanks.

>> I think some form of locking is needed so I can keep the mboxes
>> open in Mutt and no-one overwrites anyone else's changes.
>> Procmail is known to play nice with Mutt so invoking procmail
>> once for each article would be acceptable.
>
>   Why do you want to keep them open?

Open or closing a large mbox file with Mutt is far from
instantaneous. Having one long-lived instance of Mutt for every
frequently-used folder saves time.

-- 
André Majorel <URL:http://www.teaser.fr/~amajorel/>
(Counterfeit: luj@snail.com lonep@gasohol.com)
"I drink, I smoke, I gamble, I chase girls--but postal chess is
one vice I don't have." -- Mikhail Tal
Re: Append all new articles to mbox unattended
#216677
Author: Frank Slootweg
Date: Sat, 09 Feb 2008 16:02
30 lines
2383 bytes
Andre Majorel <cheney@halliburton.com> wrote:
[...]
> Saving (-S) does not help either because Tin saves each article
> to a separate file, just like Slrnpull does.
> 
> Back to square one. But thanks.

  Strange! Most Unices have cat(1), don't they? :-)

  But seriously: This is *so* trivial. If you wanted the *opposite*,
i.e. splitting up an mbox 'archive' into individual file-per-message
files, then that would be slightly more complex, but concatenating a
bunch of files is such a SMOSP

> >> I think some form of locking is needed so I can keep the mboxes
> >> open in Mutt and no-one overwrites anyone else's changes.
> >> Procmail is known to play nice with Mutt so invoking procmail
> >> once for each article would be acceptable.
> >
> >   Why do you want to keep them open?
> 
> Open or closing a large mbox file with Mutt is far from
> instantaneous. Having one long-lived instance of Mutt for every
> frequently-used folder saves time.

  Then procmail(1) - instead of cat(1) - is your solution, isn't it?

  I.e. you get the article files by *some* means - slrnpull, tin,
leafnode, <whatever> - and then feed them via procmail(1) to mutt's mail
folders, letting procmail do the required locking.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads