[Date Prev][Date Next][Thread Prev][][Date Index][Thread Index]

sb-bbc.el patch



Anyone interested in all the sport groups?  Would be easy to add.  But I
actually score everything down except football.

David

2006-05-31  David Hansen  <david.hansen@xxxxxxxxxxxxxxxxxxx>

	* sb-bbc.el (shimbun-bbc-url): Set to the base URL of the various
        RSS feeds.
        (shimbun-bbc-path-alist): New variable to support other groups.
        (shimbun-bbc-groups): Added other groups.
        (shimbun-index-url): New function.
--- cvs-src/emacs-w3m/shimbun/sb-bbc.el	2005-07-14 14:24:18.000000000 +0200
+++ share/emacs/site-lisp/w3m/sb-bbc.el	2006-06-05 23:59:28.000000000 +0200
@@ -33,8 +33,7 @@
 (luna-define-class shimbun-bbc (shimbun-rss) ())
 
 (defvar shimbun-bbc-url
-  "http://news.bbc.co.uk/rss/newsonline_uk_edition/world/rss091.xml")
-(defvar shimbun-bbc-groups '("news"))
+  "http://newsrss.bbc.co.uk/rss/newsonline_uk_edition")
 (defvar shimbun-bbc-from-address  "newsonline@xxxxxxxxx")
 (defvar shimbun-bbc-content-start
   (concat "<!-- "
@@ -42,6 +41,36 @@
 	  " -->"))
 (defvar shimbun-bbc-content-end "<!-- E BO -->")
 
+(defvar shimbun-bbc-path-alist
+  '(("front_page" . "/front_page/rss.xml")
+    ;; use the name "news" here to be backward compatible
+    ;; ("world" . "/world/rss.xml")
+    ("news" . "/world/rss.xml")
+    ("uk" . "/uk/rss.xml")
+    ("england" "/england/rss.xml")
+    ("northern_ireland" . "/northern_ireland/rss.xml")
+    ("scotland" . "/scotland/rss.xml")
+    ("wales" . "/wales/rss.xml")
+    ("business" . "/business/rss.xml")
+    ("politics" . "/uk_politics/rss.xml")
+    ("health" . "/health/rss.xml")
+    ("education" . "/education/rss.xml")
+    ("science" . "/sci/tech/rss.xml")
+    ("technology" . "/technology/rss.xml")
+    ("entertainment" . "/entertainment/rss.xml")
+    ("talking_point" . "/talking_point/rss.xml")
+    ("magazine" . "/magazine/rss.xml")
+    ("week_at-a-glance" . "/week_at-a-glance/rss.xml")
+    ("programmes" . "programmes/rss.xml")
+    ("latest_stories" . "/latest_published_stories/rss.xml")))
+
+(defvar shimbun-bbc-groups (mapcar 'car shimbun-bbc-path-alist))
+
+(luna-define-method shimbun-index-url ((shimbun shimbun-bbc))
+  (concat shimbun-bbc-url
+	  (cdr (assoc (shimbun-current-group-internal shimbun)
+		      shimbun-bbc-path-alist))))
+
 (luna-define-method shimbun-rss-build-message-id
   ((shimbun shimbun-bbc) url date)
 ;;;<DEBUG>