From 2d2c8a209ce5430ab4c4e18c7f04535942cf829f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hugo=20H=C3=B6rnquist?= Date: Thu, 25 Apr 2019 19:07:03 +0200 Subject: Made none-output print statprof info. --- module/main.scm | 3 ++- module/output/none.scm | 19 +++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 module/output/none.scm diff --git a/module/main.scm b/module/main.scm index 620e64fd..924a846c 100755 --- a/module/main.scm +++ b/module/main.scm @@ -16,6 +16,7 @@ (output html) (output terminal) + (output none) (ice-9 getopt-long) @@ -57,7 +58,7 @@ (let ((ropt (ornull (option-ref opts '() '()) '("term")))) ((case (string->symbol (car ropt)) - ((none) (compose display list)) + ((none) none-main) ((html) html-main) ((term) terminal-main)) c e ropt)))) diff --git a/module/output/none.scm b/module/output/none.scm new file mode 100644 index 00000000..2380438b --- /dev/null +++ b/module/output/none.scm @@ -0,0 +1,19 @@ +(define-module (output none) + #:use-module (statprof) + #:use-module (vcomponent group) + #:use-module (srfi srfi-41) + #:use-module (srfi srfi-19) + #:use-module (srfi srfi-19 util) + #:use-module (util) + #:export (none-main)) + +(define (none-main calendars events args) + (define date (drop-time (current-date))) + (statprof + (lambda () + (group->event-list + (stream-car + ;; TODO reusing the same grouping causes it to lose events. + ;; I currently have no idea why, but it's BAD. + (get-groups-between (group-stream events) + date date)))))) -- cgit v1.2.3