README.GroupLens
1The GroupLens support should work on most Unix systems. It may even
2work for OS/2 or VMS.
3
4For information about GroupLens, see
5
6 http://www.cs.umn.edu/Research/GroupLens/trial.html
7
8Edit src/slrnfeat.h to enable support for GroupLens,
9
10The next step is to create a file called .grplens in your home
11directory. This file must contain lines such as:
12
13PSEUDONYM your-pseudonym
14BBBHOST grouplens.cs.umn.edu
15BBBPORT 9000
16comp.os.linux.misc
17 .
18 .
19rec.food.recipes
20rec.arts.movies.current-films
21
22The last lines in the file consist of newsgroup names. See
23http://www.cs.umn.edu/Research/GroupLens/trial.html for information
24about which groups are supported.
25
26The PSEUDONYM line must contain a registered pseudonym. To register a
27pseudonym, see http://www.cs.umn.edu/Research/GroupLens/trial.html for
28a registering link.
29
30Once you have created your .grplens file with a registered pseudonym,
31you need to add the line
32
33 set use_grouplens 1
34
35to your .slrnrc file. After doing that, simply run slrn. When you
36enter a supported newsgroup, slrn will retrieve rating for the
37newsgroup from the GroupLens server and display the ratings in the
38header summary window. The display format is set via the DISPLAYTYPE
39line in your .grplens file. Again, see the GroupLens web page for
40supported DISPLAYTYPE or look at the documentation in the GroupLens
41library directory.
42
43To rate articles that you have read, simply press `0' followed by an
44integer `1' through `5' where `1' is a low rating and `5' is a high
45rating. After leaving the newsgroup, slrn will send your ratings back
46to the GroupLens server. Note: Only those newsgroups that the
47GroupLens server supports which are also listed in your .grplens file
48may be rated.
49
50The header display in a group for which GroupLens ratings have been
51requested, will include a ratings field. The ratings field will
52either consist of one or more `*' characters, or a `?'. The `?' means
53that there is no GroupLens information for the article for which the
54header refers. Articles for which GroupLens information is available
55will contain one or more `*' characters on the header lines to
56indicate a rating of 1 to 5.
57
README.macros
1-*- mode: text; mode: fold; -*-
2The purpose of this note is to provide some instructions on extending
3the newsreader in its macro language. It consists of two parts: an
4overview of macros and the reference manual for slrn intrinsic
5functions.
6
7{{{ Introduction
8
9The present implementation does not provide many hooks into the
10newsreader. More capabilities will be added in subsequent releases.
11
12When slrn is started, it reads the .slrnrc user initialization file.
13That file may contain one or more `interpret' commands causing the
14newsreader to load the specified S-Lang scripts, e.g.,
15
16 interpret ".slrn.sl"
17 interpret "src/slrn/macros/search.sl"
18
19Each script must obey the syntax of the S-Lang language. See the
20slang documentation from www.s-alng.org more more information about
21the syntax.
22
23Several pre-written macros are included in the slrn distribution in
24the macro subdirectory.
25
26
27---------------------------------------------------------------------------
28Defining Key Macros
29---------------------------------------------------------------------------
30
31 Although one is able to bind keys to specific functions via lines
32 of the form
33
34 setkey group "refresh_groups" "G"
35
36 in the .slrnrc file, it is not possible to defined more
37 complicated actions in this manner. However, macros can be
38 defined by using a S-Lang script. For example, the
39 `refresh_groups' internal function refreshes the newsgroups but it
40 does not cause the cursor to move to the top of the newsgroup
41 list. On the other hand, the internal function `bob' moves to the
42 top of the list but it does not refresh the groups. One can
43 define a S-Lang function to perform both actions:
44
45 define refresh_groups_bob ()
46 {
47 call ("refresh_groups");
48 call ("bob");
49 }
50
51 and bind it to a key:
52
53 definekey ("refresh_groups_bob", "g", "group");
54
55 Note: It is not yet possible to write this as:
56
57 define refresh_groups_bob ()
58 {
59 refresh_groups ();
60 bob ();
61 }
62
63 This restriction will be lifted in the future.
64
65 The `definekey' function takes 3 arguments:
66
67 function to execute
68 keybinding
69 keymap name ("article" or "group")
70
71 Here is another macro that may be used in article mode. It
72 performs a regular expression search for subjects.
73
74 variable Last_Search_Str = "";
75 define re_subject_search_forward ()
76 {
77 variable str;
78
79 ERROR_BLOCK
80 {
81 () = header_up (1);
82 }
83
84 !if (header_down (1)) return;
85
86 str = read_mini ("Subject re-search fwd", Last_Search_Str, "");
87
88 !if (strlen (str))
89 return;
90
91 Last_Search_Str = str;
92 !if (re_fsearch_subject (str))
93 error ("Not found.");
94 }
95
96 To bind it to, e.g., `s' in the article keymap, use:
97
98 definekey ("re_subject_search_forward", "s", "article");
99
100
101 Some slrn keyboard functions require a ``prefix argument''.
102 Many people find the use of prefix arguments somewhat strange.
103 For example, instead of typing `ESC 1 ESC p' to reconstruct a thread,
104 one can simply use the function:
105
106 define my_recreate_thread ()
107 {
108 set_prefix_argument (1);
109 call ("get_parent_header");
110 }
111
112 Here is a function that pipes the current article to a
113 command called `most' (a paging program similar to more/less):
114
115 define pipe_to_most ()
116 {
117 pipe_article ("most");
118 }
119 definekey ("pipe_to_most", "&", "article");
120
121 Here it has been bound to the `&' key. Most likely one will want
122 to pipe the article to a shell script for further processing.
123
124 Some of the built-in keyboard functions will prompt for a
125 string. For example, in article mode, pressing the `:' key will
126 prompt for an filename. The function `set_input_string' may be
127 used to provide a response to such a prompt, e.g.,
128
129 % The `:' command will prompt for a filename.
130 set_input_string ("/tmp/decoded");
131 call ("decode");
132
133 For functions that prompt for a single character, such as
134
135 Do you really want to quit? [Y]es No
136
137 a similar intrinsic function, set_input_chars, may be used to
138 provide the answer.
139
140
141---------------------------------------------------------------------------
142Hooks
143---------------------------------------------------------------------------
144
145Currently, the newsreader
146recognizes the following hooks:
147
148 startup_hook
149 This hook is called right after the newsreader is initialized
150 and immediately before checking for news. This hook allows
151 the user to set variables on a server by server basis.
152
153 Here is an example:
154
155 define startup_hook ()
156 {
157 !if (strcmp (server_name (), "uhog"))
158 {
159 set_integer_variable ("lines_per_update", 20);
160 set_integer_variable ("read_active", 0);
161 }
162 }
163
164 It simply sets the `lines_per_update' variable to 20 and turns
165 off reading of the active file if the servername is `uhog' (it
166 is a slow server).
167
168 group_mode_startup_hook
169 This hook is called after checking for news and immediately
170 before entering the main keyboard loop. When called, group mode
171 will be active
172
173 group_mode_hook
174 This hook will be called whenever group mode is entered. This
175 includes the times when one exists article mode back to group
176 mode.
177
178 pre_article_mode_hook
179 This hook is similar to `article_mode_hook' except that it is
180 called before any headers for the group have been retrieved.
181
182 article_mode_hook
183 This hook is called during article mode after headers have been
184 retrieved but before sorting them. One can use this hook to set
185 variables based on the group name. For example,
186
187 define article_mode_hook ()
188 {
189 variable sorting_method = 7;
190 variable author_display = 2;
191 variable signature_file = ".signature";
192
193 if (is_substr (current_newsgroup (), "binaries")
194 or is_substr (current_newsgroup (), "pictures"))
195 {
196 sorting_method = 3;
197 author_display = 0;
198 }
199
200 if (0 == strncmp (current_newsgroup (), "comp.", 5))
201 signature_file = ".nerd-signature";
202
203 set_integer_variable ("sorting_method", sorting_method);
204 set_integer_variable ("author_display", author_display);
205 set_string_variable ("signature", signature_file);
206 }
207
208 changes the `sorting_method' and `author_display' variables to
209 something more appropriate for newgroups which contain encoded
210 articles.
211
212 article_mode_startup_hook
213 Unlike article_mode_hook, which gets called prior to sorting the
214 headers, this hook gets called after sorting has taken place.
215
216 header_number_hook
217 If defined, this function will be called after selecting a header
218 via a header number.
219
220 read_article_hook
221 Function called after reading and processing an article. It may
222 use the replace_article function to change it.
223
224 reply_hook
225 Function called when replying to poster.
226
227 followup_hook
228 Function called when following up to an article.
229
230 post_hook
231 Function called when posting an article.
232
233 forward_hook
234 Function called when forwarding an article to someone.
235
236 resize_screen_hook
237 This hook will be called whenever the screen size changes.
238
239 post_filter_hook
240 This hook may be called just before slrn attempts to post a file.
241 The hook is only called if the user selects the filter option
242 from the prompt:
243
244 Post the message? Yes, No, Edit, poStpone, Filter
245
246 This hook takes a single parameter: the name of the file that
247 slrn is about to post. Thus it must be declared as:
248
249 define post_filter_hook (file);
250
251 See macros/ispell.sl for an example.
252
253}}}
254
255---------------------------------------------------------------------------
256Command Reference
257---------------------------------------------------------------------------
258The above examples used ``intrinsic'' functions such as `call',
259`set_integer_variable', etc. This section describes all slrn
260intrinsic functions that are available via the interpreter. The code
261S-Lang langauge includes many others such as `strcmp' and `is_substr'
262which are not described here.
263
264See slrnfuns.txt for detailed information about the slrn intrinsic
265functions.
266
README.os2
1This version of slrn can run under OS/2 as well as Unix or VMS.
2The compiled binaries, with everything you need to get it running, can
3be found on http://www.bgnett.no/~bjoff/slrn.html.
4
5To install the binaries, here are the steps needed;
6
71. Get a copy of the EMX runtime libraries, emxrt.zip (version 09c or
8 later required). emxrt.zip are available from most OS/2 archives,
9 for example:
10 ftp.leo.org: /pub/comp/os/os2/gnu/emx+gcc
11 hobbes.nmsu.edu: /os2/unix/emx09c
12
132. Append the following line to config.sys as a minimum, see notes
14 about variables below.
15 set NNTPSERVER=my.news.server
16 set HOME=d:\home\sweet\home
17
183. Copy the file slrn.rc into the home-directory and edit it to your
19 needs, it should be pretty well documented.
20
214. First time you start slrn, start it with the following parameters
22 "slrn.exe -create", this will create a jnews.rc. After that you can
23 start it without parameters.
24
255. If you want to use the "offline-mode", you have to start slrn.exe with
26 "slrn.exe --spool". Also please read documentation in the slrnpull dir.
27
28ABOUT VARIABLES:
29 slrn knows the following ENVIRONMENT variables;
30 TMP: Directory for temporary files, this should be set when you
31 installed OS/2 to something like x:\TMP.
32 USER or LOGNAME: This should be the same as the first part in your
33 email-address (until @)
34 REPLYTO: If you have another emailaddress than the account you're
35 posting from you can set this to the preffered email-address.
36 HOSTNAME: The name of your computer without domain-name.
37 NAME: Your real name
38 ORGANIZATION: Organization to put in the header.
39 EDITOR or VISUAL: Editor used if not defined in slrn.rc. (if none
40 of these are defined we use e.exe.
41
42 Most of these can be overridden in the slrn.rc file.
43
44BUGS - Some of the char-translation is probably wrong, I need feedback
45 about this one. Preferable with a Message-ID so I can test it
46 out myself.
47
48 Scoring: regexp's doesn't match the ibm850 chars, this requires
49 changing the S-Lang code, so it won't be done anytime soon. :-(
50
51TODO - Adding config-option to hide configuration files and newsrc like
52 dotfiles under *nix.
53
54 I don't think slrn.exe still can be used on a fat-only system,
55 there is still some filenames that don't conform to the 8+3
56 filnameing scheme.
57
58The OS/2 version of slrn will use the full extent of the OS/2 command
59window it's run in. You can do "mode co80,50", and it will use all 50
60lines. You can also specify a wider window and it will use the extra
61width. (If you use a wide window, please take care that your postings
62don't exceed 80 characters per line. The net will thank you.)
63
64To mail a reply or forward a message you need to set up a sendmail-
65command in slrn.rc. The default is 'sendmail -t -af'. To set up slrn
66to use an alternative mailer you can do something like
67
68 set sendmail_command "e:/network/slrn/mailfile.cmd"
69 or set sendmail_command "e:\\network\\slrn\\mailfile.cmd"
70
71 (note that you either must use one forward slash "/" or double
72 backslashes "\\")
73
74where mailfile.cmd contains something like:
75
76 @echo off
77 cd e:\network\mr2ice
78 start e:\network\mr2ice\mr2i.exe /Q%1
79
80I guess this should work with most mailers.
81
82THANKS
83 John E. Davis, davis@space.mit.edu author of slrn
84 Jay Maynard, jmaynard@nwpros.com much of the OS/2 port
85
86Bjoern Frantzen, bjoff@bgnett.no January 1997
87
README.vms
README.w95
1This is a port of slrn to Windows 95 console mode.
2This distribution contains:
3
4README.w95 This file
5slrn.exe slrn executable
6slrnpull.exe slrnpull executable
7sendsmtp.exe SMTP mailer program
8slrn.rc Sample slrn configuration file
9w95keys.txt Windows 95 cursor and function key codes
10
11To install the binaries, here are the steps needed;
12
131. Copy the slrn.exe and sendsmtp.exe files to a directory in your path.
14
152. Set the following environment variables:
16 set NNTPSERVER=my.news.server
17 set HOME=d:\home\sweet\home
18 (Note: Forward slashes are also ok)
19
203. Copy the file slrn.rc into the home-directory and edit it to your
21 needs, it should be pretty well documented.
22
234. To mail a reply or forward a message you need to set up a sendmail-
24 command in slrn.rc:
25
26 set sendmail_command "sendsmtp my.mail.server"
27
28 where the first argument to the sendsmtp program is your SMTP server.
29
305. The first time you start slrn, start it with the following parameters
31 "slrn.exe -create", this will create a jnews.rc. After that you can
32 start it without parameters.
33
34ABOUT VARIABLES:
35 slrn knows the following ENVIRONMENT variables;
36 TMP: Directory for temporary files, this should be set when you
37 installed OS/2 to something like x:\TMP.
38 USER or LOGNAME: This should be the same as the first part in your
39 email-address (until @)
40 REPLYTO: If you have another emailaddress than the account you're
41 posting from you can set this to the preffered email-address.
42 HOSTNAME: The name of your computer without domain-name.
43 NAME: Your real name
44 ORGANIZATION: Organization to put in the header.
45 EDITOR or VISUAL: Editor used if not defined in slrn.rc. (if none
46 of these are defined we use edit.exe.
47
48 Most of these can be overridden in the slrn.rc file.
49