1
0
Fork 0

Correctly show description and update time for all

Not just to top-level projects anymore.
This commit is contained in:
Tom Willemsen 2012-09-11 22:28:49 +02:00
parent 619d4678ba
commit 8d15d4e7f9

View file

@ -25,12 +25,9 @@
(lambda (name stat)
(not (file-exists? (string-append name "/config")))))))
(define (project-dir project)
(string-append *projects-dir* "/" project))
(define (project-description project)
(let ((dfile-name
(string-append (project-dir project) "/description")))
(string-append project "/description")))
(if (file-exists? dfile-name)
(with-input-from-file dfile-name
(lambda ()
@ -39,10 +36,9 @@
(define (git-last-update project)
"Check when the last update upstream was."
(let* ((dfile-name (project-dir project))
(pipe (open-input-pipe
(let* ((pipe (open-input-pipe
(string-append
"git --git-dir=" dfile-name
"git --git-dir=" project
" log -1 --format=%ar 2>/dev/null")))
(relative-last-update (read-line pipe)))
(close-pipe pipe)
@ -57,11 +53,12 @@
name)))
(define (project->row dir project)
`(tr
(td ,(gitless project))
(td ,(project-description project))
(td ,(git-last-update project))
(td "")))
(let ((project-dir (string-append dir "/" project)))
`(tr
(td ,(gitless project))
(td ,(project-description project-dir))
(td ,(git-last-update project-dir))
(td ""))))
(define (project-list->table top-dir list lvl)
(let ((head (car list))