Changeset 23471 in project for gazette


Ignore:
Timestamp:
04/11/11 00:19:47 (8 years ago)
Author:
syn
Message:

gazette: switch feed to use `pages->atom-doc' (only available in trunk at the moment!)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gazette/src/feed.atom

    r20060 r23471  
    33 (date . "2010-08-29")
    44 (tag . "tag:gazette.call-cc.org,~A:~A")
    5  (base-uri . "http://gazette.call-cc.org"))
     5 (entries-type . xhtml)
     6 (base-uri . "http://gazette.call-cc.org")
     7 (icon . "/icon.png")
     8 (logo . "/logo.png"))
    69
    7 (let* ((entries (all-issues))
    8        (seconds->rfc3339-string (lambda (s)
    9                                   (rfc3339->string (seconds->rfc3339 s))))
    10        (seconds->YYYY-MM-DD (lambda (s)
    11                               (time->string (seconds->utc-time s) "%Y-%m-%d"))))
    12 
    13   (make-atom-doc
    14    (make-feed
    15     title: (make-title ($ 'title))
    16     subtitle: (make-subtitle ($ 'subtitle))
    17     icon: (make-icon (conc ($ 'base-uri) "/icon.png"))
    18     logo: (make-logo (conc ($ 'base-uri) "/logo.png"))
    19     updated: (seconds->rfc3339-string
    20               (fold (lambda (p c)
    21                       (let ((p ($ 'date p)))
    22                         (if (and c (> c p)) c p)))
    23                     #f
    24                     entries))
    25     id: (format ($ 'tag) ($ 'date) "/")
    26     links: (list (make-link uri: (conc ($ 'base-uri) (page-path)) relation: "self" type: 'atom))
    27     entries: (map (lambda (p)
    28                     (make-entry title: (make-title ($ 'title p))
    29                                 published: (seconds->rfc3339-string ($ 'date p))
    30                                 updated: (seconds->rfc3339-string (page-updated p))
    31                                 id: (format ($ 'tag) (seconds->YYYY-MM-DD ($ 'date p)) (page-path p))
    32                                 links: (list (make-link uri: (conc ($ 'base-uri) (page-path p)) type: 'xhtml))
    33                                 authors: (map (lambda (author)
    34                                                 (make-author name: author))
    35                                               ($ 'authors p))
    36                                 content: (make-content (read-page p) type: 'html)))
    37                   entries))))
     10(pages->atom-doc (all-issues)
     11                 page-date->rfc3339-string:
     12                 (lambda (s)
     13                   (rfc3339->string (seconds->rfc3339 s))))
Note: See TracChangeset for help on using the changeset viewer.