🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #180064

Re: [slrn] interpolating a date in save_posts and save_replies

#180064
From: Peter J Ross
Date: Fri, 03 Feb 2006 18:36
65 lines
3788 bytes
On Fri, 03 Feb 2006 17:15:05 GMT, Adam Funk <a24061@yahoo.com> wrote
in news.software.readers:

> On 2006-02-03, Peter J Ross <pjr@kookbusters.org> wrote:
>
>>> I'd like to know if it's possible to put into those values a variable
>>> for the date, ideally in YYYYMMDD format, so that instead of having
>>> one file of all my posts, I get a separate file for each day,
>>> for exampled ~/.slrn/20060203.sent.news for today.
>>
>> I suggest using sed to rewrite .slrnrc before opening slrn. Using your
>> example:
>
> That's not quite what I had in mind, but it's an interesting approach.
> It also gives me the idea that I could run from cron a little rotation
> script that periodically moves sent.news to a file with a datestamped
> name.

Try "apt-get install archivemail". Running it from cron works well for
me when I want to archive old email messages from mailing lists, and
slrn uses standard mbox format for saved posts.

>> If you want to make the change automatically while slrn is running, I
>> don't know a way of doing that.
>
> I was hoping that slrn might have some feature I hadn't discovered yet
> that would let me write something like this:
>   set save_posts   ".slrn/sent-`date +%Y%m%d`.news"
> but I thought it would be a long shot.

No, AFAIK slrn reads .slrnrc only when slrn starts.

You could adapt Emanuele Bassi's script for writing the output of
commands such as "uname" and "uptime" into custom headers.

http://www.emmanuelebassi.net/slrn/headers.sl

I can't see any reason why the same method shouldn't work for any
.slrnrc variable, and the script is so well commented that I'm tempted
to play with it myself despite not knowing anything about s-lang.

But that wouldn't make the update automatic either.

You could manually update by using slrn's inbuilt s-lang command
prompt to run the relevant commands.

http://slrn.sourceforge.net/manual/slrn-manual-2.html#ss2.1

And then you wouldn't have to close and reopen slrn.

PJR :-)
-- 
Have you been touched    ___    ___          Hammer of Thor, Jan 2006
by His noodly           / _ \  / _ \
appendage?             ( (_) )( (_) )        Pierre Salinger Memorial
                        \_ _/  \_ _/         Hook, Line & Sinker, Dec
STOP GLOBAL   __       _.-\\----//--._                2003 & May 2005
WARMING   _  / _\___.-'/ _| / _\  /\/\`-._.-.__   _
NOW,     (_\_)| \___   ||_  ((_  //\/\\  _.-._ \-' )     AHM Wittiest
JIM LAD!   \__)   __)  | _| _) ) ||  || (_    \_.-'      Troll of the
                 /_-.  ||   \_/  ||  .-'-.\                Year, 2003
http://      _._//  / .--._______.-'\ \   \\__._          2004 & 2005
www.        /_._/   \ \              ))    \__._) 
venganza   (/     _.-')             ( `-._          wsd 42 ~ mhm 34x8
.org/            (_.-'         :F_P: `--._)      smeeter 30 ~ mwpl 12
Technical Details
Message-ID: <slrndu78nt.845.pjr@nntp.petitmorte.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!pd7cy2so!shaw.ca!news.alt.net!nntp.petitmorte.net!news
References: <73pbb3-uk6.ln1@news.ducksburg.com> <slrndu6jfn.845.pjr@nntp.petitmorte.net> <cifcb3-ile.ln1@news.ducksburg.com>

Show Full Headers
Complete Article Headers
Message-ID: <slrndu78nt.845.pjr@nntp.petitmorte.net>
Subject: Re: [slrn] interpolating a date in save_posts and save_replies
Date: Fri, 3 Feb 2006 18:36:46 +0000
From: Peter J Ross <pjr@kookbusters.org>
References: <73pbb3-uk6.ln1@news.ducksburg.com> <slrndu6jfn.845.pjr@nntp.petitmorte.net> <cifcb3-ile.ln1@news.ducksburg.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.20140922.mbox.gz!number1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!pd7cy2so!shaw.ca!news.alt.net!nntp.petitmorte.net!news
Newsgroups: news.software.readers
Organization: Cabal Obsidian Order [TINCOO]
Lines: 65
X-Operating-System: Debian GNU/Linux (Sid/Unstable)
X-Kernel: Linux 2.6.15-1-686
User-Agent: slrn/0.9.8.1pl1 (Debian)