Thread View: news.software.readers
7 messages
7 total messages
Started by Paul Moore
Wed, 05 May 1999 00:00
slrn: Saving posts for later browsing
Author: Paul Moore
Date: Wed, 05 May 1999 00:00
Date: Wed, 05 May 1999 00:00
17 lines
1208 bytes
1208 bytes
I use slrn and slrnpull for offline newsreading on Windows. I like the programs a lot, but one feature I miss from "windows-style" newsreaders is the ability to save postings for later browsing. I know that I can use 'o' to save a post to a file. However, I don't then have a way of reading that file using a slrn-style interface (ie, threaded display, with the ability to reply, etc etc.) Ideally, I'd like to load the archived posts into slrn itself. Have I missed something? Is it not possible to do this? I *really* don't like looking at archived postings in vim :-( Thanks in advance, Paul Moore.
Re: slrn: Saving posts for later browsing
Author: Jan Hlavacek
Date: Wed, 05 May 1999 00:00
Date: Wed, 05 May 1999 00:00
221 lines
7257 bytes
7257 bytes
On Wed, 5 May 1999 17:28:58 +0200 , Paul Moore
<paul.moore@uk.origin-it.com> wrote:
> I use slrn and slrnpull for offline newsreading on Windows. I like the
> programs a lot, but one feature I miss from "windows-style" newsreaders is the
> ability to save postings for later browsing.
>
> I know that I can use 'o' to save a post to a file. However, I don't then have
> a way of reading that file using a slrn-style interface (ie, threaded display,
> with the ability to reply, etc etc.) Ideally, I'd like to load the archived
> posts into slrn itself.
>
> Have I missed something? Is it not possible to do this? I *really* don't like
> looking at archived postings in vim :-(
I just finished writing this. It works well for unix (well the version
I am sending may not work at all, I run another version which is much
more messy and does some wierd things, which I don't want to send out.
The version below should work well after fixing all my stupid errors.
Since you need to modify it for windows, you probably need to change
things anyway.
Oh, and you need the latest snapshot of s-lang,
ftp://space.mit.edu/pub/davis/slang/snapshots/slang1.3.5.tar.gz
Save this to `archive.sl':
#iffalse
Documentation:
WARNING: I have just finished rewriting this for the newest
devel snapshots of s-lang. It doesn't work with older versions of s-lang.
It is not very well tested!
If you run into problems, email me at lahvak@math.mps.ohio-state.edu.
I'll release better more tested version as soon as I have it done.
This lets you archive articles from slrn into an archive spool,
which then can again be accessed by slrn.
To install:
in your .slrnrc file, put the following lines (replace
"/home/lahvak/News/Archive" by the path to your archive):
%reading archive
%
#ifdef ARCHIVE
set spool_inn_root "/home/lahvak/News/Archive"
set spool_root "/home/lahvak/News/Archive/news"
set server_object "spool"
server "/home/lahvak/News/Archive/news" .jnewsrc-archive
set followup_string "While ago, on %d, %r <%f> wrote:"
set reply_string "While ago, in %n, you wrote:"
set read_active 1
set auto_mark_article_as_read 0
#else
interpret "archive.sl"
setkey article archive "whatever key you want, I use o"
#endif
If you already use macros, add to your article_mode_quit_hook ()
function the following:
#ifndef ARCHIVE
Archive->article_mode_quit_hook ();
#endif
Otherwise set up a file in your home dir called .slrn.sl containing the
following:
#ifndef ARCHIVE
define article_mode_quit_hook ()
{
Archive->article_mode_quit_hook ();
}
#endif
and add this line into your .slrnrc:
interpret ".slrn.sl"
When you read news, you press the key you chose,
and current article will be saved into an archive newsgroup.
To access the archive, do
slrn -DARCHIVE
and slrn will read the archive. You may have to do "L*<ENTER>"
to get list of all groups.
#endif
implements ("Archive");
%set this to whatever you want
variable SpoolDir = "/home/lahvak/News/Archive/";
variable padding = "00000000000";
private define pad_string (str)
{
if (strlen (str) > strlen (padding)) error ("string too long");
return (padding[[strlen(str):]] + str); % dirty
}
typedef struct {hi, lo, flags} GroupInfo;
private variable Default_Group_Info = @GroupInfo;
set_struct_fields (Default_Group_Info, 0,0,"y");
variable Groups = Assoc_Type [GroupInfo, Default_Group_Info];
#ifnexists strtrim_beg
private define strtrim_beg (str, whites)
{
!if (string_match (str, "[^" + whites + "]", 1)) return "";
variable pos;
(pos,) = string_match_nth (0);
return str[[pos:]];
}
#endif
define Get_Group_Info (line)
{
variable ar = strchop (line, ' ', 0);
variable gi = @GroupInfo;
set_struct_fields (gi, integer(strtrim_beg (ar[1], " 0")),
integer(strtrim_beg (ar[2], " 0")), ar[3]);
!if (assoc_key_exists (Groups, ar[0])) Groups [ar[0]] = gi;
}
define mk_group_line (name)
{
variable gi = Groups [name];
return sprintf ("%s %s %s %s", name, pad_string(string(gi.hi)),
pad_string(string(gi.lo)), gi.flags);
}
define read_active_file (afile)
{
variable af = fopen (afile, "r");
variable line = "";
if (af == NULL) error ("can't find active file");
while (-1 != fgets (&line, af))
{
Get_Group_Info (line);
}
() = fclose (af);
}
define write_active_file (afile)
{
if (rename (afile, afile + ".bak")) error ("Error creating backup of active file");
variable af = fopen (afile, "w");
if (af == NULL) error ("Panic: can't write active file.");
variable g;
foreach (Groups) using ("keys")
{
g = ();
if (-1 == fputs (mk_group_line (g), af)) error ("error writing active file");
}
() = fclose (af);
}
define chto_group_dir (group)
{
variable newdir;
chdir (strcat (SpoolDir, "news"));
variable parts = strchop (group, '.', 0);
foreach (parts)
{
newdir = ();
!if (mkdir (newdir, 0777)) message ("New group...");
if (-1 == chdir (newdir)) error ("Chdir failed.");
}
}
define save_art_to (group)
{
variable dir = getcwd ();
ERROR_BLOCK {chdir (dir);}
variable no = Groups[group].hi + 1;
chto_group_dir (group);
save_current_article (string (no));
Groups[group].hi++;
EXECUTE_ERROR_BLOCK;
}
public define archive ()
{
% Saves article into archive newsgroup based on some criteria.
% Offers the newsgroup name to edit.
if (is_group_mode) return ();
variable file = "arch." + current_newsgroup ();
% Not very likely that I'll edit the name,
% if I don't like it, I'll just type in a new one.
file = read_mini ("Archive to newsgroup", file, "");
save_art_to (file);
}
%initialization
read_active_file (SpoolDir + "data/active");
define article_mode_quit_hook ()
{
write_active_file (SpoolDir + "data/active");
}
--
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: slrn: Saving posts for later browsing
Author: marek jedlinski
Date: Wed, 05 May 1999 00:00
Date: Wed, 05 May 1999 00:00
29 lines
1953 bytes
1953 bytes
Paul Moore <paul.moore@uk.origin-it.com> wrote: > I know that I can use 'o' to save a post to a file. However, I don't then have > a way of reading that file using a slrn-style interface (ie, threaded display, > with the ability to reply, etc etc.) Ideally, I'd like to load the archived > posts into slrn itself. > > Have I missed something? Is it not possible to do this? I *really* don't like > looking at archived postings in vim :-( Indeed. One thing you can do is this: When you hit 'o', the article is saved to a file somewhere. Under your home 'mail' directory, you can create links to those files that slrn saves. Your mailreader may then be able to view the articles as if they were email messages. I do that with mutt. This only leaves one disadvantage: you can't 'followup' to a message saved this way. Otherwise, it's a fair workaround. Of course it *would* be nice if slrn could read the files it saves to :) .marek -- General Frenetics, Discorporated: http://www.lodz.pdi.net/~eristic/ "The war isn't the war between the blacks and the whites, the liberals and the conservatives, or the Federation and the Romulans. It's between the clueful and the clueless." (an anonymous poster on cypherpunks list)
Re: slrn: Saving posts for later browsing
Author: Jorgen Grahn
Date: Wed, 05 May 1999 00:00
Date: Wed, 05 May 1999 00:00
27 lines
1923 bytes
1923 bytes
On Wed, 5 May 1999 17:28:58 +0200 , Paul Moore <paul.moore@uk.origin-it.com> wrote:
>I use slrn and slrnpull for offline newsreading on Windows. I like the
>programs a lot, but one feature I miss from "windows-style" newsreaders is the
>ability to save postings for later browsing.
>
>I know that I can use 'o' to save a post to a file. However, I don't then have
>a way of reading that file using a slrn-style interface (ie, threaded display,
>with the ability to reply, etc etc.) Ideally, I'd like to load the archived
>posts into slrn itself.
I only just tested this, but the files that 'o'ed postings go to are regular
UNIX mailbox files. Using the 'mutt' mailer under UNIX I do:
% mutt -Rf News/News.software.readers
and get a nice, threaded view of all messages I've saved from this group.
I have no idea how this translates to Windows; if slrn uses the same format
there, you'd have to try and find a mail reader there which understands the
mbox format.
--
/// - Jorgen Grahn "Yes, I assume Xena and Gabrielle are doin'
\\\/// jorgen.grahn@ the evil deed, and are committed to said
\/// opensoftware.se deed with each other for all eternity." -- anon
Re: slrn: Saving posts for later browsing
Author: tony summerfelt
Date: Thu, 06 May 1999 00:00
Date: Thu, 06 May 1999 00:00
17 lines
1284 bytes
1284 bytes
On 5 May 1999 20:10:40 GMT, Jan Hlavacek wrote: > I just finished writing this. It works well for unix (well the version this effectively replaces the rkive.sl and unrkive.pl stuff i wrote and posted a few months ago -- *-------------------------------------- | |remove myspleen to email | *-----------------------
Re: slrn: Saving posts for later browsing
Author: David Gerard
Date: Thu, 06 May 1999 00:00
Date: Thu, 06 May 1999 00:00
25 lines
1916 bytes
1916 bytes
On 5 May 1999 22:16:55 -0200, Jorgen Grahn <jorgen.grahn@NOHAM.opensoftware.se> wrote: :I only just tested this, but the files that 'o'ed postings go to are regular :UNIX mailbox files. Using the 'mutt' mailer under UNIX I do: :% mutt -Rf News/News.software.readers :and get a nice, threaded view of all messages I've saved from this group. :I have no idea how this translates to Windows; if slrn uses the same format :there, you'd have to try and find a mail reader there which understands the :mbox format. Quite a few of them, apparently - I think Pegasus, Eudora and Netscape do. If I can get Pegasus to accept messages from slrn for later mailing, I'll be going back to it. -- http://thingy.apana.org.au/~fun/ http://xenu.netizen.com.au/ ALERT! Australian government attempts to censor Australian internet out of existence! - See http://www.efa.org.au/ for the gory details ...
Re: slrn: Saving posts for later browsing
Author: Paul Moore
Date: Thu, 06 May 1999 00:00
Date: Thu, 06 May 1999 00:00
29 lines
1757 bytes
1757 bytes
On Thu, 6 May 1999 02:16:55 +0200, jorgen.grahn@NOHAM.opensoftware.se (Jorgen Grahn) wrote: >On Wed, 5 May 1999 17:28:58 +0200 , Paul Moore <paul.moore@uk.origin-it.com> >wrote: >>I use slrn and slrnpull for offline newsreading on Windows. I like the >>programs a lot, but one feature I miss from "windows-style" newsreaders >>is the ability to save postings for later browsing. > >I only just tested this, but the files that 'o'ed postings go to are regular >UNIX mailbox files. Using the 'mutt' mailer under UNIX I do: > >% mutt -Rf News/News.software.readers > >and get a nice, threaded view of all messages I've saved from this group. Yes, I was aware of this. My ideal solution is mutt for Windows :-( >I have no idea how this translates to Windows; if slrn uses the same format >there, you'd have to try and find a mail reader there which understands the >mbox format. There are such readers (Pegasus is a free one), but none of them have threading anything like as good as mutt/slrn. Thanks, Paul.
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