--- Begin Message ---
- From: "Felix E. Klee" <felix.klee@xxxxxxx>
- Date: Mon, 07 Feb 2005 02:19:21 +0100
Hi,
below you find a Shimbun backend for FFII RSS feeds. Would it be
possible to include that in future versions of EMACS-W3M?
Felix
;;; sb-ffii.el --- shimbun backend for <http://www.ffii.org/news/rss/>
;; Authors:
;; * Felix E. Klee <felix.klee@inka.de>
;; * Andreas Seltenreich <seltenreich@gmx.de> (author of sb-n24-de.el
;; which was used as a base for this module)
;; Keywords: news
;; Created: Feb 07, 2005
;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation; either version 2, or (at your option)
;; any later version.
;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
;; along with this program; if not, you can either send email to this
;; program's maintainer or write to: The Free Software Foundation,
;; Inc.; 59 Temple Place, Suite 330; Boston, MA 02111-1307, USA.
;;; Code:
(require 'shimbun)
(require 'sb-rss)
(luna-define-class shimbun-ffii (shimbun-rss) ())
(defvar shimbun-ffii-groups
'("SwpatcninoEn"
"SwpatcninoEn-ffii"))
(defvar shimbun-ffii-content-start "<html>")
(defvar shimbun-ffii-content-end "</html>")
(defvar shimbun-ffii-server-name "FFII")
(defvar shimbun-ffii-from-address "info@ffii.org")
(luna-define-method shimbun-headers :before ((shimbun shimbun-ffii)
&rest range)
shimbun)
(luna-define-method shimbun-groups ((shimbun shimbun-ffii))
shimbun-ffii-groups)
(luna-define-method shimbun-rss-build-message-id
((shimbun shimbun-ffii) url date)
(let (page host datedesc)
(unless (string-match "http:\\/\\/" url)
(error "Cannot parse URL for message-id base"))
(setq host (match-string-no-properties 1 url)
page (match-string-no-properties 2 url))
(unless (string-match "\\([0-9][0-9][0-9][0-9]\\)-\\([0-9][0-9]\\)-\\([0-9][0-9]\\)" date)
(error "Cannot parse date for message-id base"))
(setq datedesc (concat (match-string-no-properties 1 date)
(match-string-no-properties 2 date)
(match-string-no-properties 3 date)
(match-string-no-properties 4 date)
(match-string-no-properties 5 date)))
(format "<%s%%%s@%s>" datedesc page host)))
(luna-define-method shimbun-index-url ((shimbun shimbun-ffii))
(concat "http://www.ffii.org/news/rss/"
(shimbun-current-group-internal shimbun)
".rss"))
(provide 'sb-ffii)
;;; sb-ffii.el ends here
--- End Message ---