Thread View: news.software.readers
4 messages
4 total messages
Started by Martijn van Buul
Mon, 13 Mar 2000 00:00
[SLRN] "Importing" an article
Author: Martijn van Buul
Date: Mon, 13 Mar 2000 00:00
Date: Mon, 13 Mar 2000 00:00
36 lines
2183 bytes
2183 bytes
Hello!
I've got a problem with SLRN (To be more precise: version 0.9.6.2, but
I'm quite sure that it's not specific to this particular version). I'm
trying to implement something similiar to the URLview-function provided
by SLRN, but for Message-ID's instead of URLs. Things go well for articles
still available on the newsserver. When an article isn't available on
the newsserver,however, I open Lynx for www.deja.com (with an appropriate
URL) to obtain the message text. I'd like to see this text 'imported' in
SLRN.
My questions:
1) I could make lynx dump the content of the article (if available) to a
file. How can I import this file within a S-Lang script?
2) Provided that I -can- 'import' this text, how can I fool SLRN into
displaying this article? replace_article() sounds promising, yet I do
not want to 'replace' things, I want to insert things instead!
Any hints or suggestions please?
Martijn
PS: Ideally, this functionality could be implemented in the (intrinsic)
function locate_header_by_msgid() function.
PPS: My apologies to the readers of the (Dutch) newsgroup nl.comp.software.
newsreaders for blatantly cross-posting a question in a foreign
language. It might raise the quality of the postings, though...
--
Martijn van Buul - Pino@dohd.cx - http://www.stack.nl/~martijnb/
Visit OuterSpace: mud.stack.nl 3333
Re: [SLRN] "Importing" an article
Author: John E. Davis
Date: Mon, 13 Mar 2000 00:00
Date: Mon, 13 Mar 2000 00:00
28 lines
1817 bytes
1817 bytes
On 13 Mar 2000 21:21:31 GMT, Martijn van Buul <pino+news_software_readers@dohd.cx> wrote: >1) I could make lynx dump the content of the article (if available) to a > file. How can I import this file within a S-Lang script? Use the fopen/fgets/fclose, etc. intrinsic functions. > >2) Provided that I -can- 'import' this text, how can I fool SLRN into > displaying this article? replace_article() sounds promising, yet I do > not want to 'replace' things, I want to insert things instead! Right now there is no mechanism in place for inserting new articles that do not come from the news server. Perhaps a hook can be added to the query-server-via-msgid function (or whatever it is called) to allow the hook to return something if the server fails. >PS: Ideally, this functionality could be implemented in the (intrinsic) > function locate_header_by_msgid() function. Yes, via a hook as mentioned above. Feel free to implement the hook and send it to me for incorporation into the next release. Thanks, --John
Re: [SLRN] "Importing" an article
Author: John E. Davis
Date: Tue, 14 Mar 2000 00:00
Date: Tue, 14 Mar 2000 00:00
15 lines
1264 bytes
1264 bytes
On 14 Mar 2000 14:39:46 GMT, Martijn van Buul <pino+nl_comp_software_newsreaders@dohd.cx> wrote: >All current slrn hooks do not return any value at all. However, since Some do. For example, misc.c:slrn_make_from_string calls make_from_string_hook, which if defined must return a string. [...] >Are there other 'nice' options for returning such a string? See the above example. --John
Re: [SLRN] "Importing" an article
Author: Martijn van Buul
Date: Tue, 14 Mar 2000 00:00
Date: Tue, 14 Mar 2000 00:00
33 lines
2067 bytes
2067 bytes
It occurred to me that John E. Davis wrote in nl.comp.software.newsreaders:
> >1) I could make lynx dump the content of the article (if available) to a
> > file. How can I import this file within a S-Lang script?
>
> Use the fopen/fgets/fclose, etc. intrinsic functions.
Argh! I completely overlooked these functions! Time for another cup of
coffee...
[ A help_I_cant_find_my_article_hook is needed ]
> Yes, via a hook as mentioned above. Feel free to implement the hook
> and send it to me for incorporation into the next release.
Okay. I'll do my best. I've got one problem lurking around though:
All current slrn hooks do not return any value at all. However, since
this hook -has- to return the newly found article somehow, it will need
to feed the article back someway. I can't figure out any other way then
having this hook return the article as a string, but doing so would be
deviating from the current situation.
Are there other 'nice' options for returning such a string?
Kind regards,
Martijn.
--
Martijn van Buul - Pino@dohd.cx - http://www.stack.nl/~martijnb/
Visit OuterSpace: mud.stack.nl 3333
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