🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: news.software.readers
12 messages
12 total messages Started by Hans-Joachim Zierke Wed, 08 Apr 1998 00:00
How to change slrn.rc parameters on the commandline?
#40035
Author: Hans-Joachim Zierke
Date: Wed, 08 Apr 1998 00:00
23 lines
1164 bytes

Hi,

I want to start slrn with

set kill_score 5000

sometimes, not always. How do I do this without changing slrn.rc (or 
.slrnrc on the other computer...). Environment setting does not work for 
it.


hajo


-- 
 Giving up your social life and weekends to study horrible books is part of the
 Unix way of life, it's not work, it's meditation...

                                             Jeroen Vriesman <joenix@xs4all.nl>

Re: How to change slrn.rc parameters on the commandline?
#40027
Author: Heikki Kantola
Date: Wed, 08 Apr 1998 00:00
37 lines
1906 bytes
Hans-Joachim Zierke <hajo@quijote.Huellhorst.Zierke.com> informed
news.software.readers with the following:
>I want to start slrn with
>
>set kill_score 5000
>
>sometimes, not always. How do I do this without changing slrn.rc (or 
>.slrnrc on the other computer...). Environment setting does not work for 
>it.

If you don't need too much variation on the values of the variables
you can easily use the preprocessor commands in .slrnrc and slrn's 
-D-option, for example:

	#ifdef K5000 
	set kill_score 5000
	#elifdef K7500
	% ^^^^^^ I'm not 100% sure if that's correct...
	set kill_score 7500
	#else
	set kill_score 9999
	#endif
	
If you don't want limit the values to certain fixed list, I suggest
using slang-macro� where you read some enviroment variable and set
the variable accordingly.

� see <URL:http://www.math.ohio-state.edu/%7Elahvak/software/slrn/
macros.html> for some help.
-- 
Heikki "Hezu" Kantola, <Heikki.Kantola@IKI.FI>
L�hett�m�ll� mainoksia tai muuta asiatonta s�hk�postia yll� olevaan
osoitteeseen sitoudut maksamaan oikolukupalvelusta FIM500 alkavalta
tunnilta.

Re: How to change slrn.rc parameters on the commandline?
#40032
Author: Hans-Joachim Zierke
Date: Wed, 08 Apr 1998 00:00
47 lines
2059 bytes

Heikki Kantola schrieb:


> If you don't need too much variation on the values of the variables
> you can easily use the preprocessor commands in .slrnrc and slrn's 
> -D-option,

Is the Usage of this -D-option documented somewhere? All I could find was a
little entry in changes.txt:

Changes since 0.7.7
1.  slrn calling syntax changed: The -D parameter has changed to lowercase -d.
    Now, a new -Ddefine-something is available.
2.  If using slang0.99-20 or newer, it is possible to use slang preprocessing
    in your .slrnrc file.  Use the -D flag to define a token.


This explanation is obviously meant for programmers with knowledge of 
slang.



No, I do not need lots of versions. 

Reason for my change is, that I'm going to change my newsserver from changi
(OS/2) to INN (Linux). The changi newsserver has a function newsgroup 
called local.reference, which is not available with INN.

So I want a slrn mode, that will show replies to my postings only. For 
this, I have set
[*]
Score: 8000
References: zierke\.com


I need this when I'm in a hurry, so this mode should be either a .cmd-Icon 
under OS/2, or a shell command under Linux. Start, have a look, bye.



hajo



Re: How to change slrn.rc parameters on the commandline?
#40054
Author: Hans-Joachim Zierke
Date: Thu, 09 Apr 1998 00:00
27 lines
1533 bytes

Peppe schrieb:


> You can put the following in a slang macro file (eg .slrn.sl):
> 
>     define article_mode_hook ()
>     {
>         if (current_newsgroup () == "local.reference")


You got me wrong.

My current newsserver supports a newsgroup "local.reference". I do not have
to do anything in slrn, I just enter "local.reference" to see the replies 
only.

But in future, I will use INN. This server does not have a 
"local.reference" newsgroup, therefore, I need to convince slrn to show all
the replies in all the newsgroups, but nothing else, if I'm in a hurry.


hajo


Re: How to change slrn.rc parameters on the commandline?
#40056
Author: Peppe
Date: Thu, 09 Apr 1998 00:00
41 lines
2165 bytes
Thus wrote Hans-Joachim Zierke <hajo@quijote.Huellhorst.Zierke.com>
[--- snip ---]
> Reason for my change is, that I'm going to change my newsserver from changi
> (OS/2) to INN (Linux). The changi newsserver has a function newsgroup 
> called local.reference, which is not available with INN.

> So I want a slrn mode, that will show replies to my postings only. For 
> this, I have set
> [*]
> Score: 8000
> References: zierke\.com

> I need this when I'm in a hurry, so this mode should be either a .cmd-Icon 
> under OS/2, or a shell command under Linux. Start, have a look, bye.

You can put the following in a slang macro file (eg .slrn.sl):

    define article_mode_hook ()
    {
        if (current_newsgroup () == "local.reference")
            set_integer_variable ("kill_score", 5000);
        else
            set_integer_variable ("kill_score", -9999);
    }    

To source and interpret the macro file, put the following line in you
slrnrc:

    interpret .slrn.sl

Hope this helps,

Peppe
-- 
Preben Guldberg         __/-\__       "God created Man in His own image,
c928400@student.dtu.dk   (o o)         and we have been returning the
---------------------oOOo (_) oOOo     compliment ever since."
http://www.student.dtu.dk/~c928400                            --Voltaire

Re: How to change slrn.rc parameters on the commandline?
#40057
Author: Jan Hlavacek
Date: Thu, 09 Apr 1998 00:00
52 lines
2463 bytes
On Wed, 08 Apr 1998 16:51:04 GMT, Hans-Joachim Zierke
<hajo@quijote.Huellhorst.Zierke.com> wrote:
> Heikki Kantola schrieb:
> > If you don't need too much variation on the values of the variables
> > you can easily use the preprocessor commands in .slrnrc and slrn's 
> > -D-option,
> 
> Is the Usage of this -D-option documented somewhere? 

I just put a very brief document out at
http://www.math.ohio-state.edu/%7Elahvak/slang/slprep.html
I hope I'll find sometime to improve it soon.

> Reason for my change is, that I'm going to change my newsserver from changi
> (OS/2) to INN (Linux). The changi newsserver has a function newsgroup 
> called local.reference, which is not available with INN.
> 
> So I want a slrn mode, that will show replies to my postings only. For 
> this, I have set
> [*]
> Score: 8000
> References: zierke\.com
> 
> 
> I need this when I'm in a hurry, so this mode should be either a .cmd-Icon 
> under OS/2, or a shell command under Linux. Start, have a look, bye.

I would do this:

Set up a new score file,  called ScoreRef,   in News subdirecory,  with
only the above score entry in it.

Then put this in your .slrnrc:

#ifdef REF
scorefile "News/ScoreRef"
set kill_score 0
#else
scorefile "News/Score"
#endif

If you call slrn with the -DREF option,  it will kill everything except
the replies you want to see.

-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.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/

Re: How to change slrn.rc parameters on the commandline?
#40178
Author: Jan Hlavacek
Date: Thu, 16 Apr 1998 00:00
59 lines
2504 bytes
On Thu, 16 Apr 1998 14:36:25 GMT, Hans-Joachim Zierke
<hajo@quijote.Huellhorst.Zierke.com> wrote:
> 
> Jan Hlavacek schrieb:
> 
> 
> > If you call slrn with the -DREF option,  it will kill everything except
> > the replies you want to see.
> 
> Additionally, I have set up a second newsserver in .slrnrc (just a 
> different name for the same server), and defined a different jnewsrc for 
> this, to have an unchanged jnewsrc for normal newsreading.

Of course,  I didn't think of that.  

> Is there any way, to tell slrn to open and close every subscribed newsgroup
> at startup, within this "#if"-Statement?

Try to put this to your .slrn.sl:

define perform_scoring ()
{
   !if (is_group_mode ()) call("quit");
   call ("bob");
   while (group_down_n (1))
   {
      if (-1 != select_group ()) call("quit");
   }
   call ("bob");
}

#ifdef REF
define group_mode_startup_hook ()
{
   perform_scoring ();
}
#endif

If you have a lot of groups with a lot of articles,  it may take a
while.

If you don't have .slrn.sl,  put the above to ~/.slrn.sl,  and put the
following line in your .slrnrc:

iterpret ".slrn.sl"

If you want to know more about slrn S-Lang macros,  read README.macros
in your slrn distribution,  and visit 
http://www.math.ohio-state.edu/%7Elahvak/slrn/

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.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/

Re: How to change slrn.rc parameters on the commandline?
#40179
Author: Hans-Joachim Zierke
Date: Thu, 16 Apr 1998 00:00
38 lines
1709 bytes

Jan Hlavacek schrieb:


> Try to put this to your .slrn.sl:
> 
> define perform_scoring ()
> {
>    !if (is_group_mode ()) call("quit");
>    call ("bob");
>    while (group_down_n (1))
>    {
>       if (-1 != select_group ()) call("quit");
>    }
>    call ("bob");
> }
> 
> #ifdef REF
> define group_mode_startup_hook ()
> {
>    perform_scoring ();
> }
> #endif


This stops to do its work, as soon as it has set the first group to 0 
messages. 

If there are any unkilled messages in the newsgroup, the function jumps to
the next newsgroup as intended, but if there aren't any, and it has set 
the newsgroup to 0, it stops working.


hajo


Re: How to change slrn.rc parameters on the commandline?
#40182
Author: Hans-Joachim Zierke
Date: Thu, 16 Apr 1998 00:00
27 lines
1471 bytes

Jan Hlavacek schrieb:


> If you call slrn with the -DREF option,  it will kill everything except
> the replies you want to see.



Thanks, it works great!

Additionally, I have set up a second newsserver in .slrnrc (just a 
different name for the same server), and defined a different jnewsrc for 
this, to have an unchanged jnewsrc for normal newsreading.



It's not perfect yet, though...
Is there any way, to tell slrn to open and close every subscribed newsgroup
at startup, within this "#if"-Statement?


hajo


Re: How to change slrn.rc parameters on the commandline?
#40204
Author: Jan Hlavacek
Date: Fri, 17 Apr 1998 00:00
37 lines
1984 bytes
On Thu, 16 Apr 1998 23:41:35 GMT, Hans-Joachim Zierke
<hajo@quijote.Huellhorst.Zierke.com> wrote:
> Jan Hlavacek schrieb:
> > Try to put this to your .slrn.sl:
> > 
> > define perform_scoring ()
> > {
> >    !if (is_group_mode ()) call("quit");
> >    call ("bob");
> >    while (group_down_n (1))
> >    {
          ERROR_BLOCK {_clear_error ();}
> >       if (-1 != select_group ()) call("quit");
> >    }
> >    call ("bob");
> > }
> > 
> > #ifdef REF
> > define group_mode_startup_hook ()
> > {
> >    perform_scoring ();
> > }
> > #endif
> 
> This stops to do its work, as soon as it has set the first group to 0 
> messages. 

Try insert the above ERROR_BLOCK,  it may fix it.

-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.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/

Re: How to change slrn.rc parameters on the commandline?
#40275
Author: Hans-Joachim Zierke
Date: Mon, 20 Apr 1998 00:00
22 lines
1461 bytes

Jan Hlavacek schrieb:


> Try insert the above ERROR_BLOCK,  it may fix it.

Looks as if you've made my day.   ;-)   This here is already posted to INN.

The function does not check the very first group in the list, but this one 
is called "control" anyway, so I don't care.



You were right that it needs some time, but it is faster than expected. 
Some OS/2 newsreaders need this much time just for a normal startup...


hajo


Re: How to change slrn.rc parameters on the commandline?
#40285
Author: Jan Hlavacek
Date: Mon, 20 Apr 1998 00:00
20 lines
1795 bytes
On 20 Apr 1998 04:47:46 GMT, Hans-Joachim Zierke
<hajo@quijote.Huellhorst.Zierke.com> wrote:
> The function does not check the very first group in the list, but this one 
> is called "control" anyway, so I don't care.

Dreck!  This is what I call programming by successive approximations
:-(.

Anyway,  change "while (bla) {blah}" into "do blah while (bla)",  and
the first group will be included,  too.

lahvak
-- 
Jan Hlav\'{a}\v{c}ek <lahvak@math.mps.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