Article View: news.software.readers
Article #202105[slrn] PJR -> viewing raw articles
From: Troy Piggins
Date: Wed, 18 Jul 2007 23:49
Date: Wed, 18 Jul 2007 23:49
59 lines
2970 bytes
2970 bytes
Peter,
Had a quick look at your macro:
#v+
define show_raw ()
{
variable state = get_header_flags ();
set_input_string ("/tmp/slrn_raw");
call ("save");
system ("less /tmp/slrn_raw && rm /tmp/slrn_raw");
set_header_flags (state);
set_input_string ("");
}
definekey ("show_raw", "<F2>", "article");
#v-
I can't see a "quicker" way of viewing raw articles. By "quicker" I mean
less lines.
My immediate thoughts were use the raw_article_as_string slrn
function like in my display_filter macro.
#v+
define show_raw2 ()
{
variable raw_file = "/tmp/slrn_raw."+ string (getpid() );
variable raw_art = raw_article_as_string ();
variable fp = fopen (raw_file, "w");
fputs (raw_art, fp);
fclose (fp);
system ("less "+raw_file" && rm "+raw_file);
}
definekey ("show_raw2", "<F2>", "article");
#v-
But I'm not happy with that at the moment - my display filter
processing it first (t-prot is affecting it), so it can't be the
true raw file it's seeing. The display filter uses
replace_article which affects what you can get from
raw_article_as_string. I think I need to re-fetch the article
first or disable diplay_filter, then I'd probably use the
replace_article function from within the show_raw macro so you
can view the raw article within slrn's article window rather than
"less". Hope that makes sense.
I think if your macro works, and it does, then just keep using
it. I would. It's not too different from the second way.
I can't help but wonder why you need this macro, though. I find
displaying full headers and turning off display filters does the
same thing.
--
Troy Piggins | http://piggo.com/~troy
___ | __ __ ,-O (o- O
slrn macros and howto: |___ | |/ |/ | O ) //\ O
http://piggo.com/~troy/slrn ___| | | | | `-O V_/_ OOO
Technical Details
Message-ID:
<20070719092520@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-mailShow Full Headers
Complete Article Headers
Message-ID: <20070719092520@usenet.piggo.com> Subject: [slrn] PJR -> viewing raw articles Date: Thu, 19 Jul 2007 09:49:57 +1000 From: Troy Piggins <usenet-0707@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 Newsgroups: news.software.readers Reply-To: usenet-0707@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: 59 NNTP-Posting-Host: 203.206.52.10 X-Trace: 1184802607 per-qv1-newsreader-01.iinet.net.au 12836 203.206.52.10