Article View: news.software.readers
Article #70754Re: slrn - shell command in custom_headers
From: Thomas Schultz
Date: Thu, 18 Jan 2001 19:31
Date: Thu, 18 Jan 2001 19:31
31 lines
1984 bytes
1984 bytes
On 18 January 2001 at 16:50 GMT, Neuromancer wrote:
> I searched everywhere with no luck. What I need to do is have slrn
> drop the output of a shell command into a custom header. For
> example, uname -a.
You need to use a macro to do this. Here is an example:
#v+
define set_custom_headers()
{
variable uname, header, fd;
fd = popen("uname -a", "r");
() = fgets(&uname, fd);
() = pclose(fd);
header = "X-Operating-System: " + uname;
set_string_variable("custom_headers", header);
set_string_variable("followup_custom_headers", header);
set_string_variable("reply_custom_headers", header);
}
#v-
Depending on your needs, you can then call this macro once from
startup_hook or before every posting with post_hook et al.
--
Thomas Schultz <tststs@gmx.de> * Recent news from http://slrn.sourceforge.net/
-> [2000-12-21] slrn 0.9.6.3pl3 released
-> [2000-10-22] Matthias Friedrich joins the team
-> [2000-09-27] Initial release of the slrn reference manual
Technical Details
Message-ID:
<slrn96eh4u.1sc.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!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-koe1.dfn.de!do.de.uu.net!innmaster.de.uu.net!news.cityweb.de!tststs.ddns.org!not-for-mailReferences:
<slrn96e7m7.sk.neuromancer@HAL-9000.net>Show Full Headers
Complete Article Headers
Message-ID: <slrn96eh4u.1sc.tststs@starflower.tststs.ddns.org> Subject: Re: slrn - shell command in custom_headers Date: Thu, 18 Jan 2001 19:31:42 +0000 From: tststs@gmx.de (Thomas Schultz) References: <slrn96e7m7.sk.neuromancer@HAL-9000.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.mbox.zip!supernews.google.com!sn-xit-03!supernews.com!news-out.usenetserver.com!news.tele.dk!193.174.75.178!news-fra1.dfn.de!news-koe1.dfn.de!do.de.uu.net!innmaster.de.uu.net!news.cityweb.de!tststs.ddns.org!not-for-mail Newsgroups: news.software.readers Organization: Pinguin online. Lines: 30 NNTP-Posting-Host: 149.225.47.173 NNTP-Posting-Date: 18 Jan 2001 19:31:34 GMT X-Complaints-To: abuse@cityweb.de X-Server-Date: 18 Jan 2001 19:28:40 GMT User-Agent: slrn/0.9.6.3pl4 (Linux)