Changeset 1267

Show
Ignore:
Timestamp:
11/10/07 20:51:29 (6 years ago)
Author:
cho45
Message:

lang/elisp/blosxom.el.cgi/blosxom.el.cgi:

日付によるフィルタの実装
これでだいたいおわり。でも日本語表示できない

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/elisp/blosxom.el.cgi/blosxom.el.cgi

    r1266 r1267  
    9191(setf servername (concat "http://" (or (getenv "SERVER_NAME") ""))) 
    9292(setf home (or (getenv "SCRIPT_NAME") "")) 
    93 (setf pathinfo (or (getenv "PATH_INFO") "/index.xml")) 
     93(setf pathinfo (or (getenv "PATH_INFO") "")) 
    9494(setf pathname (replace pathinfo "\\(index\\)?\\..+$" "")) 
    9595(setf version (emacs-version)) 
    9696 
    9797(setf flavour (or (nth 1 (matches "\\(\\..+\\)$" pathinfo)) ".html")) 
     98(setf splitted-pathinfo (matches "^/\\([0-9]+\\)\\(/[0-9][0-9]\\)?\\(/[0-9][0-9]\\)?" pathinfo)) 
    9899;(print system-configuration) 
    99100;(print system-name) 
     
    123124                         (setf time (cdr (assoc 'time e))) 
    124125                         ; (string= "2007" (format-time-string "%Y" time)) 
    125                          (string-match (concat "^" pathname) name) 
     126                         (cond ((nth 3 splitted-pathinfo) 
     127                                (string= (format-time-string "%Y/%m/%d" time) (apply 'concat (cdr splitted-pathinfo))) 
     128                                ) 
     129                               ((nth 2 splitted-pathinfo) 
     130                                (string= (format-time-string "%Y/%m" time) (apply 'concat (cdr splitted-pathinfo))) 
     131                                ) 
     132                               ((nth 1 splitted-pathinfo) 
     133                                (string= (format-time-string "%Y" time) (nth 1 splitted-pathinfo)) 
     134                                ) 
     135                               (t 
     136                                 (string-match (concat "^" pathname) name) 
     137                                 )) 
    126138                         ) 
    127139                    collect e))