summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-04 15:10:16 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-04 15:10:30 -0400
commit4b9096c7955cb0e57b89512e57227254fac14663 (patch)
tree46a17727042792bd50fba0a2ab9475b4100c4f65
parent7bf66eaa82f28c4b1c03157a36d8d697aa74637c (diff)
downloademacsconf-el-4b9096c7955cb0e57b89512e57227254fac14663.tar.xz
emacsconf-el-4b9096c7955cb0e57b89512e57227254fac14663.zip
gen,dev * sat,sun * am,pm
-rw-r--r--emacsconf-publish.el55
-rw-r--r--emacsconf-schedule.el44
2 files changed, 82 insertions, 17 deletions
diff --git a/emacsconf-publish.el b/emacsconf-publish.el
index 286b1ff..acb7239 100644
--- a/emacsconf-publish.el
+++ b/emacsconf-publish.el
@@ -418,6 +418,61 @@ resources."
info "\n")))
(save-buffer))))
+
+(defun emacsconf-generate-main-schedule-with-tracks (&optional info)
+ (interactive)
+ (setq info (or info (emacsconf-schedule-inflate-sexp emacsconf-schedule-plan
+ (emacsconf-get-talk-info))))
+ (with-temp-file (expand-file-name "schedule-details.md"
+ (expand-file-name emacsconf-year emacsconf-directory))
+ (let ((links
+ (mapconcat (lambda (track)
+ (concat (cadr track) ": "
+ (mapconcat (lambda (sec)
+ (format "<a href=\"#%s-%s\">%s</a>"
+ (car track) (car sec) (cadr sec)))
+ '(("sat-am" "Sat AM")
+ ("sat-pm" "Sat PM")
+ ("sun-am" "Sun AM")
+ ("sun-pm" "Sun PM"))
+ " - ")))
+ '(("gen" "General")
+ ("dev" "Development"))
+ " \n")))
+ (insert (mapconcat
+ (lambda (track)
+ (let* ((id (elt track 0))
+ (label (elt track 1))
+ (start (elt track 2))
+ (end (elt track 3))
+ (sequence (emacsconf-schedule-get-subsequence info start end))
+ (sat (emacsconf-schedule-get-subsequence sequence "Saturday" "Sunday"))
+ (sun (emacsconf-schedule-get-subsequence sequence "Sunday")))
+ (format "\n\n<a name=\"%s\"></a>\n## %s\n\n%s\n\n"
+ id
+ label
+ (mapconcat
+ (lambda (section)
+ (let ((section-id (elt section 0))
+ (section-label (elt section 1))
+ (section-seq (caddr section)))
+ (format "%s\n\n<a name=\"%s-%s\"></a>\n### %s track - %s\n%s\n"
+ links
+ id section-id
+ label
+ section-label
+ (emacsconf-format-main-schedule
+ section-seq))))
+ `(("sat-am" "Saturday morning - Dec 3" ,(cdr (emacsconf-schedule-get-subsequence sat nil "LUNCH")))
+ ("sat-pm" "Saturday afternoon - Dec 3" ,(cdr (emacsconf-schedule-get-subsequence sat "LUNCH")))
+ ("sun-am" "Sunday morning - Dec 4" ,(cdr (emacsconf-schedule-get-subsequence sun nil "LUNCH")))
+ ("sun-pm" "Sunday afternoon - Dec 4" ,(cdr (emacsconf-schedule-get-subsequence sun "LUNCH"))))
+ "\n\n")
+ )))
+ '(("gen" "General" "^GEN Sat" "^DEV Sat")
+ ("dev" "Development" "^DEV Sat"))
+ "\n")))))
+
(defun emacsconf-generate-main-schedule (&optional info)
(interactive)
(with-temp-file (expand-file-name "schedule-details.md" (expand-file-name emacsconf-year emacsconf-directory))
diff --git a/emacsconf-schedule.el b/emacsconf-schedule.el
index 9d17ace..94b61aa 100644
--- a/emacsconf-schedule.el
+++ b/emacsconf-schedule.el
@@ -268,16 +268,21 @@ Each function should take the info and manipulate it as needed, returning the ne
'rect
`((x . ,x)
(y . ,y)
- (width . ,(if vertical width size))
- (height . ,(1- (if vertical size height)))
- (stroke . "black")
- (fill . ,(cond
- ((string-match "BREAK\\|LUNCH" (plist-get o :title)) "white")
- ((plist-get o :invalid) "red")
- ((string-match "EST"
- (or (plist-get o :availability) ""))
- "lightgray")
- (t "lightgreen")))))
+ (width . ,(if vertical width size))
+ (height . ,(1- (if vertical size height)))
+ (stroke . "black")
+ (stroke-dasharray .
+ ,(if (string-match "live" (or (plist-get o :q-and-a) "live"))
+ ""
+ "5,5,5"
+ ))
+ (fill . ,(cond
+ ((string-match "BREAK\\|LUNCH" (plist-get o :title)) "white")
+ ((plist-get o :invalid) "red")
+ ((string-match "EST"
+ (or (plist-get o :availability) ""))
+ "lightgray")
+ (t "lightgreen")))))
(dom-node
'g
`((transform . ,(format "translate(%d,%d)"
@@ -352,13 +357,17 @@ Each function should take the info and manipulate it as needed, returning the ne
(defun emacsconf-schedule-get-subsequence (info start &optional end)
"START and END are regexps to match against the title in INFO."
- (seq-subseq info
- (1+ (seq-position info start
- (lambda (o match) (string-match match (plist-get o :title)))))
- (if end
- (seq-position info end
- (lambda (o match) (string-match match (plist-get o :title))))
- (length info))))
+ (let ((start-position
+ (and start
+ (seq-position info start
+ (lambda (o match) (string-match match (plist-get o :title)))))))
+ (seq-subseq info
+ (or start-position 0)
+ (if end
+ (seq-position (seq-subseq info (or start-position 0))
+ end
+ (lambda (o match) (string-match match (plist-get o :title))))
+ (length info)))))
;;; Schedule summary
@@ -586,5 +595,6 @@ Both start and end time are tested."
"")
(or (plist-get o :availability) "")))))
+(defvar emacsconf-schedule-plan nil "Sequence of talks.")
(provide 'emacsconf-schedule)
;;; emacsconf-schedule.el ends here