🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #57012

Re: Slrn

#57012
From: Thomas Schultz
Date: Fri, 21 Jan 2000 00:00
62 lines
3215 bytes
On 20 January 2000 at 13:22 GMT, McRiley <mcriley@telia.com> wrote:
> Thomas Schultz wrote:
>> I think you are referring to my ignore_subthread() macro which allows
>> you to put the currect subthread into the scorefile by pressing a
>> single key.
> I would really like that macro. Could you post it?

This is the macro as I currently use it (a recent version of s-lang is
needed for localtime()). Suggestions on how it could be improved are
of course welcome (in particular, I am looking for a way to find out
the name of the user's scorefile; right now, you have to change the
macro to suit the location of your scorefile).

#v+
define ignore_subthread ()
{
   if (is_group_mode ())
     error (_function_name () + " doesn't work in group mode!");
   
   variable fp, expiry_date, datestring;
   
   expiry_date = localtime(_time() + 21 * 24 * 3600); % 21 days from now
   datestring = string(expiry_date.tm_mon+1)+"/"+
                string(expiry_date.tm_mday)+"/"+
                string(expiry_date.tm_year+1900);

   set_input_string ("-1000\n" + datestring);
   set_input_chars ("rtn");
   
   fp = fopen("/home/tststs/News/Score", "a");
   () = fputs("\n%BOS", fp);
   () = fclose(fp);
   
   call ("create_score");
   
   fp = fopen("/home/tststs/News/Score", "a");
   () = fputs("\n%EOS", fp);
   () = fclose(fp);   
   
   message_now("");
}
#v-

If you regularly use this macro (maybe also to watch subthreads; you
can of course change the "-1000" points to a value greater than zero),
your scorefile will become larger and larger and you might want to use
Felix Schueller's "cleanscore" script (written in perl) to
automagically remove expired entries. It can be found at

http://www.netcologne.de/~nc-schuelfe/slrn/cleanscore/

If you do not intend to use it, you can leave out the parts which
insert the "%BOS" and "%EOS" marks. They are used by cleanscore to
find the exact beginning and end of a scorefile entry. cleanscore will
also work without them, but then it will not always delete all
comments which belong to the expired score, because recognizing which
comment belongs to which score is a task that requires more AI than
you can put into a simple perl script.
-- 
Thomas Schultz <tststs@gmx.de>

Technical Details
Message-ID: <slrn88h54s.od.tststs@starflower.tststs.ddns.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
References: <slrn889o19.ijo.mcriley@mcriley.home> <slrn889qov.sbm.jewa@message-id.wahnes-world.de> <MPG.12ef8f3569b2e82e9897f6@news.bsu.edu> <slrn88bn9a.ovs.jewa@message-id.wahnes-world.de> <slrn88cejh.2l2.tststs@starflower.tststs.ddns.org> <slrn88e65m.31k.mcriley@mcriley.home>

Show Full Headers
Complete Article Headers
Message-ID: <slrn88h54s.od.tststs@starflower.tststs.ddns.org>
Subject: Re: Slrn
Date: Fri, 21 Jan 2000 00:00:00 +0000
From: tststs@gmx.de (Thomas Schultz)
References: <slrn889o19.ijo.mcriley@mcriley.home> <slrn889qov.sbm.jewa@message-id.wahnes-world.de> <MPG.12ef8f3569b2e82e9897f6@news.bsu.edu> <slrn88bn9a.ovs.jewa@message-id.wahnes-world.de> <slrn88cejh.2l2.tststs@starflower.tststs.ddns.org> <slrn88e65m.31k.mcriley@mcriley.home>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.mbox.zip!not-for-mail
X-Deja-AN: 575797721
X-Server-Date: 21 Jan 2000 17:23:15 GMT
X-Complaints-To: abuse@cityweb.de
Organization: Cityweb News Service
User-Agent: slrn/0.9.6.2+ (Linux)
NNTP-Posting-Date: 21 Jan 2000 17:24:45 GMT
Newsgroups: news.software.readers