🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #200357

Re: [SLRN] Custom filename for My_Posts

#200357
From: Adam Funk
Date: Thu, 07 Jun 2007 20:06
39 lines
2325 bytes
On 2007-06-05, Michael DeBusk wrote:

> In my .slrnrc is the following entry, which defines the location and
> filename for copies of my own posts:
>
>   % Filename where articles you have posted are archived.
>   set save_posts "news/My_Posts"
>
> At the end of each month, I rename My_Posts to My_Posts_yyyymm, with
> "yyyy" being the four-digit year and "mm" being the two-digit month.
> Then I touch a new My_Posts and start the whole thing over.
>
> I'm wondering if there's a way to configure slrn to do this without my
> having to think about it. The first thing that comes to mind is running
> the text editor in a shell script that does the job, but perhaps there
> might be a macro that might do a better job.

In file of macros that my .slrnrc interprets, I have the following:

define post_hook ()
{
    variable tm = localtime (_time ());

    set_string_variable ("save_posts",
       sprintf ("/home/adam/News/sent/%d%02d%02d-%02d%02d%02d.news",
          tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday,
          tm.tm_hour, tm.tm_min, tm.tm_sec));
}

(and the same again in "define followup_hook" and "define
post_file_hook"), because I prefer one file for each post.

You could try like this:

    set_string_variable ("save_posts",
       sprintf ("/home/michael/news/My_Posts_%d%02d",
          tm.tm_year + 1900, tm.tm_mon + 1));

and I think you'd get something similar to what you want.
Technical Details
Message-ID: <u25mj4-ogb.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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
References: <ZV79i.18236$j63.7154@newsread2.news.pas.earthlink.net>

Show Full Headers
Complete Article Headers
Message-ID: <u25mj4-ogb.ln1@news.ducksburg.com>
Subject: Re: [SLRN] Custom filename for My_Posts
Date: Thu, 7 Jun 2007 21:06:22 +0100
From: Adam Funk <a24061@ducksburg.com>
References: <ZV79i.18236$j63.7154@newsread2.news.pas.earthlink.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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Newsgroups: news.software.readers
Lines: 39
X-Trace: individual.net bmlyuLWWyyPXAVxnCB7XPwQXteCs7jiCsRtuzwWKxhjfVD2Ie3
X-Orig-Path: news.ducksburg.com!news
User-Agent: slrn/0.9.8.1pl1 (Debian)