From dc6f36f27554f4a8c88e0a9f8acf1fde288752b3 Mon Sep 17 00:00:00 2001 From: Ekaitz Zarraga Date: Wed, 4 Oct 2023 17:30:50 +0200 Subject: atom: use posts instead of entries externally --- src/atom.scm | 6 +++--- tests/atom.scm | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/atom.scm b/src/atom.scm index 1713ab9..ca2a225 100644 --- a/src/atom.scm +++ b/src/atom.scm @@ -69,16 +69,16 @@ (define* (feed #:key (title "") (subtitle "") (uri "") - (entries '()) + (posts '()) #:allow-other-keys) (let* ((f (make-feed uri title subtitle uri - (find-newest (map entry-updated entries)) + (find-newest (map entry-updated posts)) '())) (append-entry! (partial append-feed-entry! f))) - (for-each append-entry! entries) + (for-each append-entry! posts) f)) diff --git a/tests/atom.scm b/tests/atom.scm index 5d47ef6..c6cd268 100644 --- a/tests/atom.scm +++ b/tests/atom.scm @@ -13,7 +13,7 @@ (atom:feed #:title "Mi feed" #:subtitle "Este es mi feed" #:uri "https://feed.elenq.tech" - #:entries (list + #:posts (list (atom:entry #:title "first entry" #:published (string/ISO->date "2023-03-01") #:authors (list me) @@ -24,7 +24,7 @@ ;; TODO: Test media (reads file) (let ((atom-feed (with-output-to-string (lambda () (atom:render feed))))) - (test-assert (string=? atom-feed + (test-assert (string=? (pk atom-feed) "https://feed.elenq.techMi feed2023-03-01T00:00:00+0100Este es mi feedhttps://feed.elenq.tech/first-entryfirst entry2023-03-01T00:00:00+01002023-03-01T00:00:00+0100Ekaitzhttps://elenq.techekaitz@elenq.tech

Este es el resumen

Este es el contenido

"))) (test-end "Atom feed") -- cgit v1.2.3