🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #200261

Re: [SLRN] Custom filename for My_Posts

#200261
From: Troy Piggins
Date: Tue, 05 Jun 2007 07:35
34 lines
2514 bytes
* Michael DeBusk is quoted & my replies are inline below :
> 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.

Try something like this untested macro.  Not sure about escaping
the "/" in the set_string_variable line.  If it doesn't work, try
"\/" first, or even "\\/".

define monthly_myposts () {
  variable tm = localtime (_time ());
  set_string_variable ("save_posts", sprintf ("news/My_Posts_%04d%02d", tm.tm_year - 100, tm.tm_mon + 1));
}

define post_hook () {
  () = monthly_myposts ();
}

-- 
Troy Piggins | http://piggo.com/~troy                             
slrn macros and howto:                      ___  |   __   __    ,-O   (o-    O 
http://piggo.com/~troy/slrn                |___  | |/   |/  |  O   )  //\     O
RLU#415538                                  ___| | |    |   |   `-O   V_/_  OOO
Technical Details
Message-ID: <20070605172733@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!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
References: <ZV79i.18236$j63.7154@newsread2.news.pas.earthlink.net>

Show Full Headers
Complete Article Headers
Message-ID: <20070605172733@usenet.piggo.com>
Subject: Re: [SLRN] Custom filename for My_Posts
Date: Tue, 05 Jun 2007 17:35:41 +1000
From: Troy Piggins <usenet-0706@piggo.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!newsfeed.iinet.net.au!newsfeed.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsstorage1.iinet.net.au!per-qv1-newsreader-01.iinet.net.au!not-for-mail
Newsgroups: news.software.readers
Reply-To: usenet-0706@piggo.com
X-NNTP-Proxy: Leafnode-2
 (http://www-dt.e-technik.uni-dortmund.de/~ma/leafnode/beta/)
User-Agent: slrn/0.9.8.1pl1/rt (Linux)
Lines: 34
NNTP-Posting-Host: 203.206.61.31
X-Trace: 1181028944 per-qv1-newsreader-01.iinet.net.au 22434 203.206.61.31