diff options
author | Hugo Hörnquist <hugo@hornquist.se> | 2020-02-16 17:21:29 +0100 |
---|---|---|
committer | Hugo Hörnquist <hugo@hornquist.se> | 2020-02-16 17:21:29 +0100 |
commit | 8af5d4a53c083ded3b3648cd9cb24f35e54a4ee3 (patch) | |
tree | 0e0c2ed5a2d9af90cf47f462a5482c00ae9e8572 /module/entry-points | |
parent | Export utc? for time objects. (diff) | |
download | calp-8af5d4a53c083ded3b3648cd9cb24f35e54a4ee3.tar.gz calp-8af5d4a53c083ded3b3648cd9cb24f35e54a4ee3.tar.xz |
Add count parameter to chunked html.
Diffstat (limited to '')
-rw-r--r-- | module/entry-points/html.scm | 5 |
1 files changed, 4 insertions, 1 deletions
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))) |