Changeset 1274 for lang/elisp
- Timestamp:
- 11/10/07 23:46:15 (6 years ago)
- Files:
-
- 1 modified
-
lang/elisp/blosxom.el.cgi/blosxom.el.cgi (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/elisp/blosxom.el.cgi/blosxom.el.cgi
r1273 r1274 14 14 15 15 (require 'cl) 16 17 (setf output-buffer (get-buffer-create "*BlosxomElisp")) 18 (set-buffer output-buffer) 19 (erase-buffer) 16 20 17 21 ; http://subtech.g.hatena.ne.jp/antipop/20071023/1193150099 … … 80 84 (if (string-match regexp str) 81 85 (progn 82 (setf m (match-data))83 (loop for x below 1084 if (match-beginning x)85 collect86 (substring str (match-beginning x) (match-end x))87 ))86 (setf m (match-data)) 87 (loop for x below 10 88 if (match-beginning x) 89 collect 90 (substring str (match-beginning x) (match-end x)) 91 )) 88 92 nil 89 ))93 )) 90 94 91 95 (setf title "blosxom.el !") … … 115 119 (setf timeb (cdr (assoc 'time b))) 116 120 117 (if (= (car timea) (car timeb)) 118 (< (cadr timea) (cadr timeb)) 119 (< (car timea) (car timeb)) 120 ))) 121 (if 122 (= (car timea) (car timeb)) 123 (< (cadr timea) (cadr timeb)) 124 (< (car timea) (car timeb)) 125 ))) 121 126 122 127 ; filter … … 146 151 (setf lastupdate (format-time-string "%Y-%m-%dT%H:%M:%SZ" (cdr (assoc 'time (car entries))))) 147 152 148 ( princ(concat "Content-Type: " (apply-template "content_type" flavour) "\n"))149 ( princ(apply-template "head" flavour))153 (insert (concat "Content-Type: " (apply-template "content_type" flavour) "\n")) 154 (insert (apply-template "head" flavour)) 150 155 151 156 (loop for e in entries do 152 157 (multiple-value-bind (title body) (split-entry-body (cdr (assoc 'path e)))) 153 (setf name (cdr (assoc 'name e)))154 (setf path (cdr (assoc 'name e)))155 (setf time (cdr (assoc 'time e)))158 (setf name (cdr (assoc 'name e))) 159 (setf path (cdr (assoc 'name e))) 160 (setf time (cdr (assoc 'time e))) 156 161 (setf w3cdtf (format-time-string "%Y-%m-%dT%H:%M:%SZ" time)) 157 162 (setf yr (format-time-string "%Y" time)) … … 165 170 (setf ampm (format-time-string "%p" time)) 166 171 (setf ti (format-time-string "%X" time)) 167 ( princ(apply-template "story" flavour))172 (insert (apply-template "story" flavour)) 168 173 ) 169 174 ;(print entries) 170 175 171 ( princ(apply-template "foot" flavour))176 (insert (apply-template "foot" flavour)) 172 177 173 178 (princ (buffer-string))
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)