this might make it generate. i think. perhaps

This commit is contained in:
Luna Magdalena :3 2025-11-18 11:51:54 -03:00
parent 1afa152ab9
commit fffda7ceda
5 changed files with 51 additions and 21 deletions

15
generate/genuserdescs.scm Executable file
View file

@ -0,0 +1,15 @@
#!/home/afiw/opt/bin/csi -s
(import (chicken file)
(chicken format)
(chicken io)
(chicken pathname))
(for-each print (find-files "/home"
#:limit 0
#:test (lambda (s) (not (string=? s "/home/!common")))
#:action (lambda (homedir acc)
(let* ((path (sprintf "~a/.config/tilde/description" homedir))
(username (pathname-file homedir))
(desc (if (file-exists? path) (apply string-append (with-input-from-file path read-lines)) "Description file not found")))
(cons (sprintf "<li><a href=\"~~~a/\">~~~a</a><p>~a</p></li>" username username desc) acc)))))