🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: news.software.readers
Article #58212

Re: slrn & header printing

#58212
From: Benatoll
Date: Sat, 19 Feb 2000 00:00
59 lines
2303 bytes
Thank you for all you answers.

I finally wrote a little script in perl and now, I really have what I
desired when I print :
4 lines at the beginning :

From: ...
Newsgroup: ...
Subject: ...
NNTP-Posting-Date:

and then the text.

Benatoll

PS : If it interests somebody, here's how it works (it's a bit ugly but
it works) :

one perl script (named filtre.pl):
___________________________________________
#!/usr/bin/perl
open (FILE, '/tmp/article');
open (RES, '>/tmp/result');
while ($line = <FILE>) {
 if ($line =~ /Path:/) {}
 elsif ($line =~ /Organization:/) {}
 elsif ($line =~ /NNTP-Posting-Date:/) {
  print RES $line;
 }
 elsif ($line =~ /Date:/) {}
 elsif ($line =~ /Message-ID:/) {}
 elsif ($line =~ /References:/) {}
 elsif ($line =~ /Lines:/) {}
 elsif ($line =~ /NNTP-Posting-Host:/) {}
 elsif ($line =~ /X-Priority:/) {}
 elsif ($line =~ /X-MSMail-Priority:/) {}
 elsif ($line =~ /X-Trace:/) {}
 elsif ($line =~ /X-Complaints-To:/) {}
 elsif ($line =~ /X-Newsreader:/) {}
 elsif ($line =~ /X-MimeOLE:/) {}
 elsif ($line =~ /Xref:/) {}
 else {
  print RES $line;
 }
}
close FILE;
close RES;
_______________________________________________
and the bash script name filter:
_________________________________
cat $1 > /tmp/article
./filtre.pl
lpr /tmp/result
_________________________________

and in the .slrnrc file, just put the line :
	set_printername filter

Technical Details
Message-ID: <38ADFD0A.7B60B3D4@free.fr>
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: <38A95366.2F027547@free.fr> <slrn8ajl35.db.tststs@starflower.tststs.ddns.org>

Show Full Headers
Complete Article Headers
Message-ID: <38ADFD0A.7B60B3D4@free.fr>
Subject: Re: slrn & header printing
Date: Sat, 19 Feb 2000 00:00:00 +0000
From: Benatoll <kgt@free.fr>
References: <38A95366.2F027547@free.fr> <slrn8ajl35.db.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
X-Deja-AN: 587276088
Content-Transfer-Encoding: 7bit
X-Accept-Language: fr, sv, en
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@proxad.net
X-Trace: nnrp3.proxad.net 950922774 213.228.42.37 (Sat, 19 Feb 2000 02:12:54 CET)
Organization: Guest of ProXad - France
MIME-Version: 1.0
NNTP-Posting-Date: Sat, 19 Feb 2000 02:12:54 CET
Newsgroups: news.software.readers