🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
3 messages
3 total messages Started by asf... Lloyd Zusman Mon, 07 Jul 1997 00:00
Another feature request for slrn.
#34921
Author: asf... Lloyd Zusman
Date: Mon, 07 Jul 1997 00:00
40 lines
2197 bytes

I'm currently using slrn 0.9.4.2 and I'm very happy with it.  I
especially like the newly added post_filter_hook.  I would like,
however, to have the option of causing all posts to go through
this hook.  In other words, I'd like to request that there be
a variable in .slrnrc which, if set, would bypass the requirement
that we type "f" at the prompt, and which would cause all posted
articles and followups to go through post_filter_hook as the final
step before being posted.

I know that I can use set_input_chars from within post_hook and
followup_hook to pre-set the "f" key as a response to the prompt which
will later come up. However, it turns out that this is not a trivial
task when doing followups.  Depending on the Mail-Copies-To and
X-Mail-Copies-To headers, I may or may not get prompted about sending
a CC.  Furthermore, if these headers contain an email addrss of a
suspicious format, I might get a further prompt which asks me if I
want to go ahead or not.

Therefore, within followup_hook, I must duplicate quite a bit of the
logic from the followup() routine in art.c if I want to properly
determine which and how many characters I need to pass to
set_input_chars to cause the "f" prompt to be bypassed later.

This is why I'm requesting a flag that can be set in .slrnrc to
optionally force all posts through the post_filter_hook without
a prompt.

I'm willing to write the code for this feature and to generate the
appropriate patch(es?) for slrn, but before I do, I'd like some
feedback about this topic from John and the rest of you.

Thanks in advance.


-- 
 Lloyd Zusman
 l...@asfast.com
Re: Another feature request for slrn.
#34941
Author: asf... Lloyd Zusman
Date: Tue, 08 Jul 1997 00:00
61 lines
3305 bytes

On 8 Jul 1997 17:22:10 GMT, Jan Hlavacek <lah...@math.ohio-state.edu> wrote:
> In article <slrn5s2a4...@ljz.asfast.net>, Lloyd Zusman wrote:
> >I'm currently using slrn 0.9.4.2 and I'm very happy with it.  I
> >especially like the newly added post_filter_hook.  I would like,
> >however, to have the option of causing all posts to go through
> >this hook.  In other words, I'd like to request that there be
> >a variable in .slrnrc which, if set, would bypass the requirement
> >that we type "f" at the prompt, and which would cause all posted
> >articles and followups to go through post_filter_hook as the final
> >step before being posted.
> >
>
> You can use a shell script as your editor, and do it from the shell
> script.

That's what I used to do, but I had problems with that approach.  It
turns out that the new post_filter_hook functionality in 0.9.4.2 takes
care of the problems I had with the shell-script-as-editor approach I
previously used ... except for the necessity to type "f" to invoke the
filter, which I am addressing here.

In an earlier post, I outlined the problem that I had with my earlier
shell-script-as-editor approach, but I'll repeat it here.

What I want my filter to do is to run the post through some tests, and
based on the results of these tests, automatically cause one of the
following actions to take place:

(1) Post the article as is.
(2) Send the article back into the text editor.
(3) Discard the article without posting it.

Number 2 is trivial to implement using the shell-script-as-editor
method, but numbers 1 and 3 cannot be done from within the shell
script without extra user interaction, since the only way to cause an
automatic "Y" or "N" to be sent as responses to the slrn "Post this
article?" prompt is to use the 'set_input_chars' function, which can
only be invoked from within slrn (i.e., not from within my shell
script).

As I mentioned in my previous post, I am successfully using
'set_input_chars' from within the new 'post_hook', 'forward_hook', and
'post_filter_hook' functions to fully automate this process, but in
order to anticipate all the possible prompts I would have to answer, I
have to replicate a significant amount of functionality that already
exists in the slrn source code.

If, through the setting of a variable in .slrnrc, we could optionally
cause the 'post_filter_hook' to always run without the need to type
"f" at a prompt, then I could eliminate the bulk of this redundant
code.

This is the reason that I have requested this feature.


-- 
 Lloyd Zusman
 l...@asfast.com
Re: Another feature request for slrn.
#34955
Author: lah... Jan Hlavacek
Date: Tue, 08 Jul 1997 00:00
22 lines
1588 bytes

In article <slrn5s2a4...@ljz.asfast.net>, Lloyd Zusman wrote:
>I'm currently using slrn 0.9.4.2 and I'm very happy with it.  I
>especially like the newly added post_filter_hook.  I would like,
>however, to have the option of causing all posts to go through
>this hook.  In other words, I'd like to request that there be
>a variable in .slrnrc which, if set, would bypass the requirement
>that we type "f" at the prompt, and which would cause all posted
>articles and followups to go through post_filter_hook as the final
>step before being posted.
>

You can use a shell script as your editor,  and do it from the shell script.  

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lah...@math.ohio-state.edu>  (BCC's will bounce)
home page: http://www.math.ohio-state.edu/~lahvak/
slrn page: http://www.math.ohio-state.edu/~lahvak/software/slrn.html
slrn documentation: http://www.math.ohio-state.edu/~lahvak/software/slrn/
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads