From 2bc3b1dcfd8a8107e2b2fb3b39273815f80ff869 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Fri, 31 Jan 2020 11:33:06 +0100 Subject: Work. --- module/output/general.scm | 3 ++- module/output/html.scm | 4 ++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'module/output') diff --git a/module/output/general.scm b/module/output/general.scm index 4d9b4ce8..e2f73991 100644 --- a/module/output/general.scm +++ b/module/output/general.scm @@ -6,6 +6,7 @@ (catch #t (lambda () (define (str->num c n) (string->number (substring/shared c n (+ n 2)) 16)) + ;; (format (current-error-port) "COLOR = ~s~%" c) (let ((r (str->num c 1)) (g (str->num c 3)) (b (str->num c 5))) @@ -15,6 +16,6 @@ #xFF)) "#000000" "#e5e8e6"))) (lambda args - (format (current-error-port) "Error calculating foreground color?~%~a~%" args) + (format (current-error-port) "Error calculating foreground color?~%~s~%" args) "#FF0000" ))) diff --git a/module/output/html.scm b/module/output/html.scm index cd3e2974..d64c7aa1 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -8,6 +8,7 @@ #:use-module (vcomponent datetime) #:use-module (util) #:use-module (util tree) + #:duplicates (last) #:use-module (srfi srfi-19 alt) #:use-module (srfi srfi-19 alt util) #:use-module (output general) @@ -120,6 +121,7 @@ (datetime- (attr ev 'DTEND) (attr ev 'DTSTART))))) (stream->list events)))) + ;; (format (current-error-port) "lay-out-day: ~a~%" (date->string date)) (fix-event-widths! time-obj short-events) (fix-event-widths! time-obj long-events) `(div (@ (class "day")) @@ -182,6 +184,7 @@ ;; For sidebar, just text (define (fmt-single-event ev) + (format (current-error-port) "fmt-single-event: ~a~%" (attr ev 'X-HNH-FILENAME)) `(article (@ (id ,(UID ev)) (class "eventtext CAL_bg_" ,(html-attr (attr (parent ev) 'NAME)))) @@ -198,6 +201,7 @@ ;; Single event in side bar (text objects) (define (fmt-day day) (let* (((date . events) day)) + (format (current-error-port) "fmt-day: ~a~%" (date->string date)) `(section (@ (class "text-day")) (header (h2 ,(let ((s (date->string date "~Y-~m-~d"))) `(a (@ (href "#" ,s) -- cgit v1.2.3