From: bg66 Date: Tue, 12 Dec 2006 08:34:30 +0000 (+0000) Subject: Synch up with main trunk. X-Git-Tag: cache-file-mergepoint~1 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=047f167a6938e897265a11e5b38a513588dd5a42;p=elisp%2Fmixi.git Synch up with main trunk. --- diff --git a/ChangeLog b/ChangeLog index a4d13b5..0bb2191 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,202 @@ +2006-12-12 OHASHI Akira + + * mixi.el (mixi-url-retrieve): Simplify. + +2006-12-11 OHASHI Akira + + * mixi.el (mixi-diary-time-regexp): Follow the change of mixi; + Fix regexp. + (mixi-diary-title-regexp): Ditto. + (mixi-diary-content-regexp): Ditto. + (mixi-diary-realize): Follow the change above. + +2006-12-11 OHASHI Akira + + * mixi.el (mixi-search-bbs-list-page): New macro. + (mixi-search-bbs-list-regexp): New regexp. + (mixi-search-bbses): New function. + +2006-12-11 OHASHI Akira + + * mixi.el (mixi-search-community-list-page): New macro. + (mixi-search-community-list-regexp): New regexp. + (mixi-search-communities): New function. + +2006-12-11 OHASHI Akira + + * mixi.el (mixi-cache-expires): Set the default value to nil. + +2006-12-08 OHASHI Akira + + * sb-mixi.el (shimbun-mixi-initialize-comment-cache): Abolish. + (initialize-instance): Follow the change above. + (shimbun-close): Set the comment cache to nil. + +2006-12-08 OHASHI Akira + + * mixi.el (mixi-topic-comment-list-regexp): Fix regexp. + (mixi-message): Rename the STRING argument to STRINGS. + (mixi-login): Follow the cange above. + (mixi-parse-buffer): Fix error message. + +2006-12-07 OHASHI Akira + + * mixi.el (mixi-diary-owner-nick-regexp): Fix regexp. + (mixi-topic-owner-regexp): Ditto. + +2006-12-05 OHASHI Akira + + * sb-mixi.el (shimbun-mixi-logout-p): New user option. + (shimbun-mixi-initialize-comment-cache): New macro. + (initialize-instance): Use it. + (shimbun-close): New method. + +2006-12-04 OHASHI Akira + + * mixi.el (mixi-url-encode-and-quote-percent-string): New function. + (mixi-search-diary-list-page): New macro. + (mixi-search-diary-list-regexp): New regexp. + (mixi-search-diaries): New function. + (mixi-diary-closed-regexp): New regexp. + (mixi-diary-realize): Use it. + + * sb-mixi.el (shimbun-mixi-group-alist): Fix docs. + +2006-12-04 OHASHI Akira + + * mixi.el (mixi-diary-content-regexp): Fix regexp. + +2006-12-01 OHASHI Akira + + * mixi.el (mixi-diary-comment-list-page): Use `full=1' instead of + `page=%d'. + (mixi-get-comments): Get comments in latest order. + +2006-12-01 OHASHI Akira + + * mixi.el (mixi-parse-buffer): Rename from `mixi-retrieve-1', and + swap `buffer' argument and `url'. + (mixi-url-retrieve): Follow the change above. + (mixi-w3m-retrieve): Ditto. + (mixi-curl-retrieve): Ditto. + +2006-11-30 OHASHI Akira + + * mixi.el (mixi-get-matched-items): Rename `max-numbers' to `range', + and swap `range' and `regexp'. + (mixi-get-friends): Follow the change above. + (mixi-get-favorites): Ditto. + (mixi-get-logs): Ditto. + (mixi-get-diaries): Ditto. + (mixi-get-new-diaries): Ditto. + (mixi-get-communities): Ditto. + (mixi-get-bbses): Ditto. + (mixi-get-new-bbses): Ditto. + (mixi-get-comments): Ditto. + (mixi-get-new-comments): Ditto. + (mixi-get-messages): Ditto. + (mixi-get-introductions): Ditto. + +2006-11-30 OHASHI Akira + + * sb-mixi.el (shimbun-comment-article): Simplify. + +2006-11-29 OHASHI Akira + + * sb-mixi.el (shimbun-comment-article): Cache the content of all + comment. + +2006-11-29 OHASHI Akira + + * sb-mixi.el (shimbun-mixi): Add the COMMENT-CACHE slot. + (initialize-instance): New method. + (shimbun-mixi-get-headers): Cache the content of comment. + (shimbun-comment-article): Use cache. + (shimbun-article): Follow the change above. + +2006-11-28 OHASHI Akira + + * sb-mixi.el (shimbun-mixi-x-face-alist): New variable. + +2006-11-28 OHASHI Akira + + * mixi.el (mixi-object-title): Follow the event object. + (mixi-object-content): Ditto. + (mixi-bbs-owner): New alias. + (mixi-bbs-id): Ditto. + (mixi-bbs-time): Ditto. + (mixi-bbs-title): Ditto. + (mixi-bbs-content): Ditto. + + * sb-mixi.el (shimbun-mixi-make-subject): Follow the change above. + (shimbun-mixi-make-body): Ditto. + +2006-11-27 OHASHI Akira + + * mixi.el (mixi-event-cache): New variable. + (mixi-make-event): New function. + (mixi-event-url-regexp): New constant. + (mixi-make-event-from-url): New function. + (mixi-event-p): New macro. + (mixi-event-page): Ditto. + (mixi-event-time-regexp): New regexp. + (mixi-event-title-regexp): Ditto. + (mixi-event-owner-regexp): Ditto. + (mixi-event-date-regexp): Ditto. + (mixi-event-place-regexp): Ditto. + (mixi-event-detail-regexp): Ditto. + (mixi-event-limit-regexp): Ditto. + (mixi-event-members-regexp): Ditto. + (mixi-event-realize): New function. + (mixi-event-community): New accessor method. + (mixi-event-id): Ditto. + (mixi-event-time): Ditto. + (mixi-event-title): Ditto. + (mixi-event-owner): Ditto. + (mixi-event-date): Ditto. + (mixi-event-place): Ditto. + (mixi-event-detail): Ditto. + (mixi-event-limit): Ditto. + (mixi-event-members): Ditto. + (mixi-event-set-time): Ditto. + (mixi-event-set-title): Ditto. + (mixi-event-set-owner): Ditto. + (mixi-event-set-date): Ditto. + (mixi-event-set-place): Ditto. + (mixi-event-set-detail): Ditto. + (mixi-event-set-limit): Ditto. + (mixi-event-set-members): Ditto. + (mixi-bbs-list-page): Rename from `mixi-topic-list-page'. + (mixi-bbs-list-regexp): Rename from `mixi-topic-list-regexp'. + (mixi-get-bbses): Rename from `mixi-get-topics'. + (mixi-new-bbs-list-page): Rename from `mixi-new-topic-list-page'. + (mixi-new-bbs-list-regexp): Rename from `mixi-new-topic-list-regexp'. + (mixi-get-new-bbses): Rename from `mixi-get-new-topics'. + (mixi-bbs-list-regexp): Follow the change above. + (mixi-get-bbses): Ditto. + (mixi-new-bbs-list-regexp): Ditto. + (mixi-get-new-bbses): Ditto. + (mixi-event-comment-list-page): New function. + (mixi-event-comment-list-regexp): New constant. + + * sb-mixi.el (shimbun-mixi-group-alist): Follow the change above. + (shimbun-mixi-make-subject): Ditto. + (shimbun-mixi-make-xref): Ditto. + (shimbun-mixi-get-headers): Ditto. + (shimbun-get-headers): Ditto. + (shimbun-mixi-make-body): New function. + (shimbun-article): Follow the change above. + +2006-11-27 OHASHI Akira + + * sb-mixi.el (shimbun-mixi-get-headers): Don't quit even if there are + comments which have already gotten. + +2006-11-27 OHASHI Akira + + * mixi.el (mixi-topic-content-regexp): Fix regexp. + (mixi-topic-realize): Follow the change above. + 2006-11-25 OHASHI Akira * mixi.el (mixi-save-cache): Use `symbol-value' instead of diff --git a/mixi.el b/mixi.el index 8fb129c..10e8b79 100644 --- a/mixi.el +++ b/mixi.el @@ -31,9 +31,12 @@ ;; * mixi-get-logs ;; * mixi-get-diaries ;; * mixi-get-new-diaries +;; * mixi-search-diaries ;; * mixi-get-communities -;; * mixi-get-topics -;; * mixi-get-new-topics +;; * mixi-search-communities +;; * mixi-get-bbses +;; * mixi-get-new-bbses +;; * mixi-search-bbses ;; * mixi-get-comments ;; * mixi-get-new-comments ;; * mixi-get-messages @@ -47,14 +50,12 @@ ;; ;; Display newest 3 diaries like a mail format. ;; -;; (let ((max-numbers 3) -;; (buffer (generate-new-buffer "*temp*")) +;; (let ((range 3) +;; (buffer (get-buffer-create "*temp*")) ;; (format "%Y/%m/%d %H:%M")) ;; (pop-to-buffer buffer) ;; (mapc (lambda (diary) ;; (let ((subject (mixi-diary-title diary)) -;; ;; Don't get owner's nick at first for omitting a useless -;; ;; retrieval. ;; (from (mixi-friend-nick (mixi-diary-owner diary))) ;; (date (format-time-string format (mixi-diary-time diary))) ;; (body (mixi-remove-markup (mixi-diary-content diary)))) @@ -62,7 +63,7 @@ ;; "Subject: " subject "\n" ;; "Date: " date "\n\n" ;; body "\n\n"))) -;; (mixi-get-new-diaries max-numbers)) +;; (mixi-get-new-diaries range)) ;; (set-buffer-modified-p nil) ;; (setq buffer-read-only t) ;; (goto-char (point-min))) @@ -70,14 +71,12 @@ ;; Display newest 3 diaries including newest 3 comments like a mail format. ;; Comments are displayed like a reply mail. ;; -;; (let ((max-numbers 3) -;; (buffer (generate-new-buffer "*temp*")) +;; (let ((range 3) +;; (buffer (get-buffer-create "*temp*")) ;; (format "%Y/%m/%d %H:%M")) ;; (pop-to-buffer buffer) ;; (mapc (lambda (diary) ;; (let ((subject (mixi-diary-title diary)) -;; ;; Don't get owner's nick at first for omitting a useless -;; ;; retrieval. ;; (from (mixi-friend-nick (mixi-diary-owner diary))) ;; (date (format-time-string format (mixi-diary-time diary))) ;; (body (mixi-remove-markup (mixi-diary-content diary)))) @@ -97,12 +96,17 @@ ;; "Subject: " subject "\n" ;; "Date: " date "\n\n" ;; body "\n\n"))) -;; (mixi-get-comments diary max-numbers)))) -;; (mixi-get-new-diaries max-numbers)) +;; (mixi-get-comments diary range)))) +;; (mixi-get-new-diaries range)) ;; (set-buffer-modified-p nil) ;; (setq buffer-read-only t) ;; (goto-char (point-min))) +;; Bug reports: +;; +;; If you have bug reports and/or suggestions for improvement, please +;; send them via . + ;;; Code: (eval-when-compile (require 'cl)) @@ -182,7 +186,7 @@ Increase this value when unexpected error frequently occurs." :type 'number :group 'mixi) -(defcustom mixi-cache-expires 3600 +(defcustom mixi-cache-expires nil "*Seconds for expiration of a cached object." :type '(radio (integer :tag "Expired seconds") (const :tag "Don't expire" nil) @@ -198,8 +202,8 @@ Increase this value when unexpected error frequently occurs." (defvar mixi-me nil) ;; Utilities. -(defmacro mixi-message (string) - `(concat "[mixi] " ,string)) +(defmacro mixi-message (&rest strings) + `(concat "[mixi] " ,@strings)) (defconst mixi-message-adult-contents "¤³¤Î¥Ú¡¼¥¸¤«¤éÀè¤Ï¥¢¥À¥ë¥È¡ÊÀ®¿Í¸þ¤±¡Ë¥³¥ó¥Æ¥ó¥Ä¤¬´Þ¤Þ¤ì¤Æ¤¤¤Þ¤¹¡£
@@ -216,13 +220,14 @@ Increase this value when unexpected error frequently occurs." (defmacro mixi-retrieve (url &optional post-data) `(funcall mixi-retrieve-function ,url ,post-data)) -(defun mixi-retrieve-1 (buffer url &optional post-data) +(defun mixi-parse-buffer (url buffer &optional post-data) (when (string-match mixi-message-adult-contents buffer) (if mixi-accept-adult-contents (setq buffer (mixi-retrieve url "submit=agree")) (setq buffer (mixi-retrieve (concat url "?"))))) (when (string-match mixi-warning-continuously-accessing buffer) - (error (mixi-message "Continuously accessing"))) + (error (mixi-message "Access denied. Please wait a while and increase " + "the value of `mixi-continuously-access-interval'."))) (if (not (string-match mixi-message-continuously-accessing buffer)) buffer (message (mixi-message "Waiting for continuously accessing...")) @@ -249,20 +254,14 @@ Increase this value when unexpected error frequently occurs." (error (mixi-message "Cannot retrieve"))) (with-current-buffer buffer (goto-char (point-min)) - (if (re-search-forward "HTTP/[0-9.]+ 302 Moved" nil t) - (if (re-search-forward - (concat "Location: " mixi-url "\\(.+\\)") nil t) - (setq ret (mixi-url-retrieve (match-string 1) post-data)) - (setq ret (mixi-url-retrieve "/home.pl" post-data))) - (unless (re-search-forward "HTTP/[0-9.]+ 200 OK" nil t) - (error (mixi-message "Cannot retrieve"))) - (search-forward "\n\n") - (setq ret (decode-coding-string - (buffer-substring-no-properties (point) (point-max)) - mixi-coding-system)) - (kill-buffer buffer) - (setq ret (mixi-retrieve-1 ret url post-data)))) - ret)) + (while (looking-at "HTTP/[0-9]+\\.[0-9]+ [13][0-9][0-9]") + (delete-region (point) (re-search-forward "\r?\n\r?\n"))) + (unless (looking-at "HTTP/[0-9]+\\.[0-9]+ 200") + (error (mixi-message "Cannot retrieve"))) + (delete-region (point) (re-search-forward "\r?\n\r?\n")) + (setq ret (decode-coding-string (buffer-string) mixi-coding-system)) + (kill-buffer buffer) + (mixi-parse-buffer url ret post-data)))) (defun mixi-w3m-retrieve (url &optional post-data) "Retrieve the URL and return gotten strings." @@ -272,7 +271,7 @@ Increase this value when unexpected error frequently occurs." (error (mixi-message "Cannot retrieve")) (w3m-decode-buffer url) (let ((ret (buffer-substring-no-properties (point-min) (point-max)))) - (mixi-retrieve-1 ret url post-data)))))) + (mixi-parse-buffer url ret post-data)))))) (defun mixi-curl-retrieve (url &optional post-data) "Retrieve the URL and return gotten strings." @@ -308,7 +307,7 @@ Increase this value when unexpected error frequently occurs." (error (mixi-message "Cannot retrieve"))) (delete-region (point) (re-search-forward "\r?\n\r?\n")) (setq ret (decode-coding-string (buffer-string) mixi-coding-system)) - (mixi-retrieve-1 ret url post-data)))) + (mixi-parse-buffer url ret post-data)))) (defconst mixi-my-id-regexp "
³«ºÅÆü»þ¡§
" + "
" (mixi-event-date object) "
" + "
³«ºÅ¾ì½ê¡§
" + "
" (mixi-event-place object) "
" + "
¾ÜºÙ¡§
" + "
" (mixi-event-detail object) "
" + "
Ê罸´ü¸Â¡§
" + "
" limit "
" + "
»²²Ã¼Ô¡§
" + "
" (mixi-event-members object) "
"))) + (t + (let ((func (intern (concat mixi-object-prefix + (mixi-object-name object) "-content")))) + (funcall func object)))))) (defun mixi-object-set-timestamp (object timestamp) "Set the timestamp of OBJECT." @@ -879,18 +916,18 @@ Increase this value when unexpected error frequently occurs." (when (> (length args) 2) (signal 'wrong-number-of-arguments (list 'mixi-get-friends (length args)))) (let ((friend (nth 0 args)) - (max-numbers (nth 1 args))) - (when (or (not (mixi-friend-p friend)) (mixi-friend-p max-numbers)) + (range (nth 1 args))) + (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) (setq friend (nth 1 args)) - (setq max-numbers (nth 0 args))) + (setq range (nth 0 args))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let ((ids (mixi-get-matched-items (mixi-friend-list-page friend) - max-numbers - mixi-friend-list-id-regexp)) + mixi-friend-list-id-regexp + range)) (nicks (mixi-get-matched-items (mixi-friend-list-page friend) - max-numbers - mixi-friend-list-nick-regexp))) + mixi-friend-list-nick-regexp + range))) (let ((index 0) ret) (while (< index (length ids)) @@ -909,14 +946,14 @@ Increase this value when unexpected error frequently occurs." "̾  Á° \\(.+\\)") -(defun mixi-get-favorites (&optional max-numbers) +(defun mixi-get-favorites (&optional range) "Get favorites." (let ((ids (mixi-get-matched-items (mixi-favorite-list-page) - max-numbers - mixi-favorite-list-id-regexp)) + mixi-favorite-list-id-regexp + range)) (nicks (mixi-get-matched-items (mixi-favorite-list-page) - max-numbers - mixi-favorite-list-nick-regexp))) + mixi-favorite-list-nick-regexp + range))) (let ((index 0) ret) (while (< index (length ids)) @@ -951,11 +988,11 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-log-list-regexp "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\)
\\(.*\\)") -(defun mixi-get-logs (&optional max-numbers) +(defun mixi-get-logs (&optional range) "Get logs." (let ((items (mixi-get-matched-items (mixi-log-list-page) - max-numbers - mixi-log-list-regexp))) + mixi-log-list-regexp + range))) (mapcar (lambda (item) (mixi-make-log (mixi-make-friend (nth 5 item) (nth 6 item)) (encode-time 0 @@ -992,39 +1029,41 @@ Increase this value when unexpected error frequently occurs." `(concat "/view_diary.pl?id=" (mixi-diary-id ,diary) "&owner_id=" (mixi-friend-id (mixi-diary-owner ,diary)))) -;; FIXME: Remove `¤µ¤ó'. +(defconst mixi-diary-closed-regexp + "ͧ¿Í\\(¤Îͧ¿Í\\)?¤Þ¤Ç¸ø³«¤Î¤¿¤áÆɤळ¤È¤¬½ÐÍè¤Þ¤»¤ó¡£") (defconst mixi-diary-owner-nick-regexp - "\\(.+\\)\\(¤µ¤ó\\)?¤ÎÆüµ­") + "\\(.+?\\)\\(¤µ¤ó\\)?¤ÎÆüµ­") (defconst mixi-diary-time-regexp - "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü
\\([0-9]+\\):\\([0-9]+\\)") + "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü\\(
\\|
\\)\\([0-9]+\\):\\([0-9]+\\)") (defconst mixi-diary-title-regexp - " \\([^<]+\\)") + " \\([^<]+\\)") (defconst mixi-diary-content-regexp - "\\(.+\\)") + "\\(.*\\)") (defun mixi-diary-realize (diary) "Realize a DIARY." ;; FIXME: Check a expiration of cache? (unless (mixi-object-realize-p diary) (with-mixi-retrieve (mixi-diary-page diary) - (if (string-match mixi-diary-owner-nick-regexp buffer) - (mixi-friend-set-nick (mixi-diary-owner diary) - (match-string 1 buffer)) - (signal 'error (list 'cannot-find-owner-nick diary))) - (if (string-match mixi-diary-time-regexp buffer) - (mixi-diary-set-time - diary (encode-time 0 (string-to-number (match-string 5 buffer)) - (string-to-number (match-string 4 buffer)) - (string-to-number (match-string 3 buffer)) - (string-to-number (match-string 2 buffer)) - (string-to-number (match-string 1 buffer)))) - (signal 'error (list 'cannot-find-time diary))) - (if (string-match mixi-diary-title-regexp buffer) - (mixi-diary-set-title diary (match-string 1 buffer)) - (signal 'error (list 'cannot-find-title diary))) - (if (string-match mixi-diary-content-regexp buffer) - (mixi-diary-set-content diary (match-string 1 buffer)) - (signal 'error (list 'cannot-find-content diary)))) + (unless (string-match mixi-diary-closed-regexp buffer) + (if (string-match mixi-diary-owner-nick-regexp buffer) + (mixi-friend-set-nick (mixi-diary-owner diary) + (match-string 1 buffer)) + (signal 'error (list 'cannot-find-owner-nick diary))) + (if (string-match mixi-diary-time-regexp buffer) + (mixi-diary-set-time + diary (encode-time 0 (string-to-number (match-string 10 buffer)) + (string-to-number (match-string 9 buffer)) + (string-to-number (match-string 7 buffer)) + (string-to-number (match-string 6 buffer)) + (string-to-number (match-string 5 buffer)))) + (signal 'error (list 'cannot-find-time diary))) + (if (string-match mixi-diary-title-regexp buffer) + (mixi-diary-set-title diary (match-string 2 buffer)) + (signal 'error (list 'cannot-find-title diary))) + (if (string-match mixi-diary-content-regexp buffer) + (mixi-diary-set-content diary (match-string 2 buffer)) + (signal 'error (list 'cannot-find-content diary))))) (mixi-object-touch diary))) (defun mixi-diary-owner (diary) @@ -1091,15 +1130,15 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-number-of-arguments (list 'mixi-get-diaries (length args)))) (let ((friend (nth 0 args)) - (max-numbers (nth 1 args))) - (when (or (not (mixi-friend-p friend)) (mixi-friend-p max-numbers)) + (range (nth 1 args))) + (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) (setq friend (nth 1 args)) - (setq max-numbers (nth 0 args))) + (setq range (nth 0 args))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let ((items (mixi-get-matched-items (mixi-diary-list-page friend) - max-numbers - mixi-diary-list-regexp))) + mixi-diary-list-regexp + range))) (mapcar (lambda (item) (mixi-make-diary friend (nth 0 item))) items)))) @@ -1110,11 +1149,26 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-new-diary-list-regexp "") -(defun mixi-get-new-diaries (&optional max-numbers) +(defun mixi-get-new-diaries (&optional range) "Get new diaries." (let ((items (mixi-get-matched-items (mixi-new-diary-list-page) - max-numbers - mixi-new-diary-list-regexp))) + mixi-new-diary-list-regexp + range))) + (mapcar (lambda (item) + (mixi-make-diary (mixi-make-friend (nth 1 item)) (nth 0 item))) + items))) + +(defmacro mixi-search-diary-list-page (keyword) + `(concat "/search_diary.pl?page=%d&submit=search&keyword=" + (mixi-url-encode-and-quote-percent-string keyword))) + +(defconst mixi-search-diary-list-regexp + "") + +(defun mixi-search-diaries (keyword &optional range) + (let ((items (mixi-get-matched-items (mixi-search-diary-list-page keyword) + mixi-search-diary-list-regexp + range))) (mapcar (lambda (item) (mixi-make-diary (mixi-make-friend (nth 1 item)) (nth 0 item))) items))) @@ -1335,18 +1389,18 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-number-of-arguments (list 'mixi-get-communities (length args)))) (let ((friend (nth 0 args)) - (max-numbers (nth 1 args))) - (when (or (not (mixi-friend-p friend)) (mixi-friend-p max-numbers)) + (range (nth 1 args))) + (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) (setq friend (nth 1 args)) - (setq max-numbers (nth 0 args))) + (setq range (nth 0 args))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let ((ids (mixi-get-matched-items (mixi-community-list-page friend) - max-numbers - mixi-community-list-id-regexp)) + mixi-community-list-id-regexp + range)) (names (mixi-get-matched-items (mixi-community-list-page friend) - max-numbers - mixi-community-list-name-regexp))) + mixi-community-list-name-regexp + range))) (let ((index 0) ret) (while (< index (length ids)) @@ -1355,6 +1409,26 @@ Increase this value when unexpected error frequently occurs." (incf index)) (reverse ret))))) +(defmacro mixi-search-community-list-page (keyword) + `(concat "/search_community.pl?page=%d&&sort=date&type=com&submit=main" + "&keyword=" (mixi-url-encode-and-quote-percent-string keyword) + "&category_id=0")) + +(defconst mixi-search-community-list-regexp + " +¥³¥ß¥å¥Ë¥Æ¥£Ì¾ +\\([^<]+\\)") + +;; FIXME: Support category. +(defun mixi-search-communities (keyword &optional range) + (let ((items (mixi-get-matched-items (mixi-search-community-list-page + keyword) + mixi-search-community-list-regexp + range))) + (mapcar (lambda (item) + (mixi-make-community (nth 0 item) (nth 1 item))) + items))) + ;; Topic object. (defvar mixi-topic-cache (make-hash-table :test 'equal)) (defun mixi-make-topic (community id) @@ -1384,11 +1458,10 @@ Increase this value when unexpected error frequently occurs." "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü
\\([0-9]+\\):\\([0-9]+\\)") (defconst mixi-topic-title-regexp " \\([^<]+\\)") -;; FIXME: Remove `¤µ¤ó'. (defconst mixi-topic-owner-regexp - "  \\(.*\\)\\(¤µ¤ó\\)?") + "  \\(.*?\\)\\(¤µ¤ó\\)?") (defconst mixi-topic-content-regexp - "\\(.+\\)?\n?\\(.+\\)?\n?\\(.+\\)?\n?
\\(.+\\)") + "
\\(\n\\)*
\\(.+\\)
") (defun mixi-topic-realize (topic) "Realize a TOPIC." @@ -1412,7 +1485,7 @@ Increase this value when unexpected error frequently occurs." (match-string 2 buffer))) (signal 'error (list 'cannot-find-owner topic))) (if (string-match mixi-topic-content-regexp buffer) - (mixi-topic-set-content topic (match-string 4 buffer)) + (mixi-topic-set-content topic (match-string 2 buffer)) (signal 'error (list 'cannot-find-content topic)))) (mixi-object-touch topic))) @@ -1482,38 +1555,290 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-type-argument (list 'mixi-topic-p topic))) (aset (cdr topic) 6 content)) -(defmacro mixi-topic-list-page (community) +;; Event object. +(defvar mixi-event-cache (make-hash-table :test 'equal)) +(defun mixi-make-event (community id) + "Return a event object." + (mixi-make-cache (list (mixi-community-id community) id) + (cons 'mixi-event (vector nil community id nil nil nil nil + nil nil nil nil)) + mixi-event-cache)) + +(defconst mixi-event-url-regexp + "/view_event\\.pl\\?id=\\([0-9]+\\)\\(&comment_count=[0-9]+\\)?&comm_id=\\([0-9]+\\)") + +(defun mixi-make-event-from-url (url) + "Return a event object from URL." + (when (string-match mixi-event-url-regexp url) + (let ((id (match-string 1 url)) + (community-id (match-string 3 url))) + (mixi-make-event (mixi-make-community community-id) id)))) + +(defmacro mixi-event-p (event) + `(eq (mixi-object-class ,event) 'mixi-event)) + +(defmacro mixi-event-page (event) + `(concat "/view_event.pl?id=" (mixi-event-id ,event) + "&comm_id=" (mixi-community-id (mixi-event-community ,event)))) + +(defconst mixi-event-time-regexp + " +\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü
+\\([0-9]+\\):\\([0-9]+\\)") +(defconst mixi-event-title-regexp + " \\([^<]+\\)") +(defconst mixi-event-owner-regexp + " \\(.*\\)") +(defconst mixi-event-date-regexp + "³«ºÅÆü»þ + + \\(.+\\) +") +(defconst mixi-event-place-regexp + "³«ºÅ¾ì½ê + + \\(.+\\) +") +(defconst mixi-event-detail-regexp + "¾ÜºÙ +
\\(.+\\)
") +(defconst mixi-event-limit-regexp + "Ê罸´ü¸Â + \\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü") +(defconst mixi-event-members-regexp + "»²²Ã¼Ô + + + +") + +(defun mixi-event-realize (event) + "Realize a EVENT." + ;; FIXME: Check a expiration of cache? + (unless (mixi-object-realize-p event) + (with-mixi-retrieve (mixi-event-page event) + (if (string-match mixi-event-time-regexp buffer) + (mixi-event-set-time + event (encode-time 0 (string-to-number (match-string 5 buffer)) + (string-to-number (match-string 4 buffer)) + (string-to-number (match-string 3 buffer)) + (string-to-number (match-string 2 buffer)) + (string-to-number (match-string 1 buffer)))) + (signal 'error (list 'cannot-find-time event))) + (if (string-match mixi-event-title-regexp buffer) + (mixi-event-set-title event (match-string 1 buffer)) + (signal 'error (list 'cannot-find-title event))) + (if (string-match mixi-event-owner-regexp buffer) + (mixi-event-set-owner event + (mixi-make-friend (match-string 1 buffer) + (match-string 2 buffer))) + (signal 'error (list 'cannot-find-owner event))) + (if (string-match mixi-event-date-regexp buffer) + (mixi-event-set-date event (match-string 1 buffer)) + (signal 'error (list 'cannot-find-date event))) + (if (string-match mixi-event-place-regexp buffer) + (mixi-event-set-place event (match-string 1 buffer)) + (signal 'error (list 'cannot-find-place event))) + (if (string-match mixi-event-detail-regexp buffer) + (mixi-event-set-detail event (match-string 1 buffer)) + (signal 'error (list 'cannot-find-detail event))) + (when (string-match mixi-event-limit-regexp buffer) + (mixi-event-set-limit + event (encode-time 0 0 0 (string-to-number (match-string 3 buffer)) + (string-to-number (match-string 2 buffer)) + (string-to-number (match-string 1 buffer))))) + (if (string-match mixi-event-members-regexp buffer) + (mixi-event-set-members event (match-string 1 buffer)) + (signal 'error (list 'cannot-find-members event)))) + (mixi-object-touch event))) + +(defun mixi-event-community (event) + "Return the community of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aref (cdr event) 1)) + +(defun mixi-event-id (event) + "Return the id of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aref (cdr event) 2)) + +(defun mixi-event-time (event) + "Return the time of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 3)) + +(defun mixi-event-title (event) + "Return the title of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 4)) + +(defun mixi-event-owner (event) + "Return the owner of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 5)) + +(defun mixi-event-date (event) + "Return the date of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 6)) + +(defun mixi-event-place (event) + "Return the place of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 7)) + +(defun mixi-event-detail (event) + "Return the detail of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 8)) + +(defun mixi-event-limit (event) + "Return the limit of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 9)) + +(defun mixi-event-members (event) + "Return the members of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (mixi-event-realize event) + (aref (cdr event) 10)) + +(defun mixi-event-set-time (event time) + "Set the time of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 3 time)) + +(defun mixi-event-set-title (event title) + "Set the title of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 4 title)) + +(defun mixi-event-set-owner (event owner) + "Set the owner of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (unless (mixi-friend-p owner) + (signal 'wrong-type-argument (list 'mixi-friend-p owner))) + (aset (cdr event) 5 owner)) + +(defun mixi-event-set-date (event date) + "Set the date of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 6 date)) + +(defun mixi-event-set-place (event place) + "Set the place of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 7 place)) + +(defun mixi-event-set-detail (event detail) + "Set the detail of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 8 detail)) + +(defun mixi-event-set-limit (event limit) + "Set the limit of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 9 limit)) + +(defun mixi-event-set-members (event members) + "Set the members of EVENT." + (unless (mixi-event-p event) + (signal 'wrong-type-argument (list 'mixi-event-p event))) + (aset (cdr event) 10 members)) + +;; Bbs object. +(defalias 'mixi-bbs-owner 'mixi-object-owner) +(defalias 'mixi-bbs-id 'mixi-object-id) +(defalias 'mixi-bbs-time 'mixi-object-time) +(defalias 'mixi-bbs-title 'mixi-object-title) +(defalias 'mixi-bbs-content 'mixi-object-content) + +(defmacro mixi-bbs-list-page (community) `(concat "/list_bbs.pl?page=%d" "&id=" (mixi-community-id ,community))) -(defconst mixi-topic-list-regexp - "") +(defconst mixi-new-bbs-list-regexp + "") -(defun mixi-get-new-topics (&optional max-numbers) +(defun mixi-get-new-bbses (&optional range) "Get new topics." - (let ((items (mixi-get-matched-items (mixi-new-topic-list-page) - max-numbers - mixi-new-topic-list-regexp))) + (let ((items (mixi-get-matched-items (mixi-new-bbs-list-page) + mixi-new-bbs-list-regexp + range))) (mapcar (lambda (item) - (mixi-make-topic (mixi-make-community (nth 1 item)) - (nth 0 item))) + (let ((name (nth 0 item))) + (when (string= name "bbs") + (setq name "topic")) + (let ((func (intern (concat "mixi-make-" name)))) + (funcall func (mixi-make-community (nth 2 item)) + (nth 1 item))))) + items))) + +(defmacro mixi-search-bbs-list-page (keyword) + `(concat "/search_topic.pl?page=%d&type=top&submit=search" + "&keyword=" (mixi-url-encode-and-quote-percent-string keyword) + "&community_id=0&category_id=0")) + +(defconst mixi-search-bbs-list-regexp + "¾ÜºÙ¤ò¸«¤ë") + +;; FIXME: Support community and category. +(defun mixi-search-bbses (keyword &optional range) + (let ((items (mixi-get-matched-items (mixi-search-bbs-list-page keyword) + mixi-search-bbs-list-regexp + range))) + (mapcar (lambda (item) + (let ((name (nth 0 item))) + (when (string= name "bbs") + (setq name "topic")) + (let ((func (intern (concat "mixi-make-" name)))) + (funcall func (mixi-make-community (nth 2 item)) + (nth 1 item))))) items))) ;; Comment object. @@ -1549,7 +1874,7 @@ Increase this value when unexpected error frequently occurs." (aref (cdr comment) 3)) (defun mixi-diary-comment-list-page (diary) - (concat "/view_diary.pl?page=%d" + (concat "/view_diary.pl?full=1" "&id=" (mixi-diary-id diary) "&owner_id=" (mixi-friend-id (mixi-diary-owner diary)))) @@ -1602,6 +1927,7 @@ Increase this value when unexpected error frequently occurs." ?\\( +\\|ºï½ü \\|\\) @@ -1617,7 +1943,33 @@ Increase this value when unexpected error frequently occurs." ") -(defun mixi-get-comments (parent &optional max-numbers) +(defun mixi-event-comment-list-page (event) + (concat "/view_event.pl?page=all" + "&id=" (mixi-event-id event) + "&comm_id=" (mixi-community-id (mixi-event-community event)))) + +;; FIXME: Split regexp to time, owner(id and nick) and contents. +(defconst mixi-event-comment-list-regexp + " +\\) +\\( + +\\(\\) + +") + +(defun mixi-get-comments (parent &optional range) "Get comments of PARENT." (unless (mixi-object-p parent) (signal 'wrong-type-argument (list 'mixi-object-p parent))) @@ -1627,7 +1979,16 @@ Increase this value when unexpected error frequently occurs." (regexp (eval (intern (concat mixi-object-prefix name "-comment-list-regexp"))))) (let ((items (mixi-get-matched-items - (funcall list-page parent) max-numbers regexp))) + (funcall list-page parent) regexp))) + (let (list) + (catch 'stop + (mapc (lambda (item) + (when (and (numberp range) + (>= (length list) range)) + (throw 'stop nil)) + (setq list (cons item list))) + (reverse items))) + (setq items (reverse list))) (mapcar (lambda (item) (mixi-make-comment parent (mixi-make-friend (nth 7 item) (nth 8 item)) @@ -1647,13 +2008,12 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-new-comment-list-regexp "") -(defun mixi-get-new-comments (&optional max-numbers) +(defun mixi-get-new-comments (&optional range) "Get new comments." (let ((items (mixi-get-matched-items (mixi-new-comment-list-page) - max-numbers - mixi-new-comment-list-regexp))) + mixi-new-comment-list-regexp + range))) (mapcar (lambda (item) - ;; FIXME: Return comments? (mixi-make-diary (mixi-make-friend (nth 1 item)) (nth 0 item))) items))) @@ -1805,16 +2165,16 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-number-of-arguments (list 'mixi-get-messages (length args)))) (let ((box (nth 0 args)) - (max-numbers (nth 1 args))) + (range (nth 1 args))) (when (or (not (mixi-message-box-p box)) - (mixi-message-box-p max-numbers)) + (mixi-message-box-p range)) (setq box (nth 1 args)) - (setq max-numbers (nth 0 args))) + (setq range (nth 0 args))) (let ((items (mixi-get-matched-items (mixi-message-list-page (when box (mixi-message-box-name box))) - max-numbers - mixi-message-list-regexp))) + mixi-message-list-regexp + range))) (mapcar (lambda (item) (mixi-make-message (nth 0 item) (nth 1 item))) items)))) @@ -1896,17 +2256,17 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-number-of-arguments (list 'mixi-get-introduction (length args)))) (let ((friend (nth 0 args)) - (max-numbers (nth 1 args))) - (when (or (not (mixi-friend-p friend)) (mixi-friend-p max-numbers)) + (range (nth 1 args))) + (when (or (not (mixi-friend-p friend)) (mixi-friend-p range)) (setq friend (nth 1 args)) - (setq max-numbers (nth 0 args))) + (setq range (nth 0 args))) (unless (or (null friend) (mixi-friend-p friend)) (signal 'wrong-type-argument (list 'mixi-friend-p friend))) (let* ((regexp (if friend mixi-introduction-list-regexp mixi-my-introduction-list-regexp)) (items (mixi-get-matched-items (mixi-introduction-list-page friend) - max-numbers - regexp))) + regexp + range))) (mapcar (lambda (item) (mixi-make-introduction (or friend (mixi-make-me)) (mixi-make-friend (nth 0 item) diff --git a/sb-mixi.el b/sb-mixi.el index 1920942..ef388d5 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -24,53 +24,82 @@ ;;; Commentary: +;; If you have bug reports and/or suggestions for improvement, please +;; send them via . + ;;; Code: (require 'mixi) (require 'shimbun) -(luna-define-class shimbun-mixi (shimbun) ()) +(eval-and-compile + (luna-define-class shimbun-mixi (shimbun) (comment-cache)) + (luna-define-internal-accessors 'shimbun-mixi)) (defcustom shimbun-mixi-group-alist '(("new-diaries" . mixi-get-new-diaries) ("new-comments" . mixi-get-new-comments) - ("new-topics" . mixi-get-new-topics) + ("new-bbses" . mixi-get-new-bbses) ("messages" . mixi-get-messages) ("my-diaries" . "/home.pl")) "*An alist of mixi shimbun group definition. Each element looks like (NAME . URL) or (NAME . FUNCTION). NAME is a shimbun group name. URL is the URL for mixi access point of the group. When URL is friend's, get -his/her diaries as article. When community's, get its topics. When diary's -or topic's, get its comments. -FUNCTION is the function for getting articles." +his/her diaries as article. When community's, get its BBSes. When diary's +or BBS's, get its comments. +FUNCTION is the function which has one `range' argument and returns the list +of mixi object." :group 'shimbun :type '(repeat (cons :fromat "%v" (string :tag "Group name") (radio (string :tag "URL") (const :tag "New diaries" mixi-get-new-diaries) (const :tag "New comments" mixi-get-new-comments) - (const :tag "New topics" mixi-get-new-topics) + (const :tag "New BBSes" mixi-get-new-bbses) (const :tag "Messages" mixi-get-messages) (function :tag "Other function"))))) +;; FIXME: Don't use this user option. (defcustom shimbun-mixi-page-articles 10 "*How many articles are there in one page." :group 'shimbun :type 'integer) (defcustom shimbun-mixi-get-comment-p t - "*If non-nil, get diaries or topics together with its comments." + "*If non-nil, get diaries or BBSes together with its comments." + :group 'shimbun + :type 'boolean) + +(defcustom shimbun-mixi-logout-p nil + "*If non-ni, Logout from mixi when shimbun server was closed." :group 'shimbun :type 'boolean) +(defvar shimbun-mixi-x-face-alist + '(("default" . "X-Face: CY;j#FoBnpK^37`-IoJvN!J^u;GciiPmMQ@T)~RP1]t8iv?v)/bVI:I\"F!JfWJvhM5{zY!= + h.d+'g\\I{D>Ocy?Rc4uYUyOZj2%2Kl>,x-!MCSsyi3!L}psrrC1jlF,O?Ui>qf)X;sBz`/}\\066X%$ + siG'|4K!2?==|oB&#E'5GGH\\#z[muyQ"))) + +(luna-define-method initialize-instance :after ((shimbun shimbun-mixi) + &rest init-args) + (shimbun-mixi-set-comment-cache-internal shimbun + (make-hash-table :test 'equal)) + shimbun) + +(luna-define-method shimbun-close :after ((shimbun shimbun-mixi)) + (shimbun-mixi-set-comment-cache-internal shimbun nil) + (when shimbun-mixi-logout-p + (mixi-logout))) + (luna-define-method shimbun-groups ((shimbun shimbun-mixi)) (mapcar 'car shimbun-mixi-group-alist)) (defun shimbun-mixi-make-subject (object) (let ((class (mixi-object-class object))) - (if (eq class 'mixi-comment) - (concat "Re: " (mixi-object-title (mixi-comment-parent object))) - (mixi-object-title object)))) + (cond ((eq class 'mixi-comment) + (concat "Re: " (shimbun-mixi-make-subject + (mixi-comment-parent object)))) + (t (mixi-object-title object))))) (defun shimbun-mixi-make-from (object) (let ((owner (mixi-object-owner object))) @@ -106,12 +135,17 @@ FUNCTION is the function for getting articles." (mixi-expand-url (mixi-diary-page object))) ((eq class 'mixi-topic) (mixi-expand-url (mixi-topic-page object))) + ((eq class 'mixi-event) + (mixi-expand-url (mixi-event-page object))) ((eq class 'mixi-comment) (concat (shimbun-mixi-make-xref (mixi-comment-parent object)) "#comment")) ((eq class 'mixi-message) (mixi-expand-url (mixi-message-page object)))))) +(defun shimbun-mixi-make-body (object) + (mixi-object-content object)) + (defun shimbun-mixi-get-headers (shimbun objects &optional range) (when objects (let (headers) @@ -120,9 +154,6 @@ FUNCTION is the function for getting articles." (when (mixi-object-p object) (let ((class (mixi-object-class object)) (id (shimbun-mixi-make-message-id object))) - (when (and (eq class 'mixi-comment) - (shimbun-search-id shimbun id)) - (throw 'stop nil)) (push (shimbun-create-header 0 @@ -139,12 +170,17 @@ FUNCTION is the function for getting articles." headers) (when (and shimbun-mixi-get-comment-p (or (eq class 'mixi-diary) - (eq class 'mixi-topic))) + (eq class 'mixi-topic) + (eq class 'mixi-event))) (let ((comments (mixi-get-comments object range))) (mapc (lambda (header) (push header headers)) (shimbun-mixi-get-headers shimbun - comments))))))) + comments)))) + (when (eq class 'mixi-comment) + (puthash id (mixi-comment-content object) + (shimbun-mixi-comment-cache-internal + shimbun)))))) objects)) headers))) @@ -160,29 +196,31 @@ FUNCTION is the function for getting articles." (cond ((eq class 'mixi-friend) (setq objects (mixi-get-diaries object range))) ((eq class 'mixi-community) - (setq objects (mixi-get-topics object range))) - ((or (eq class 'mixi-diary) (eq class 'mixi-topic)) + (setq objects (mixi-get-bbses object range))) + ((or (eq class 'mixi-diary) + (eq class 'mixi-topic) + (eq class 'mixi-event)) (setq objects (mixi-get-comments object range))) (t (error (concat (symbol-name class) " is not supported yet."))))) (setq objects (funcall url-or-function range))) (shimbun-sort-headers (shimbun-mixi-get-headers shimbun objects range)))) -(defun shimbun-comment-article (url header) - (let ((parent (mixi-make-object-from-url url)) - (date (shimbun-header-date header)) - (message-id (shimbun-header-id header))) - (catch 'found - (mapc (lambda (comment) - (let ((id (mixi-friend-id (mixi-comment-owner comment))) - (time (shimbun-mixi-make-date comment))) - (when (and (string= time date) - (string-match (concat "^<[0-9]+\\." id "@") - message-id)) - ;; FIXME: Concat parent's information? - (throw 'found (mixi-comment-content comment))))) - ;; FIXME: Limit range? - (mixi-get-comments parent))))) +(defun shimbun-comment-article (url shimbun header) + (let* ((message-id (shimbun-header-id header)) + (cache (shimbun-mixi-comment-cache-internal shimbun)) + (article (gethash message-id cache))) + (unless (stringp article) + (let ((parent (mixi-make-object-from-url url))) + (mapc (lambda (comment) + (let ((id (shimbun-mixi-make-message-id comment)) + ;; FIXME: Concat parent's information? + (content (mixi-comment-content comment))) + (puthash id content cache) + (when (string= id message-id) + (setq article content)))) + (mixi-get-comments parent)))) + article)) (luna-define-method shimbun-article ((shimbun shimbun-mixi) header &optional outbuf) @@ -192,9 +230,9 @@ FUNCTION is the function for getting articles." (or (with-temp-buffer (let* ((url (shimbun-article-url shimbun header)) (article (if (string-match "#comment$" url) - (shimbun-comment-article url header) + (shimbun-comment-article url shimbun header) ;; FIXME: Concat community information? - (mixi-object-content + (shimbun-mixi-make-body (mixi-make-object-from-url url))))) (when (stringp article) (insert article)))
 \\(.+\\)
+\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü
+\\([0-9]+\\):\\([0-9]+\\)
+\\(
\\) +[^<]+ : +\\(.*\\) + +
+ + +
\\(.+\\)
+