1;;; sb-msdn.el --- shimbun backend for MSDN 2 3;; Copyright (C) 2004, 2005, 2006 Yoichi NAKAYAMA <yoichi@geiin.org> 4 5;; Author: Yoichi NAKAYAMA <yoichi@geiin.org> 6;; Keywords: news 7;; Created: Sep 14, 2004 8 9;; This file is a part of shimbun. 10 11;; This program is free software; you can redistribute it and/or modify 12;; it under the terms of the GNU General Public License as published by 13;; the Free Software Foundation; either version 2, or (at your option) 14;; any later version. 15 16;; This program is distributed in the hope that it will be useful, 17;; but WITHOUT ANY WARRANTY; without even the implied warranty of 18;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 19;; GNU General Public License for more details. 20 21;; You should have received a copy of the GNU General Public License 22;; along with this program; see the file COPYING. If not, write to 23;; the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, 24;; Boston, MA 02110-1301, USA. 25 26;;; Commentary: 27 28;;; Code: 29 30(require 'shimbun) 31(require 'sb-rss) 32 33(luna-define-class shimbun-msdn (shimbun-rss) ()) 34 35(defvar shimbun-msdn-group-alist 36 '(("all" "http://msdn.microsoft.com/rss.xml") 37 ("netframework" "http://msdn.microsoft.com/netframework/rss.xml") 38 ("architecture" "http://msdn.microsoft.com/architecture/rss.xml") 39 ("asp.net" "http://msdn.microsoft.com/asp.net/rss.xml") 40 ("data" "http://msdn.microsoft.com/data/rss.xml") 41 ("longhorn" "http://msdn.microsoft.com/longhorn/rss.xml") 42 ("mobility" "http://msdn.microsoft.com/mobility/rss.xml") 43 ("subscriptions" "http://msdn.microsoft.com/subscriptions/rss.xml") 44 ("msdntv" "http://msdn.microsoft.com/msdntv/rss.xml") 45 ("office" "http://msdn.microsoft.com/office/rss.xml") 46 ("security" "http://msdn.microsoft.com/security/rss.xml") 47 ("sql" "http://msdn.microsoft.com/sql/rss.xml") 48 ("theshow" "http://msdn.microsoft.com/theshow/rss.xml") 49 ("vbasic" "http://msdn.microsoft.com/vbasic/rss.xml") 50 ("vcsharp" "http://msdn.microsoft.com/vcsharp/rss.xml") 51 ("visualc" "http://msdn.microsoft.com/visualc/rss.xml") 52 ("vfoxpro" "http://msdn.microsoft.com/vfoxpro/rss.xml") 53 ("vjsharp" "http://msdn.microsoft.com/vjsharp/rss.xml") 54 ("vstudio" "http://msdn.microsoft.com/vstudio/rss.xml") 55 ("vs2005" "http://msdn.microsoft.com/vs2005/rss.xml") 56 ("webservices" "http://msdn.microsoft.com/webservices/rss.xml") 57 ("embedded" "http://msdn.microsoft.com/embedded/rss.xml") 58 ("xml" "http://msdn.microsoft.com/xml/rss.xml") 59 ("japan.msdn" "http://www.microsoft.com/japan/msdn/rss.xml") 60 ("japan.msdn-us" "http://www.microsoft.com/japan/msdn/aboutmsdn/us/rss.xml")) 61 "Alist of readable groups and URLs of their RSSs. 62List is available at: 63 http://msdn.microsoft.com/aboutmsdn/rss/ 64 http://www.microsoft.com/japan/msdn/aboutmsdn/rss/") 65 66(defvar shimbun-msdn-from-address "nobody@microsoft.com") 67(defvar shimbun-msdn-content-start "\\(<!--\\(pull table\\|BEGIN_CONTENT\\| Begin Content \\)-->\\|<table id=\"hpcontenttable\".*>\\)") 68(defvar shimbun-msdn-content-end "\\(</body>\\|<!--\\(END_CONTENT\\| End Content \\)-->\\)") 69 70(luna-define-method shimbun-groups ((shimbun shimbun-msdn)) 71 (mapcar 'car shimbun-msdn-group-alist)) 72 73(luna-define-method shimbun-index-url ((shimbun shimbun-msdn)) 74 (nth 1 (assoc (shimbun-current-group shimbun) shimbun-msdn-group-alist))) 75 76(luna-define-method shimbun-rss-process-date ((shimbun shimbun-msdn) date) 77 date) 78 79(luna-define-method shimbun-article-url ((shimbun shimbun-msdn) header) 80 (let ((url (shimbun-article-base-url shimbun header))) 81 (if (string-match "\\`http://msdn\\.microsoft\\.com/\ 82library/default\\.asp\\?url=\\(.+\\.asp\\)\\'" url) 83 (concat "http://msdn.microsoft.com" (match-string 1 url)) 84 url))) 85 86(provide 'sb-msdn) 87 88;;; sb-msdn.el ends here 89