From 8af5d4a53c083ded3b3648cd9cb24f35e54a4ee3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Sun, 16 Feb 2020 17:21:29 +0100 Subject: Add count parameter to chunked html. --- module/entry-points/html.scm | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'module/entry-points') diff --git a/module/entry-points/html.scm b/module/entry-points/html.scm index 16306031..a5cd7303 100644 --- a/module/entry-points/html.scm +++ b/module/entry-points/html.scm @@ -15,6 +15,7 @@ '((from (value #t) (single-char #\F)) (to (value #t) (single-char #\T)) (file (value #t) (single-char #\f)) + (count (value #t)) (chunked))) (define (main args) @@ -24,6 +25,8 @@ (define end (cond [(option-ref opts 'to #f) => parse-freeform-date] [else (date+ start (date month: 1)) ])) + (define count (and=> (option-ref opts 'count "12") string->number)) + (define-values (calendars events) (load-calendars calendar-files: (cond [(option-ref opts 'file #f) => list] @@ -32,5 +35,5 @@ ((@ (srfi srfi-41) stream->list) events) (if (option-ref opts 'chunked #f) - (html-chunked-main calendars events start) + (html-chunked-main count calendars events start) (html-generate calendars events start end))) -- cgit v1.2.3