Changeset 14347 for lang/gauche
- Timestamp:
- 06/21/08 20:12:51 (5 months ago)
- Location:
- lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype
- Files:
-
- 3 modified
Legend:
- Unmodified
- Added
- Removed
-
lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/oldtype.kahua
r14311 r14347 386 386 387 387 ;; define elements for RSS 2.0 388 (define-elements channel rss description lastBuildDate docs generator item pubDate author )388 (define-elements channel rss description lastBuildDate docs generator item pubDate author guid atom:link) 389 389 390 390 ;; get-rss entry … … 402 402 (timeline-of e)))) 403 403 entry-pages))))) 404 (rss/ (@/ (version "2.0")) 404 (rss/ (@/ (version "2.0") 405 (xmlns:atom "http://www.w3.org/2005/Atom")) 405 406 (channel/ 407 (atom:link/ 408 (@/ (href (string-append base-url "get-rss/" wikiname)) 409 (rel "self") 410 (type "application/rss+xml"))) 406 411 (title/ (string-append wikiname "::" (oldtype-first-line index-page))) 407 412 (link/ (string-append base-url "show-page/" wikiname)) … … 413 418 (lambda (e) 414 419 (let* ((timeline (timeline-of e)) 415 (lineno (- (last (get-latest-lines timeline)) 5))) 420 (lineno (- (last (get-latest-lines timeline)) 5)) 421 (uri 422 (string-append base-url "show-page/" (uri-encode-string (name-of e)) 423 (if (< 1 lineno) 424 (string-append "#" (number->string lineno)) 425 "")))) 416 426 (item/ 417 427 (title/ (string-append (name-of e) "::" (oldtype-first-line e))) 418 (description/ (string-join (get-plain-list e) "<br>")) 419 (link/ (string-append base-url "show-page/" (uri-encode-string (name-of e)) 420 (if (< 1 lineno) 421 (string-append "#" (number->string lineno)) 422 ""))) 428 (description/ (string-join (get-plain-list e) "\n")) 429 (link/ uri) 430 (guid/ uri) 423 431 (pubDate/ (oldtype:utc->RFC822-date-string 424 432 (utc-of 425 433 (get-latest-log timeline)))) 426 (author/ (committer-of (get-latest-log timeline))))))434 (author/ (committer-of (get-latest-log timeline)))))) 427 435 entry-pages) 428 436 )))) … … 435 443 (format "http://~a/" (oldtype:get-arguments 'fqdn)) 436 444 oldtype-page 437 (filter-map438 (lambda (x)439 (oldtype:load-page (kahua-site-root) (cdr x)))440 (get-rss-entry-pages oldtype-page))))))445 (filter-map 446 (lambda (x) 447 (oldtype:load-page (kahua-site-root) (cdr x))) 448 (get-rss-entry-pages oldtype-page)))))) 441 449 442 450 -
lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/page.scm
r14311 r14347 35 35 (define-module oldtype.page 36 36 (use srfi-1) 37 (use srfi-13) 37 38 (use util.list) 38 39 (use oldtype.log) … … 161 162 162 163 (define-method get-rss-entry-pages ((self <oldtype-page>)) 163 (filter-map 164 (lambda (lineno) 165 (let* ((m (rxmatch #/\[\[([^\]|]+)\]\]/ (get-text self lineno))) 166 (wikiname 167 (if m 168 (rxmatch-substring m 1) 169 #f))) 170 (if m 171 (cons 172 lineno 173 wikiname) 174 #f))) 175 (_get-rss-lineno-list self))) 164 (delete-duplicates 165 (filter-map 166 (lambda (lineno) 167 (let* ((m (rxmatch #/\[\[([^\]|]+)\]\]/ (get-text self lineno))) 168 (wikiname 169 (if m 170 (rxmatch-substring m 1) 171 #f))) 172 (if m 173 (cons 174 lineno 175 wikiname) 176 #f))) 177 (_get-rss-lineno-list self)) 178 (lambda (a b) 179 (string= 180 (cdr a) 181 (cdr b))))) 176 182 177 183 -
lang/gauche/oldtype/trunk/Kahua/oldtype/oldtype/util.scm
r14311 r14347 239 239 240 240 ;; 241 ;; Convert utc seconds to "2008-03-20T18:36:00+00:00" RFC822241 ;; Convert utc seconds to RFC822 like "20 Mar 2008 18:36:00 +0000" 242 242 ;; 243 243 (define (oldtype:utc->RFC822-date-string utc) 244 (sys-strftime "%Y-%m-%dT%H:%M:%S+00:00" (sys-gmtime utc))) 245 244 (sys-strftime "%d %b %Y %H:%M:%S +0000" (sys-gmtime utc))) 246 245 247 246 ;;
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)