aboutsummaryrefslogtreecommitdiff
path: root/module/entry-points
diff options
context:
space:
mode:
authorHugo Hörnquist <hugo@hornquist.se>2020-01-30 22:51:45 +0100
committerHugo Hörnquist <hugo@hornquist.se>2020-01-30 22:51:45 +0100
commitf852c30bcef530d18a474ab6ab8350a3ef93d563 (patch)
tree00fc29a6ff1a8c842d0a526f04d4124977dd6e46 /module/entry-points
parentUpdate recurrence generate to new date obj. (diff)
downloadcalp-f852c30bcef530d18a474ab6ab8350a3ef93d563.tar.gz
calp-f852c30bcef530d18a474ab6ab8350a3ef93d563.tar.xz
Once again compiles.
Diffstat (limited to 'module/entry-points')
-rw-r--r--module/entry-points/html.scm8
-rw-r--r--module/entry-points/terminal.scm6
2 files changed, 8 insertions, 6 deletions
diff --git a/module/entry-points/html.scm b/module/entry-points/html.scm
index 82f972ae..16306031 100644
--- a/module/entry-points/html.scm
+++ b/module/entry-points/html.scm
@@ -3,8 +3,8 @@
:use-module (output html)
:use-module (util)
:use-module (vcomponent)
- :use-module (srfi srfi-19)
- :use-module (srfi srfi-19 util)
+ :use-module (srfi srfi-19 alt)
+ :use-module (srfi srfi-19 alt util)
:use-module (ice-9 getopt-long)
:use-module (parameters)
@@ -22,13 +22,15 @@
(define start (cond [(option-ref opts 'from #f) => parse-freeform-date]
[else (start-of-month (current-date))]))
(define end (cond [(option-ref opts 'to #f) => parse-freeform-date]
- [else (normalize-date* (set (date-month start) = (+ 1)))]))
+ [else (date+ start (date month: 1)) ]))
(define-values (calendars events)
(load-calendars
calendar-files: (cond [(option-ref opts 'file #f) => list]
[else (calendar-files)]) ))
+ ((@ (srfi srfi-41) stream->list) events)
+
(if (option-ref opts 'chunked #f)
(html-chunked-main calendars events start)
(html-generate calendars events start end)))
diff --git a/module/entry-points/terminal.scm b/module/entry-points/terminal.scm
index df15116c..e53a3d05 100644
--- a/module/entry-points/terminal.scm
+++ b/module/entry-points/terminal.scm
@@ -20,9 +20,9 @@
calendar-files: (cond [(option-ref opts 'file #f) => list]
[else (calendar-files)]) ))
- (let ((time (drop-time (or (and=> (option-ref opts 'date #f) parse-freeform-date)
- (current-date)))))
+ (let ((date (or (and=> (option-ref opts 'date #f) parse-freeform-date)
+ (current-date))))
;; (format (current-error-port) "len(events) = ~a~%" (stream-length events))
(with-vulgar
- (lambda () (main-loop time events))))
+ (lambda () (main-loop date events))))
)