Gnus development mailing list
 help / color / mirror / Atom feed
* Read Heise newsticker: hackers wanted
@ 2002-02-09 20:16 Kai Großjohann
  2002-02-11  9:14 ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2002-02-09 20:16 UTC (permalink / raw)


Thanks to ShengHuo's nnrss-content-function, it was fairly easy to
cons up the following which kinda sorta lets you read the Heise
newsticker via nnrss.  I'm interested in people who want to hack on
this.

(There is some flickering going on, and I would like to know why
there are \201 characters.)

(defun kai-nnrss-content-function (entry group article)
  (let ((num (nth 0 entry))
	(timestamp (nth 1 entry))
	(url (nth 2 entry)))
    (when (string-match "[hH]eise" group)
      (message "Retrieving %s" url)
      (let ((buf (url-retrieve-synchronously url))
	    (w3-display-same-buffer t)
	    parse)
	(save-excursion
	  (set-buffer buf)
	  (goto-char (point-min))
	  (delete-region (point)
			 (search-forward "<HEISETEXT>"))
	  (insert "<html><body>")
	  (delete-region (search-forward "</HEISETEXT>")
			 (point-max))
	  (insert "</boxy></html>")
	  (setq parse (w3-parse-buffer (current-buffer)))
	  (erase-buffer)
	  (w3-draw-tree parse))
	(insert-buffer buf)))))
(setq nnrss-content-function 'kai-nnrss-content-function)

As you can easily see, the method to grab the actual text of the news
item is very simple-minded.  As you can also see, I don't have the
foggiest notion how to use the URL and W3 packages.

Does anyone have something similar for Tagesschau?

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Read Heise newsticker: hackers wanted
  2002-02-09 20:16 Read Heise newsticker: hackers wanted Kai Großjohann
@ 2002-02-11  9:14 ` Kai Großjohann
  2002-02-11  9:34   ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2002-02-11  9:14 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 192 bytes --]

Here is a slightly improved version which does not display "\201ä"
instead of "ä" and so on.  Also, you can use it to read the
newsticker of the Tagesschau, a German public TV news show.


[-- Attachment #2: Type: application/emacs-lisp, Size: 1313 bytes --]

[-- Attachment #3: Type: text/plain, Size: 300 bytes --]


But it's still quite hair-raising: first of all, regexp searching
does not strike me as the right way to find the relevant parts of the
page, and secondly, the explicit and unconditional re-encoding of the
W3 tree to Latin-1 smells really bad.

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Read Heise newsticker: hackers wanted
  2002-02-11  9:14 ` Kai Großjohann
@ 2002-02-11  9:34   ` Kai Großjohann
  2002-02-11 17:46     ` Raymond Scholz
  0 siblings, 1 reply; 5+ messages in thread
From: Kai Großjohann @ 2002-02-11  9:34 UTC (permalink / raw)


Kai.Grossjohann@cs.uni-dortmund.de (Kai Großjohann) writes:

> Here is a slightly improved version which does not display "\201ä"
> instead of "ä" and so on.  Also, you can use it to read the
> newsticker of the Tagesschau, a German public TV news show.

Do you think it makes sense to incorporate this into Gnus in some
way?  (It needs to be polished up before that.)

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Read Heise newsticker: hackers wanted
  2002-02-11  9:34   ` Kai Großjohann
@ 2002-02-11 17:46     ` Raymond Scholz
  2002-02-12  9:01       ` Kai Großjohann
  0 siblings, 1 reply; 5+ messages in thread
From: Raymond Scholz @ 2002-02-11 17:46 UTC (permalink / raw)


Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:

> Do you think it makes sense to incorporate this into Gnus in some
> way?  (It needs to be polished up before that.)

Hm, what about the idea of separating moving targets like those rss
functions, nnslashdot, nnwarchive etc. from the main Gnus
distribution?  It'll be helpful for users that don't want to upgrade
to Gnus development versions just for the sake of reading those news
services.

But I've no good idea how to implement this.  Should there be a
subscription service (mailing list or some "Gnus news channel" within
Gnus itself)?  What kind of information should be transferred (plain
Elisp files or some meta format to be defined)?

Cheers, Ray
-- 
It's clear that whoever set up the font colorings for most programming
modes has seen too many Peter Max posters, or did more acid than I did
in the 60's.                     (Charles R. Martin in gnu.emacs.help)



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Read Heise newsticker: hackers wanted
  2002-02-11 17:46     ` Raymond Scholz
@ 2002-02-12  9:01       ` Kai Großjohann
  0 siblings, 0 replies; 5+ messages in thread
From: Kai Großjohann @ 2002-02-12  9:01 UTC (permalink / raw)


Raymond Scholz <ray-2002@zonix.de> writes:

> Kai.Grossjohann@CS.Uni-Dortmund.DE (Kai Großjohann) writes:
>
>> Do you think it makes sense to incorporate this into Gnus in some
>> way?  (It needs to be polished up before that.)
>
> Hm, what about the idea of separating moving targets like those rss
> functions, nnslashdot, nnwarchive etc. from the main Gnus
> distribution?  It'll be helpful for users that don't want to upgrade
> to Gnus development versions just for the sake of reading those news
> services.

That is a good idea.  But it seems nobody has stepped forward to do
the work.

> But I've no good idea how to implement this.  Should there be a
> subscription service (mailing list or some "Gnus news channel" within
> Gnus itself)?  What kind of information should be transferred (plain
> Elisp files or some meta format to be defined)?

It might be better to factor out the parsing code and to distribute
it.  Maybe the parsing is done via regexes, then regexes could be
factored out.  Or maybe the parsing is done via XPath, then XPath
queries could be factored out.  Or a Lisp function, for full
generality.

kai
-- 
~/.signature is: umop 3p!sdn    (Frank Nobis)



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2002-02-12  9:01 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-02-09 20:16 Read Heise newsticker: hackers wanted Kai Großjohann
2002-02-11  9:14 ` Kai Großjohann
2002-02-11  9:34   ` Kai Großjohann
2002-02-11 17:46     ` Raymond Scholz
2002-02-12  9:01       ` Kai Großjohann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).