diff options
Diffstat (limited to '')
-rw-r--r-- | emacsconf-schedule.el | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el index b8c3892..2f9a029 100644 --- a/emacsconf-schedule.el +++ b/emacsconf-schedule.el @@ -338,6 +338,12 @@ Each function should take the info and manipulate it as needed, returning the ne (when track (dom-set-attribute node 'fill (plist-get track :color))))) +(defun emacsconf-schedule-svg-color-by-availability (o node &optional parent) + (dom-set-attribute node 'fill + (if (string-match "^[><]" (plist-get o :availability)) + "gray" + "green"))) + (defun emacsconf-schedule-svg (width height &optional info) (setq info (or info (emacsconf-get-talk-info))) (let ((days (seq-group-by (lambda (o) @@ -358,6 +364,21 @@ Each function should take the info and manipulate it as needed, returning the ne :tracks (emacsconf-by-track (cdr o))))) days)))) +(defun emacsconf-schedule-svg-color-by-status (o node &optional parent) + (dom-set-attribute node 'fill + (pcase (plist-get o :status) + ((rx (or "TO_PROCESS" + "PROCESSING" + "TO_AUTOCAP")) + "lightyellow") + ((rx (or "TO_ASSIGN")) + "yellow") + ((rx (or "TO_CAPTION")) + "lightgreen") + ((rx (or "TO_STREAM")) + "green") + (t "gray")))) + (defun emacsconf-schedule-svg-days (width height days) (let ((svg (svg-create width height :background "white")) (day-height (/ height (length days))) |