diff options
author | nathan <nathansmith@disroot.org> | 2025-06-06 00:09:50 -0600 |
---|---|---|
committer | nathan <nathansmith@disroot.org> | 2025-06-06 00:09:50 -0600 |
commit | 3363c8df1c89c3fe0631e9989e4dbf1f3af8e73e (patch) | |
tree | 45f5395bfc0c09d74a5b1bfe634a1eb117e8e51e /org | |
parent | 2489a45054ba3b57e0de2ef82799d5dc8e6e9ed7 (diff) |
Started working on phlog
Diffstat (limited to 'org')
-rwxr-xr-x | org/blog/generate-phlog.scm | 28 |
1 files changed, 28 insertions, 0 deletions
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)) + |