Templater was fixed.
This commit is contained in:
parent
3930735b7c
commit
1e6a59f6f5
1 changed files with 13 additions and 1 deletions
14
.github/actions/scripts/templater.ros
vendored
14
.github/actions/scripts/templater.ros
vendored
|
@ -26,10 +26,22 @@ exec ros -Q -L sbcl-bin -- $0 "$@"
|
||||||
value))))
|
value))))
|
||||||
|
|
||||||
|
|
||||||
|
(defun interpose (separator list)
|
||||||
|
"Returns a sequence of the elements of SEQUENCE separated by SEPARATOR."
|
||||||
|
(labels ((rec (s acc)
|
||||||
|
(if s
|
||||||
|
(rec (cdr s) (nconc acc
|
||||||
|
(list separator (car s))))
|
||||||
|
acc)))
|
||||||
|
(cdr (rec list nil))))
|
||||||
|
|
||||||
|
|
||||||
(defun main (&rest argv)
|
(defun main (&rest argv)
|
||||||
(declare (ignore argv))
|
(declare (ignore argv))
|
||||||
(let* ((lines (uiop:slurp-stream-lines *standard-input*))
|
(let* ((lines (uiop:slurp-stream-lines *standard-input*))
|
||||||
(template-text (apply #'concatenate 'string lines))
|
(template-text (apply #'concatenate 'string
|
||||||
|
(interpose (string #\Newline)
|
||||||
|
lines)))
|
||||||
(template (djula::compile-string template-text))
|
(template (djula::compile-string template-text))
|
||||||
(arguments (collect-arguments)))
|
(arguments (collect-arguments)))
|
||||||
(apply #'djula:render-template*
|
(apply #'djula:render-template*
|
||||||
|
|
Loading…
Reference in a new issue