Work on member web static file generator.
This commit is contained in:
parent
b3bb37cbce
commit
52a2108b4f
5 changed files with 42 additions and 3 deletions
|
@ -31,6 +31,7 @@
|
|||
filter
|
||||
string-repeat
|
||||
string-first+rest
|
||||
get-process-output-lines
|
||||
utils-tests!
|
||||
)
|
||||
|
||||
|
@ -38,6 +39,8 @@
|
|||
(chicken base)
|
||||
(chicken string)
|
||||
(chicken irregex)
|
||||
(chicken io)
|
||||
(chicken process)
|
||||
testing)
|
||||
|
||||
;; Returns a list with elements matching pred? predicate.
|
||||
|
@ -72,6 +75,14 @@
|
|||
(cons key-str val))
|
||||
(cons str ""))))
|
||||
|
||||
;; Very simple shell command wrapper that returns lines produced by
|
||||
;; given command. Dangerous - performs no argument escaping!
|
||||
(define (get-process-output-lines cmd)
|
||||
(let-values (((stdout stdin pid stderr) (process* cmd)))
|
||||
(close-output-port stdin)
|
||||
(let ((result (read-lines stdout)))
|
||||
(let-values (((a b c) (process-wait pid)))
|
||||
result))))
|
||||
|
||||
;; Performs utils module self-tests.
|
||||
(define (utils-tests!)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue