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

Re: sb-nikkei.el 地域経済面



野宮です。

>>>>> In the Message: [emacs-w3m ML: No.07312]
>>>>>   with the date of Sun, 26 Dec 2004 18:39:01 +0900
>>>>> [小生] == 野宮 賢 / NOMIYA Masaru <nomiya@ttmy.ne.jp> has written:

小生> shimbunで日経新聞の「地域経済面」を読めないものかと、以前の
小生> sb-nikkei.elの「地域経済面」の部分をを参考にして手を入れてみました。
小生> が、どうやっても最初記事だけしか取り込みことが出来ず、お手上げの状態で
小生> す。^^;;;

関数を間違えていました。以下のパッチで「地域経済面」を読めるようになり
ました。
如何でしょうか?

宜しくお願いします。

---
  野宮  賢             mail-to: nomiya@ttmy.ne.jp

          "Bill! You married with Computers.
           Not with Me!"
          "No..., with money."


--- sb-nikkei.el.orig	2004-12-06 18:55:18.000000000 +0900
+++ sb-nikkei.el	2004-12-28 19:12:48.000000000 +0900
@@ -71,6 +71,9 @@
     ("shakai" "社会" ,(concat shimbun-nikkei-url "news/shakai/")
      shimbun-nikkei-get-headers-default
      shimbun-nikkei-prepare-article-default)
+    ("retto" "地域経済" ,(concat shimbun-nikkei-url "news/retto/")
+     shimbun-nikkei-get-headers-retto
+     shimbun-nikkei-prepare-article-retto)
     ("sports" "スポーツ" "http://sports.nikkei.co.jp/"
      shimbun-nikkei-get-headers-sports
      shimbun-nikkei-prepare-article-sports)
@@ -353,6 +356,48 @@
 	(setq start end))
       (shimbun-sort-headers headers))))
 
+(defun shimbun-nikkei-get-headers-retto (group folder)
+  "Function used to fetch headers for the retto group."
+  (let (headers)
+    (while (re-search-forward
+	   (eval-when-compile
+	     (let ((s0 "[\t\n ]*")
+		    (s1 "[\t\n ]+"))
+       	       (concat "<AREA21" s1 "HEADLINE=\""
+			;; 1. subject
+			"\\([^\"]+\\)"	
+			"\"" s1 "URL=\""
+			;; 2. url
+			"\\("
+			;; 3. serial number
+			"\\(20[0-9][0-9][01][0-9][0-9a-z]+\\)"
+			"\\.html\\)"
+			"\"" s1 "ARTICLE_TIME=\""
+			;; 4. year
+			"\\(20[0-9][0-9]\\)" "/"
+			;; 5. month
+			"\\([01][0-9]\\)" "/"
+			;; 6. day
+			"\\([0-3][0-9]\\)" s1
+			;; 7. hour:minute
+			"\\([012][0-9]:[0-5][0-9]\\)")))
+	    nil t)
+      (push (shimbun-create-header
+	     0
+	     (match-string 1)
+	     shimbun-nikkei-from-address
+	     (shimbun-nikkei-make-date-string
+	      (string-to-number (match-string 4))
+	      (string-to-number (match-string 5))
+	      (string-to-number (match-string 6))
+	      (match-string 7))
+	     (concat "<" (match-string 3) "%" group "."
+		     shimbun-nikkei-top-level-domain ">")
+	     "" 0 0
+	     (shimbun-nikkei-expand-url (match-string 2) folder))
+	    headers))
+    (shimbun-sort-headers headers)))
+
 (defun shimbun-nikkei-get-headers-sports (group folder)
   "Function used to fetch headers for the sports group."
   (let (headers)
@@ -602,6 +647,18 @@
 	(goto-char body))
       (insert shimbun-nikkei-content-start))))
 
+(defun shimbun-nikkei-prepare-article-retto (&rest args)
+  "Function used to prepare contents of an article for the retto group."
+  (when (re-search-forward "\
+<!--[\t\n ]*FJZONE[\t\n ]+START[\t\n ]+NAME=\"HONBUN\"[\t\n ]+-->"
+			   nil t)
+    (insert shimbun-nikkei-content-start)
+    (when (re-search-forward "\
+<!--[\t\n ]*FJZONE[\t\n ]*END[\t\n ]*NAME=\"HONBUN\"[\t\n ]+-->"
+			     nil t)
+      (goto-char (match-beginning 0))
+      (insert shimbun-nikkei-content-end))))
+
 (defun shimbun-nikkei-prepare-article-sports (&rest args)
   "Function used to prepare contents of an article for the sports group."
   (when (re-search-forward "\