From: bg66 Date: Fri, 12 Jan 2007 06:12:30 +0000 (+0000) Subject: * mixi.el (mixi-bbs-list-regexp): Fix regexp. X-Git-Tag: mixi-el-1_0_0~113 X-Git-Url: http://git.chise.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=07c11cd4db850f0f9faf2d084c2c28e27a61f7c0;p=elisp%2Fmixi.git * mixi.el (mixi-bbs-list-regexp): Fix regexp. (mixi-get-bbses): Follow the change above. (mixi-topic-time): Ditto. (mixi-topic-title): Ditto. (mixi-event-time): Ditto. (mixi-event-title): Ditto. (mixi-new-bbs-list-regexp): Fix regexp. (mixi-get-new-bbses): Follow the change above. (mixi-search-diary-list-page): Fix typo. (mixi-search-community-list-page): Ditto. (mixi-search-bbs-list-page): Ditto. --- diff --git a/ChangeLog b/ChangeLog index 91cae92..76c0919 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,19 @@ 2007-01-12 OHASHI Akira + * mixi.el (mixi-bbs-list-regexp): Fix regexp. + (mixi-get-bbses): Follow the change above. + (mixi-topic-time): Ditto. + (mixi-topic-title): Ditto. + (mixi-event-time): Ditto. + (mixi-event-title): Ditto. + (mixi-new-bbs-list-regexp): Fix regexp. + (mixi-get-new-bbses): Follow the change above. + (mixi-search-diary-list-page): Fix typo. + (mixi-search-community-list-page): Ditto. + (mixi-search-bbs-list-page): Ditto. + +2007-01-12 OHASHI Akira + * mixi.el (mixi-diary-list-regexp): Fix regexp. (mixi-get-diaries): Follow the change above. (mixi-diary-time): Ditto. diff --git a/mixi.el b/mixi.el index 898059c..0d8d0c1 100644 --- a/mixi.el +++ b/mixi.el @@ -1283,7 +1283,7 @@ Increase this value when unexpected error frequently occurs." (defmacro mixi-search-diary-list-page (keyword) `(concat "/search_diary.pl?page=%d&submit=search&keyword=" - (mixi-url-encode-and-quote-percent-string keyword))) + (mixi-url-encode-and-quote-percent-string ,keyword))) (defconst mixi-search-diary-list-regexp "̾  Á° @@ -1610,7 +1610,7 @@ Increase this value when unexpected error frequently occurs." (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) + "&keyword=" (mixi-url-encode-and-quote-percent-string ,keyword) "&category_id=0")) (defconst mixi-search-community-list-regexp @@ -1711,14 +1711,16 @@ Increase this value when unexpected error frequently occurs." "Return the time of TOPIC." (unless (mixi-topic-p topic) (signal 'wrong-type-argument (list 'mixi-topic-p topic))) - (mixi-realize-topic topic) + (unless (aref (cdr topic) 3) + (mixi-realize-topic topic)) (aref (cdr topic) 3)) (defun mixi-topic-title (topic) "Return the title of TOPIC." (unless (mixi-topic-p topic) (signal 'wrong-type-argument (list 'mixi-topic-p topic))) - (mixi-realize-topic topic) + (unless (aref (cdr topic) 4) + (mixi-realize-topic topic)) (aref (cdr topic) 4)) (defun mixi-topic-owner (topic) @@ -1918,14 +1920,16 @@ Increase this value when unexpected error frequently occurs." "Return the time of EVENT." (unless (mixi-event-p event) (signal 'wrong-type-argument (list 'mixi-event-p event))) - (mixi-realize-event event) + (unless (aref (cdr event) 3) + (mixi-realize-event 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-realize-event event) + (unless (aref (cdr event) 4) + (mixi-realize-event event)) (aref (cdr event) 4)) (defun mixi-event-owner (event) @@ -2046,7 +2050,9 @@ Increase this value when unexpected error frequently occurs." "&id=" (mixi-community-id ,community))) (defconst mixi-bbs-list-regexp - " +\\([0-9]+\\)·î\\([0-9]+\\)Æü
\\([0-9]+\\):\\([0-9]+\\) + 
\\(.+\\)") (defun mixi-get-bbses (community &optional range) "Get bbese of COMMUNITY." @@ -2054,20 +2060,38 @@ Increase this value when unexpected error frequently occurs." (signal 'wrong-type-argument (list 'mixi-community-p community))) (let ((items (mixi-get-matched-items (mixi-bbs-list-page community) mixi-bbs-list-regexp - range))) + range)) + (year (nth 5 (decode-time (current-time)))) + (month (nth 4 (decode-time (current-time))))) (mapcar (lambda (item) - (let ((name (nth 0 item))) + (let ((name (nth 4 item)) + (month-of-item (string-to-number (nth 0 item))) + (title (nth 6 item))) (when (string= name "bbs") (setq name "topic")) + (when (> month-of-item month) + (decf year)) + (setq month month-of-item) + (when (string-match "^\\[¥¤¥Ù¥ó¥È\\]\\(.+\\)" title) + (setq title (match-string 1 title))) (let ((func (intern (concat "mixi-make-" name)))) - (funcall func community (nth 1 item))))) + (funcall func community (nth 5 item) + (encode-time + 0 (string-to-number (nth 3 item)) + (string-to-number (nth 2 item)) + (string-to-number (nth 1 item)) + month year) + title)))) items))) (defmacro mixi-new-bbs-list-page () `(concat "/new_bbs.pl?page=%d")) (defconst mixi-new-bbs-list-regexp - "") + "\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü \\([0-9]+\\):\\([0-9]+\\) + +\\(.+\\) ([0-9]+) (\\(.+\\)) +") (defun mixi-get-new-bbses (&optional range) "Get new topics." @@ -2075,17 +2099,28 @@ Increase this value when unexpected error frequently occurs." mixi-new-bbs-list-regexp range))) (mapcar (lambda (item) - (let ((name (nth 0 item))) + (let ((name (nth 5 item)) + (title (nth 8 item))) (when (string= name "bbs") (setq name "topic")) + (when (string-match "^\\[¥¤¥Ù¥ó¥È\\]\\(.+\\)" title) + (setq title (match-string 1 title))) (let ((func (intern (concat "mixi-make-" name)))) - (funcall func (mixi-make-community (nth 2 item)) - (nth 1 item))))) + (funcall func (mixi-make-community + (nth 7 item) (nth 9 item)) + (nth 6 item) + (encode-time + 0 (string-to-number (nth 4 item)) + (string-to-number (nth 3 item)) + (string-to-number (nth 2 item)) + (string-to-number (nth 1 item)) + (string-to-number (nth 0 item))) + title)))) 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) + "&keyword=" (mixi-url-encode-and-quote-percent-string ,keyword) "&community_id=0&category_id=0")) (defconst mixi-search-bbs-list-regexp