From 3363c8df1c89c3fe0631e9989e4dbf1f3af8e73e Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 6 Jun 2025 00:09:50 -0600 Subject: Started working on phlog --- org/blog/generate-phlog.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100755 org/blog/generate-phlog.scm diff --git a/org/blog/generate-phlog.scm b/org/blog/generate-phlog.scm new file mode 100755 index 0000000..17f0778 --- /dev/null +++ b/org/blog/generate-phlog.scm @@ -0,0 +1,28 @@ +#! /usr/bin/guile \ +-e main -s +!# + +(use-modules (sxml simple)) + +(define (make-gophermap articles) + (call-with-output-file "phlog/gophermap" + (lambda (fp) + (for-each + (lambda (article) + (if (list? article) + (display article))) + (cdr (cadr articles)))))) + +(define (make-blogs articles) + '()) + +(define (generate-phlog) + (call-with-input-file "articles.xml" + (lambda (fp) + (let ((articles (xml->sxml fp))) + (make-gophermap articles) + (make-blogs articles))))) + +(define (main args) + (generate-phlog)) + -- cgit v1.2.3