From 8f9666a32a4bc5b9bf7350212eadb5cfd9bbe41e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 22 Mar 2020 19:40:13 +0100 Subject: Start work on week-by-week html. --- module/output/html.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'module/output/html.scm') diff --git a/module/output/html.scm b/module/output/html.scm index fa9d4f47..b35a4d2f 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -565,7 +565,7 @@ ,@(stream->list (stream-map fmt-day evs))))))))) -(define-public (html-chunked-main count calendars events start-date) +(define-public (html-chunked-main count calendars events start-date chunk-length) ;; TODO This still doesn't account for PWD, file existing but is of ;; wrong type, html directory existing but static symlink missing, ;; static being a different file type, and probably something else @@ -583,10 +583,10 @@ (format (current-error-port) "Writing to [~a]~%" fname) (with-output-to-file fname (lambda () (html-generate calendars events start-date end-date render-calendar - next-start: month+ - prev-start: month- + next-start: (lambda (d) (date+ d chunk-length)) + prev-start: (lambda (d) (date- d chunk-length)) ))))]) - (let ((ms (month-stream start-date))) + (let ((ms (stream-iterate (cut date+ <> chunk-length) start-date))) (with-streams (take count (zip ms -- cgit v1.2.3