iens

Manager of links to read
git clone https://git.instinctive.eu/iens.git
Log | Files | Refs | README | LICENSE

commit 5231ef3c260332341ec86f4e1a01d08ed036208a
parent d1246c6705d301bad38df3640e9cd2a4e3ed56bc
Author: Natasha Kerensikova <natgh@instinctive.eu>
Date:   Tue,  4 Aug 2026 17:32:54 +0000

Multi-format infrastructure in `process-source`
Diffstat:
Msrc/get-gruiks.scm | 30++++++++++++++++++------------
1 file changed, 18 insertions(+), 12 deletions(-)

diff --git a/src/get-gruiks.scm b/src/get-gruiks.scm @@ -131,20 +131,26 @@ url)))) result))) +(define (get-rss url last-modified etag) + (let ((feed (get-source rss:read url last-modified etag))) + (if feed + (list process-rss + (rss:feed-items feed) process-rss + (rss:item-title (rss:feed-channel feed))) + #f))) + (define (process-source name url last-modified etag) (condition-case - (let* ((rss (get-source rss:read url last-modified etag)) - (source (if (string=? name url) - (begin - (exec (sql db "UPDATE source_rss SET name=? - WHERE name=? AND url=?;") - (rss:item-title (rss:feed-channel rss)) - name url) - (rss:item-title (rss:feed-channel rss))) - name))) - (assert source) - (when rss - (process-rss source (rss:feed-items rss)))) + (let ((data (get-rss url last-modified etag))) + (when data + (let ((source (if (string=? name url) + (begin + (exec (sql db "UPDATE source_rss SET name=? + WHERE name=? AND url=?;") + (caddr data) name url) + (caddr data)) + name))) + ((car data) source (cadr data))))) (exn () (write-line (conc "Error while checking " name)) (print-error-message exn))))