Article View: news.software.readers
Article #180057Re: [slrn] interpolating a date in save_posts and save_replies
From: Peter J Ross
Date: Fri, 03 Feb 2006 12:34
Date: Fri, 03 Feb 2006 12:34
48 lines
2811 bytes
2811 bytes
On Fri, 03 Feb 2006 10:53:04 GMT, Adam Funk <a24061@yahoo.com> wrote
in news.software.readers:
> I've got the following in ~/.slrnrc now:
>
> set save_posts ".slrn/news.sent"
> set save_replies ".slrn/mail.sent"
>
> 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:
set save_posts ".slrn/xxxxxxxx.sent.news"
user@domain:~$ TODAY=`date +%Y%m%d` && sed -i "s/.\{8\}\.sent\.news/$TODAY.sent.news/" ~/.slrnrc && slrn
Today, this would change any string of eight characters before
".sent.news" to 20060203, and then open slrn. You would add a second
sed commands for save_replies.
WARNING: I haven't tested this thoroughly.
If you want to make the change automatically while slrn is running, I
don't know a way of doing that.
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:
<slrndu6jfn.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!border1.nntp.dca.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!207.14.113.17!news.alt.net!nntp.petitmorte.net!newsReferences:
<73pbb3-uk6.ln1@news.ducksburg.com>Show Full Headers
Complete Article Headers
Message-ID: <slrndu6jfn.845.pjr@nntp.petitmorte.net> Subject: Re: [slrn] interpolating a date in save_posts and save_replies Date: Fri, 3 Feb 2006 12:34:01 +0000 From: Peter J Ross <pjr@kookbusters.org> References: <73pbb3-uk6.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!border1.nntp.dca.giganews.com!nntp.giganews.com!wn11feed!worldnet.att.net!207.14.113.17!news.alt.net!nntp.petitmorte.net!news Newsgroups: news.software.readers Organization: Cabal Obsidian Order [TINCOO] Lines: 48 X-Operating-System: Debian GNU/Linux (Sid/Unstable) X-Kernel: Linux 2.6.15-1-686 User-Agent: slrn/0.9.8.1pl1 (Debian)