this might make it generate. i think. perhaps
This commit is contained in:
parent
1afa152ab9
commit
fffda7ceda
5 changed files with 51 additions and 21 deletions
15
generate/genuserdescs.scm
Executable file
15
generate/genuserdescs.scm
Executable 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)))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue