@@ -45,30 +45,30 @@ ;; Get the data out of the SQLite cache as vectors (define (fetch-rows) (define fields '(pagenode title_plain published updated author doc_html)) (define select #<<--- - SELECT `path`, `title`, `published`, `updated`, `author`, `entry-contents` FROM - (SELECT `pagenode` AS `path`, + SELECT `path`, `title`, `published`, `updated`, `author`, `entry_contents` FROM + (SELECT `page` AS `path`, `title_plain` AS `title`, `published`, `updated`, `author`, - `doc_html` AS `entry-contents` + `doc_html` AS `entry_contents` FROM `articles` UNION - SELECT `pagenode` || '#' || `note_id` AS `path`, + SELECT `page` || '#' || `html_anchor` AS `path`, `title_plain` AS `title`, - `date` AS `published`, + `published`, "" AS `updated`, `author`, - `content_html` as `entry-contents` + `content_html` as `entry_contents` FROM `notes`) ORDER BY `published` DESC LIMIT ~a --- ) - (query-rows (sqltools:dbc) (format select feed-item-limit))) + (query-rows cache-conn (format select feed-item-limit))) (define (vector->rss-item vec) (match-define (vector path title published updated author contents) vec) (define entry-url (string-append feed-site-url web-root path)) @@ -99,7 +99,6 @@ ,@(map vector->rss-item (fetch-rows)))) (string-append "\n" (xexpr->string feed-xpr))) (define (main) - (spell-of-summoning!) ; Turn on the cache DB connection (display-to-file (rss-feed) "feed.xml" #:mode 'text #:exists 'replace))