diff options
author | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-02 23:25:56 +0200 |
---|---|---|
committer | Hugo Hörnquist <hugo@lysator.liu.se> | 2020-08-02 23:25:56 +0200 |
commit | 5188fb2251e02b32fd017dc7ba8cd6d0ce892c75 (patch) | |
tree | c79ed2f7b1734ebccc53fa4daee9ed1a5a2862c4 /module/output | |
parent | Repair vcomponent describe. (diff) | |
download | calp-5188fb2251e02b32fd017dc7ba8cd6d0ce892c75.tar.gz calp-5188fb2251e02b32fd017dc7ba8cd6d0ce892c75.tar.xz |
Remove (util app).
Diffstat (limited to '')
-rw-r--r-- | module/output/html.scm | 15 | ||||
-rw-r--r-- | module/output/ical.scm | 17 | ||||
-rw-r--r-- | module/output/terminal.scm | 7 |
3 files changed, 21 insertions, 18 deletions
diff --git a/module/output/html.scm b/module/output/html.scm index 8877de95..6b09bebb 100644 --- a/module/output/html.scm +++ b/module/output/html.scm @@ -8,7 +8,6 @@ #:use-module (vcomponent datetime) #:use-module (vcomponent build) #:use-module (util) - #:use-module (util app) #:use-module (util exceptions) #:use-module (util config) #:use-module (util tree) @@ -20,6 +19,8 @@ #:use-module (text util) #:use-module (vcomponent datetime output) + #:autoload (vcomponent instance) (get-calendars get-event-set global-event-object) + #:use-module (git) ;; #:use-module (module config all) ) @@ -817,10 +818,10 @@ (unless (file-exists? link) (symlink "../static" link)))) -(define-method (html-chunked-main count start-date chunk-length) +(define (html-chunked-main count start-date chunk-length) - (define calendars (getf 'calendars)) - (define events (getf 'event-set)) + (define calendars (get-calendars global-event-object)) + (define events (get-event-set global-event-object)) ((@ (util time) report-time!) "html start") @@ -852,10 +853,10 @@ -(define-method (html-table-main count start-date) +(define (html-table-main count start-date) - (define calendars (getf 'calendars)) - (define events (getf 'event-set)) + (define calendars (get-calendars global-event-object)) + (define events (get-event-set global-event-object)) (create-files) diff --git a/module/output/ical.scm b/module/output/ical.scm index 69ba30ce..9ab80ffb 100644 --- a/module/output/ical.scm +++ b/module/output/ical.scm @@ -3,7 +3,6 @@ :use-module (ice-9 match) :use-module (util) :use-module (util exceptions) - :use-module (util app) :use-module (vcomponent) :use-module (vcomponent datetime) :use-module (srfi srfi-1) @@ -16,6 +15,8 @@ :use-module (vcomponent geo) :use-module (output types) :use-module (output common) + :autoload (vcomponent instance) (#|get-calendars get-event-set|# global-event-object) + :autoload (datetime instance) (zoneinfo) ) @@ -171,7 +172,7 @@ (awhen (param (prop* event 'DTSTART) 'TZID) ;; TODO this is broken - (add-child! cal (zoneinfo->vtimezone (getf 'zoneinfo) it))) + (add-child! cal (zoneinfo->vtimezone zoneinfo it))) (unless (prop event 'UID) (set! (prop event 'UID) @@ -212,7 +213,7 @@ CALSCALE:GREGORIAN\r (for-each component->ical-string ;; TODO we realy should send the earliest event from each timezone here, ;; instead of just the first. - (map (lambda (name) (zoneinfo->vtimezone (getf 'zoneinfo) name (car events))) + (map (lambda (name) (zoneinfo->vtimezone zoneinfo name (car events))) tz-names))) (for-each component->ical-string events) @@ -220,20 +221,20 @@ CALSCALE:GREGORIAN\r (print-footer)) -(define-method (print-all-events) +(define (print-all-events) (print-components-with-fake-parent - (append (getf 'fixed-events) + (append (get-fixed-events global-event-object) ;; TODO RECCURENCE-ID exceptions ;; We just dump all repeating objects, since it's much cheaper to do ;; it this way than to actually figure out which are applicable for ;; the given date range. - (getf 'repeating-events)))) + (get-repeating-events global-even-object)))) -(define-method (print-events-in-interval start end) +(define (print-events-in-interval start end) (print-components-with-fake-parent (append (fixed-events-in-range start end) ;; TODO RECCURENCE-ID exceptions ;; We just dump all repeating objects, since it's much cheaper to do ;; it this way than to actually figure out which are applicable for ;; the given date range. - (getf 'repeating-events)))) + (get-repeating-events global-event-object)))) diff --git a/module/output/terminal.scm b/module/output/terminal.scm index f4f46272..b8c1b4ac 100644 --- a/module/output/terminal.scm +++ b/module/output/terminal.scm @@ -7,7 +7,6 @@ #:use-module (srfi srfi-41) #:use-module (srfi srfi-41 util) #:use-module (util) - #:use-module ((util app) :prefix app/) #:use-module (vulgar) #:use-module (vulgar info) #:use-module (vulgar color) @@ -30,6 +29,8 @@ #:use-module (oop goops) #:use-module (oop goops describe) + #:autoload (vcomponent instance) (#|get-calendars get-event-set|# global-event-object) + #:export (main-loop)) (define-values (height width) (get-terminal-size)) @@ -336,8 +337,8 @@ (cached-page this) #f)) (else (next-method)))) -(app/define-method (main-loop date) - (define state (list (day-view (app/getf 'event-set) date))) +(define-public (main-loop date) + (define state (list (day-view (get-event-set global-event-object) date))) (while #t (output (car state)) |