summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-11-06 08:45:04 -0500
committerSacha Chua <sacha@sachachua.com>2022-11-06 08:45:04 -0500
commit548973ef194aa710e476d03ac8b8bdab19242eca (patch)
tree08990356782cb8c8eb1187f27d10c2f768bb5842
parentb24d2a98d49e83c105ba7b0fa586942d9d7e0154 (diff)
downloademacsconf-el-548973ef194aa710e476d03ac8b8bdab19242eca.tar.xz
emacsconf-el-548973ef194aa710e476d03ac8b8bdab19242eca.zip
color by status
Diffstat (limited to '')
-rw-r--r--emacsconf-schedule.el21
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)))