From: bg66 Date: Thu, 22 Mar 2007 08:40:33 +0000 (+0000) Subject: (mixi-community-name-regexp): Fix regexp. X-Git-Tag: mixi-el-1_0_0~46 X-Git-Url: http://git.chise.org/gitweb/?a=commitdiff_plain;h=69b11a1b3e8a4bb31c56cb69482db8d7bbf3cbb7;p=elisp%2Fmixi.git (mixi-community-name-regexp): Fix regexp. (mixi-community-birthday-regexp): Ditto. (mixi-community-owner-regexp): Ditto. (mixi-community-category-regexp): Ditto. (mixi-community-members-regexp): Ditto. (mixi-community-open-level-regexp): Ditto. (mixi-community-authority-regexp): Ditto. (mixi-community-description-regexp): Ditto. (mixi-realize-community): Follow the change above. --- diff --git a/ChangeLog b/ChangeLog index 8a9876d..0b7e37e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2007-03-22 OHASHI Akira + + * mixi.el (mixi-community-name-regexp): Fix regexp. + (mixi-community-birthday-regexp): Ditto. + (mixi-community-owner-regexp): Ditto. + (mixi-community-category-regexp): Ditto. + (mixi-community-members-regexp): Ditto. + (mixi-community-open-level-regexp): Ditto. + (mixi-community-authority-regexp): Ditto. + (mixi-community-description-regexp): Ditto. + (mixi-realize-community): Follow the change above. + 2007-03-19 OHASHI Akira * mixi.el (mixi-diary-content-regexp): Fix regexp. diff --git a/mixi.el b/mixi.el index bd30e30..762f0f5 100644 --- a/mixi.el +++ b/mixi.el @@ -1438,71 +1438,73 @@ Increase this value when unexpected error frequently occurs." (defconst mixi-community-nodata-regexp "^¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó") (defconst mixi-community-name-regexp - "\\(.*\\)") + "\\(.*\\)") (defconst mixi-community-birthday-regexp - "³«ÀßÆü -\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü") + "³«ÀßÆü +\\([0-9]+\\)ǯ\\([0-9]+\\)·î\\([0-9]+\\)Æü") ;; FIXME: Care when the owner has seceded. (defconst mixi-community-owner-regexp - "´ÉÍý¿Í - + "´ÉÍý¿Í + -") + " +") (defconst mixi-community-members-regexp - " -") + " +") (defconst mixi-community-open-level-regexp - " -") + " +") (defconst mixi-community-authority-regexp - " -") + " +") (defconst mixi-community-description-regexp - "") + "") (defun mixi-realize-community (community) "Realize a COMMUNITY." ;; FIXME: Check a expiration of cache? (unless (mixi-object-realized-p community) (with-mixi-retrieve (mixi-community-page community) - (if (re-search-forward mixi-community-nodata-regexp nil t) - ;; FIXME: Set all members? - (mixi-community-set-name community "¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó") - (if (re-search-forward mixi-community-name-regexp nil t) - (mixi-community-set-name community (match-string 1)) - (mixi-realization-error 'cannot-find-name community)) - (if (re-search-forward mixi-community-birthday-regexp nil t) - (mixi-community-set-birthday - community (encode-time 0 0 0 (string-to-number (match-string 3)) - (string-to-number (match-string 2)) - (string-to-number (match-string 1)))) - (mixi-realization-error 'cannot-find-birthday community)) - (if (re-search-forward mixi-community-owner-regexp nil t) - (if (string= (match-string 1) "home.pl") - (mixi-community-set-owner community (mixi-make-me)) - (mixi-community-set-owner community - (mixi-make-friend (match-string 2) - (match-string 3)))) - (mixi-realization-error 'cannot-find-owner community)) - (if (re-search-forward mixi-community-category-regexp nil t) - (mixi-community-set-category community (match-string 1)) - (mixi-realization-error 'cannot-find-category community)) - (if (re-search-forward mixi-community-members-regexp nil t) - (mixi-community-set-members community - (string-to-number (match-string 1))) - (mixi-realization-error 'cannot-find-members community)) - (if (re-search-forward mixi-community-open-level-regexp nil t) - (mixi-community-set-open-level community (match-string 1)) - (mixi-realization-error 'cannot-find-open-level community)) - (if (re-search-forward mixi-community-authority-regexp nil t) - (mixi-community-set-authority community (match-string 1)) - (mixi-realization-error 'cannot-find-authority community)) - (if (re-search-forward mixi-community-description-regexp nil t) - (mixi-community-set-description community (match-string 1)) - (mixi-realization-error 'cannot-find-description community)))) + (let ((case-fold-search t)) + (if (re-search-forward mixi-community-nodata-regexp nil t) + ;; FIXME: Set all members? + (mixi-community-set-name community "¥Ç¡¼¥¿¤¬¤¢¤ê¤Þ¤»¤ó") + (if (re-search-forward mixi-community-name-regexp nil t) + (mixi-community-set-name community (match-string 1)) + (mixi-realization-error 'cannot-find-name community)) + (if (re-search-forward mixi-community-birthday-regexp nil t) + (mixi-community-set-birthday + community (encode-time 0 0 0 + (string-to-number (match-string 3)) + (string-to-number (match-string 2)) + (string-to-number (match-string 1)))) + (mixi-realization-error 'cannot-find-birthday community)) + (if (re-search-forward mixi-community-owner-regexp nil t) + (if (string= (match-string 1) "home.pl") + (mixi-community-set-owner community (mixi-make-me)) + (mixi-community-set-owner community (mixi-make-friend + (match-string 2) + (match-string 3)))) + (mixi-realization-error 'cannot-find-owner community)) + (if (re-search-forward mixi-community-category-regexp nil t) + (mixi-community-set-category community (match-string 1)) + (mixi-realization-error 'cannot-find-category community)) + (if (re-search-forward mixi-community-members-regexp nil t) + (mixi-community-set-members community + (string-to-number (match-string 1))) + (mixi-realization-error 'cannot-find-members community)) + (if (re-search-forward mixi-community-open-level-regexp nil t) + (mixi-community-set-open-level community (match-string 1)) + (mixi-realization-error 'cannot-find-open-level community)) + (if (re-search-forward mixi-community-authority-regexp nil t) + (mixi-community-set-authority community (match-string 1)) + (mixi-realization-error 'cannot-find-authority community)) + (if (re-search-forward mixi-community-description-regexp nil t) + (mixi-community-set-description community (match-string 1)) + (mixi-realization-error 'cannot-find-description community))))) (mixi-object-touch community))) (defun mixi-community-id (community)
\\(.*\\)") (defconst mixi-community-category-regexp - "¥«¥Æ¥´¥ê\\([^<]+\\)¥«¥Æ¥´¥ê\\([^<]+\\)¥á¥ó¥Ð¡¼¿ô\\([0-9]+\\)¿Í
¥á¥ó¥Ð¡¼¿ô\\([0-9]+\\)¿Í
»²²Ã¾ò·ï¤È
¸ø³«¥ì¥Ù¥ë
\\(.+\\)
»²²Ã¾ò·ï¤È
¸ø³«¥ì¥Ù¥ë
\\(.+\\)
¥È¥Ô¥Ã¥¯ºîÀ®¤Î¸¢¸Â\\(.+\\)
¥È¥Ô¥Ã¥¯ºîÀ®¤Î¸¢¸Â\\(.+\\)
\\(.+\\)\\(.+\\)