🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #180280

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

#180280
From: Adam Funk
Date: Tue, 07 Feb 2006 16:54
36 lines
2188 bytes
On 2006-02-07, Troy Piggins <usenet-0602@piggo.com> wrote:

>> define post_hook ()
>> {
>>  variable tm = localtime (_time ());
>>  set_string_variable ("save_posts",
>>   sprintf ("/home/troy/.slrn/%d%02d%02d.sent.news",
>               ^^^^^^^^^^
> Changed this to full path rather than ~/.slrn shorthand (for some reason
> slrn didn't like it the other way)
>
>>    tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday));
>>  set_string_variable ("save_replies",
>>   sprintf ("/home/troy/.slrn/%d%02d%02d.sent.mail",
>               ^^^^^^^^^^
>
>>    tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday));
>> }

I don't know s-lang: what would I need to add HHMMSS time to that
string as well?  (I understand sprintf.)

> I put it in my /home/troy/.slrn/macros.sl file.  I already have some
> post_hooks defined, so inserted the above inside the already existing
> hook.  If you don't already have macros/hooks defined, or don't know
> what I'm talking about, then you could just add the above to a file
> /home/xxxx/.slrn/macros.sl , and add this line to the beginning of your
> $HOME/.slrnrc :
>
> interpret /home/xxxx/.slrn/macros.sl
>
> Hope that makes sense.  If not, let me know.

Yes, I'll try it.

Thanks!
Technical Details
Message-ID: <9vvmb3-hvp.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!newscon06.news.prodigy.com!prodigy.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <73pbb3-uk6.ln1@news.ducksburg.com> <20060206112441@usenet.piggo.com> <20060207121558@usenet.piggo.com>

Show Full Headers
Complete Article Headers
Message-ID: <9vvmb3-hvp.ln1@news.ducksburg.com>
Subject: Re: [slrn] interpolating a date in save_posts and save_replies
Date: Tue, 7 Feb 2006 16:54:33 +0000
From: Adam Funk <a24061@yahoo.com>
References: <73pbb3-uk6.ln1@news.ducksburg.com> <20060206112441@usenet.piggo.com> <20060207121558@usenet.piggo.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!newscon06.news.prodigy.com!prodigy.net!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Lines: 36
X-Trace: individual.net FC0KVSduzX8WD4ChIxZoAQu5Qtv1WPH0uGZeAjHWSD7ZFvBmuM
X-Orig-Path: news.ducksburg.com!news
User-Agent: slrn/0.9.8.1pl1 (Debian)