kaka.farm

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs

commit 5b3d3c8c5682cf9119f584d440b92fe93cefd360
parent 4369a89184920fa238845628a91dfe6578d2cae2
Author: Yuval Langer <yuval.langer@gmail.com>
Date:   Tue,  2 Jan 2024 20:43:29 +0200

Move all our code into a "kakafarm" toplevel library and get rid of the ./haunt/ sub-directory.

Diffstat:
Mhaunt.scm | 10+++++-----
Dhaunt/kakafarm/index.scm | 98-------------------------------------------------------------------------------
Dhaunt/kakafarm/weechatlog.scm | 61-------------------------------------------------------------
Rhaunt/images/logo.png -> images/logo.png | 0
Akakafarm/index.scm | 98+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Akakafarm/weechatlog.scm | 61+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Mposts/you-know-what-i-hate.sxml | 2+-
7 files changed, 165 insertions(+), 165 deletions(-)

diff --git a/haunt.scm b/haunt.scm @@ -15,8 +15,8 @@ (haunt reader) (haunt site) - (prefix (haunt kakafarm index) - haunt:kakafarm:index:)) + (prefix (kakafarm index) + kakafarm:index:)) (define (pp attribute record) (pretty-print (list attribute (attribute record)))) @@ -78,11 +78,11 @@ #:builders (list (blog #:prefix "/haunt/posts" #:theme blog-theme) (page-builder "/haunt/index.html" make-haunt-blog-index-sxml) - (page-builder "/index.html" haunt:kakafarm:index:make-index-sxml) + (page-builder "/index.html" kakafarm:index:make-index-sxml) (atom-feed #:file-name "/haunt/feed.xml" #:blog-prefix "/haunt/posts") (atom-feeds-by-tag #:prefix "/haunt/feeds" #:blog-prefix "/haunt/feeds/") (static-directory "kaka.farm" "/") - (static-directory "haunt/assets" "haunt/assets") - (static-directory "haunt/images" "haunt/images"))) + (static-directory "assets" "haunt/assets") + (static-directory "images" "haunt/images"))) diff --git a/haunt/kakafarm/index.scm b/haunt/kakafarm/index.scm @@ -1,98 +0,0 @@ -(define-library (haunt kakafarm index) - (import (guile)) - (export make-index-sxml) - - (begin - (define* (make-index-sxml #:key posts) - `(html - (head - (meta (@ (charset "UTF-8"))) - (link (@ (rel "stylesheet") - (type "text/css") - (href "index.css"))) - (title "💩 kaka farm 💩")) - (body - (div (@ (id "topmostdiv")) - (h1 "Various stuff:") - (h2 "Clipboard Speaker") - (p "An accessibility tool that reads either what you mark with your mouse:" - (dl - (dt "Python") - - (dd (pre "clipboard-speaker -p")) - - (dt "Guile>") - (dd (pre "clipboard-speaker --clipboard-type=p"))) - - "Or the contents of your clipboard:" - - (dl - (dt "Python") - (dd (pre "clipboard-speaker -b")) - (dt "Guile") - (dd (pre "clipboard-speaker --clipboard-type=b"))) - - (a (@ (href "https://sr.ht/~kakafarm/clipboard-speaker/")) - "Clipboard Speaker's Sourcehut repositories")) - (h3 "Python Clipboard Speaker") - (p "The original Python code:" - (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) - "Python Clipboard Speaker's Sourcehut repository")) - (h3 "Guile Clipboard Speaker") - (p "Also rewritten it in Guile:" - (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) - "Guile Clipboard Speaker's Sourcehut repository")) - - (h2 "Rusty Diceware") - (p - (a (@ (href "https://github.com/yuvallanger/rusty-diceware/")) - "A diceware tool in Rustlang.")) - - (h2 "Blog") - (ul - (li (a (@ (href "//kaka.farm/blog/")) - "blog-ish")) - (li (a (@ (href "//kaka.farm/haunt/")) - "A Haunt blog! Maybe I will migrate everything into Haunt and SXML?"))) - - (h2 "Commonly Forgotten") - (a (@ (href "//kaka.farm/~commonly-forgotten/")) "Commonly Forgotten") - " " - "has some terribly written notes (which I should consolidate into Haunt)." - - (h2 "Git repository repositories") - (p (ul (li "The static site generator" - (a (@ (href "https://codemadness.org/stagit.html")) - "Stagit") - "(" - (a (@ (href "https://codemadness.org/git/stagit/file/README.html")) - "README") - ") was used to generate" - (a (@ (href "/stagit/")) - "my copies of some of my git repositories") - ".") - (li (a (@ (href "//sr.ht/~kakafarm/")) "Sourcehut")) - (li (a (@ (href "//gitgud.io/yuvallanger/")) "GitGud profile")) - (li (a (@ (href "//gitlab.com/yuvallanger/")) "GitLab profile")) - (li (a (@ (href "//github.com/yuvallanger/")) "GitHub profile")))) - - (h2 "org-roam notes") - (p - "Splitting your org-roam notes into" - (a (@ (href "/private-org-roam-notes/")) "private") - " " - "and" - " " - (a (@ (href "/org-roam-notes/")) - "public") - " " - "notes is a pain in the arse. Luckily for me I love" - " " - (a (@ (href "//en.wikipedia.org/wiki/Pita")) - ".")) - - (h2 "Contact(?)") - (ul - (li (a (@ (href "https://emacs.ch/@kakafarm")) - "@kakafarm@emacs.ch") - ".")))))))) diff --git a/haunt/kakafarm/weechatlog.scm b/haunt/kakafarm/weechatlog.scm @@ -1,61 +0,0 @@ -(define-library (haunt kakafarm weechatlog) - (import (scheme base) - (srfi :9) - (srfi :19) - (ice-9 match) - (ice-9 peg)) - (export parse-weechatlog - weechatlog-line? - weechatlog-datetime - weechatlog-user-status - weechatlog-nickname - weechatlog-message) - - (begin - (define-record-type <weechatlog-line> - (make-weechatlog-line datetime - user-status - nickname - message) - weechatlog-line? - (datetime weechatlog-datetime) - (user-status weechatlog-user-status) - (nickname weechatlog-nickname) - (message weechatlog-message)) - - (define-peg-string-patterns - "weechatlog <-- (NL* weechatlog-line)* NL* -weechatlog-line <-- datetime-field T BRA user-status nickname-field KET T message-field -datetime-field <-- (!NL !T .)* -nickname-field <-- (!NL !T !KET .)* -message-field <-- (!NL .)* -user-status <-- (.) -BRA < '<' -KET < '>' -T < '\t' -NL < '\n'") - - - (define (parse-datetime str) - (string->date str "~Y-~m-~dT~H:~M:~S~z")) - - (define (parse-weechatlog str) - (let ((tree (peg:tree (match-pattern weechatlog str)))) - (match tree - (`(weechatlog - . ,weechatlog-lines) - (map parse-weechatlog-line - weechatlog-lines)) - (else - (error "Bad weechatlog:" tree))))) - - (define (parse-weechatlog-line tree) - (match tree - (`(weechatlog-line (datetime-field ,datetime-field) - (user-status ,user-status) - (nickname-field ,nickname-field) - (message-field ,message-field)) - (make-weechatlog-line (parse-datetime datetime-field) - user-status - nickname-field - message-field)))))) diff --git a/haunt/images/logo.png b/images/logo.png Binary files differ. diff --git a/kakafarm/index.scm b/kakafarm/index.scm @@ -0,0 +1,98 @@ +(define-library (kakafarm index) + (import (guile)) + (export make-index-sxml) + + (begin + (define* (make-index-sxml #:key posts) + `(html + (head + (meta (@ (charset "UTF-8"))) + (link (@ (rel "stylesheet") + (type "text/css") + (href "index.css"))) + (title "💩 kaka farm 💩")) + (body + (div (@ (id "topmostdiv")) + (h1 "Various stuff:") + (h2 "Clipboard Speaker") + (p "An accessibility tool that reads either what you mark with your mouse:" + (dl + (dt "Python") + + (dd (pre "clipboard-speaker -p")) + + (dt "Guile>") + (dd (pre "clipboard-speaker --clipboard-type=p"))) + + "Or the contents of your clipboard:" + + (dl + (dt "Python") + (dd (pre "clipboard-speaker -b")) + (dt "Guile") + (dd (pre "clipboard-speaker --clipboard-type=b"))) + + (a (@ (href "https://sr.ht/~kakafarm/clipboard-speaker/")) + "Clipboard Speaker's Sourcehut repositories")) + (h3 "Python Clipboard Speaker") + (p "The original Python code:" + (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) + "Python Clipboard Speaker's Sourcehut repository")) + (h3 "Guile Clipboard Speaker") + (p "Also rewritten it in Guile:" + (a (@ (href "https://git.sr.ht/~kakafarm/clipboard-speaker/")) + "Guile Clipboard Speaker's Sourcehut repository")) + + (h2 "Rusty Diceware") + (p + (a (@ (href "https://github.com/yuvallanger/rusty-diceware/")) + "A diceware tool in Rustlang.")) + + (h2 "Blog") + (ul + (li (a (@ (href "//kaka.farm/blog/")) + "blog-ish")) + (li (a (@ (href "//kaka.farm/haunt/")) + "A Haunt blog! Maybe I will migrate everything into Haunt and SXML?"))) + + (h2 "Commonly Forgotten") + (a (@ (href "//kaka.farm/~commonly-forgotten/")) "Commonly Forgotten") + " " + "has some terribly written notes (which I should consolidate into Haunt)." + + (h2 "Git repository repositories") + (p (ul (li "The static site generator" + (a (@ (href "https://codemadness.org/stagit.html")) + "Stagit") + "(" + (a (@ (href "https://codemadness.org/git/stagit/file/README.html")) + "README") + ") was used to generate" + (a (@ (href "/stagit/")) + "my copies of some of my git repositories") + ".") + (li (a (@ (href "//sr.ht/~kakafarm/")) "Sourcehut")) + (li (a (@ (href "//gitgud.io/yuvallanger/")) "GitGud profile")) + (li (a (@ (href "//gitlab.com/yuvallanger/")) "GitLab profile")) + (li (a (@ (href "//github.com/yuvallanger/")) "GitHub profile")))) + + (h2 "org-roam notes") + (p + "Splitting your org-roam notes into" + (a (@ (href "/private-org-roam-notes/")) "private") + " " + "and" + " " + (a (@ (href "/org-roam-notes/")) + "public") + " " + "notes is a pain in the arse. Luckily for me I love" + " " + (a (@ (href "//en.wikipedia.org/wiki/Pita")) + ".")) + + (h2 "Contact(?)") + (ul + (li (a (@ (href "https://emacs.ch/@kakafarm")) + "@kakafarm@emacs.ch") + ".")))))))) diff --git a/kakafarm/weechatlog.scm b/kakafarm/weechatlog.scm @@ -0,0 +1,61 @@ +(define-library (kakafarm weechatlog) + (import (scheme base) + (srfi :9) + (srfi :19) + (ice-9 match) + (ice-9 peg)) + (export parse-weechatlog + weechatlog-line? + weechatlog-datetime + weechatlog-user-status + weechatlog-nickname + weechatlog-message) + + (begin + (define-record-type <weechatlog-line> + (make-weechatlog-line datetime + user-status + nickname + message) + weechatlog-line? + (datetime weechatlog-datetime) + (user-status weechatlog-user-status) + (nickname weechatlog-nickname) + (message weechatlog-message)) + + (define-peg-string-patterns + "weechatlog <-- (NL* weechatlog-line)* NL* +weechatlog-line <-- datetime-field T BRA user-status nickname-field KET T message-field +datetime-field <-- (!NL !T .)* +nickname-field <-- (!NL !T !KET .)* +message-field <-- (!NL .)* +user-status <-- (.) +BRA < '<' +KET < '>' +T < '\t' +NL < '\n'") + + + (define (parse-datetime str) + (string->date str "~Y-~m-~dT~H:~M:~S~z")) + + (define (parse-weechatlog str) + (let ((tree (peg:tree (match-pattern weechatlog str)))) + (match tree + (`(weechatlog + . ,weechatlog-lines) + (map parse-weechatlog-line + weechatlog-lines)) + (else + (error "Bad weechatlog:" tree))))) + + (define (parse-weechatlog-line tree) + (match tree + (`(weechatlog-line (datetime-field ,datetime-field) + (user-status ,user-status) + (nickname-field ,nickname-field) + (message-field ,message-field)) + (make-weechatlog-line (parse-datetime datetime-field) + user-status + nickname-field + message-field)))))) diff --git a/posts/you-know-what-i-hate.sxml b/posts/you-know-what-i-hate.sxml @@ -3,7 +3,7 @@ (ice-9 pretty-print) (ice-9 match) (haunt utils) - (haunt kakafarm weechatlog)) + (kakafarm weechatlog)) (define-record-type <hate> (make-hate title logs-or-paragraphs)