From: bg66 Date: Sat, 3 Nov 2007 06:39:40 +0000 (+0000) Subject: * mixi.el (mixi-make-comment): Add the COUNT slot. X-Git-Tag: mixi-el-1_1_0~5 X-Git-Url: http://git.chise.org/gitweb/?p=elisp%2Fmixi.git;a=commitdiff_plain;h=05e05dfae73f5fdcfb1e6b198d1028176c1df3b3 * mixi.el (mixi-make-comment): Add the COUNT slot. (mixi-comment-count): New function. (mixi-topic-comment-list-regexp): Fix regexp. (mixi-event-comment-list-regexp): Ditto. (mixi-get-comments): Follow the change above. * mixi-utils.el (mixi-make-author): Add the ADD-COMMENT-COUNT argument. * sb-mixi.el (shimbun-mixi-add-comment-count-to-author): New user option. (shimbun-mixi-get-headers): Use it. --- diff --git a/ChangeLog b/ChangeLog index adb6f3b..b66d3af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-11-03 OHASHI Akira + + * mixi.el (mixi-make-comment): Add the COUNT slot. + (mixi-comment-count): New function. + (mixi-topic-comment-list-regexp): Fix regexp. + (mixi-event-comment-list-regexp): Ditto. + (mixi-get-comments): Follow the change above. + * mixi-utils.el (mixi-make-author): Add the ADD-COMMENT-COUNT argument. + * sb-mixi.el (shimbun-mixi-add-comment-count-to-author): New user + option. + (shimbun-mixi-get-headers): Use it. + 2007-10-29 OHASHI Akira * mixi.el (mixi-community-name-regexp): Follow the change of mixi. diff --git a/mixi-ja.texi b/mixi-ja.texi index cd44a83..706ec7d 100755 --- a/mixi-ja.texi +++ b/mixi-ja.texi @@ -577,6 +577,10 @@ comment $B%*%V%8%'%/%H$N3FpJs$r\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\) + "
\\(\\|\\) +\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\)
\\(.*\\)
@@ -2312,7 +2319,8 @@ Increase this value when unexpected error frequently occurs." ;; FIXME: Split regexp to time, owner(id and nick) and contents. (defconst mixi-event-comment-list-regexp - "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\) + "
\\(\\|\\) +\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\)
\\(.*\\)
@@ -2336,7 +2344,8 @@ Increase this value when unexpected error frequently occurs." (setq page nil)) (let ((items (mixi-get-matched-items page regexp range t))) (mapcar (lambda (item) - (let (owner-id owner-nick year month day hour minute content) + (let (owner-id owner-nick year month day hour minute content + count) (if (eq (mixi-object-class parent) 'mixi-diary) (progn (setq owner-id (nth 1 item)) @@ -2347,14 +2356,15 @@ Increase this value when unexpected error frequently occurs." (setq hour (nth 7 item)) (setq minute (nth 8 item)) (setq content (nth 9 item))) - (setq owner-id (nth 5 item)) - (setq owner-nick (nth 6 item)) - (setq year (nth 0 item)) - (setq month (nth 1 item)) - (setq day (nth 2 item)) - (setq hour (nth 3 item)) - (setq minute (nth 4 item)) - (setq content (nth 7 item))) + (setq owner-id (nth 8 item)) + (setq owner-nick (nth 9 item)) + (setq year (nth 3 item)) + (setq month (nth 4 item)) + (setq day (nth 5 item)) + (setq hour (nth 6 item)) + (setq minute (nth 7 item)) + (setq content (nth 10 item)) + (setq count (nth 1 item))) (mixi-make-comment parent (mixi-make-friend owner-id owner-nick) (encode-time @@ -2364,7 +2374,7 @@ Increase this value when unexpected error frequently occurs." (string-to-number day) (string-to-number month) (string-to-number year)) - content))) + content count))) items)))) (defmacro mixi-new-comment-list-page () diff --git a/sb-mixi.el b/sb-mixi.el index 56375ed..0b2feb0 100644 --- a/sb-mixi.el +++ b/sb-mixi.el @@ -33,7 +33,7 @@ (require 'mixi-utils) (require 'shimbun) -(defconst shimbun-mixi-revision "$Revision: 1.59 $") +(defconst shimbun-mixi-revision "$Revision: 1.60 $") (eval-and-compile (luna-define-class shimbun-mixi (shimbun) (comment-cache)) @@ -121,6 +121,11 @@ of mixi object." :group 'shimbun :type 'boolean) +(defcustom shimbun-mixi-add-comment-count-to-author t + "*If non-nil, add comment count to author." + :group 'shimbun + :type 'boolean) + ;; FIXME: Don't use this user option. (defcustom shimbun-mixi-page-articles 10 "*How many articles are there in one page." @@ -181,7 +186,7 @@ of mixi object." "^new-" (shimbun-current-group-internal shimbun))) - (mixi-make-author object) + (mixi-make-author object shimbun-mixi-add-comment-count-to-author) (mixi-make-date object) id (if (eq class 'mixi-comment)