mirror of
https://github.com/extreme-tech-seminar/seven-languages-in-seven-weeks.git
synced 2024-11-28 19:19:57 +00:00
Include end time in announcements
This commit is contained in:
parent
d3505dad70
commit
7c2eef13b6
1 changed files with 24 additions and 2 deletions
|
@ -9,6 +9,27 @@
|
||||||
#+LaTeX_CLASS_OPTIONS: [presentation,aspectratio=169]
|
#+LaTeX_CLASS_OPTIONS: [presentation,aspectratio=169]
|
||||||
|
|
||||||
#+begin_src emacs-lisp :exports results :results silent
|
#+begin_src emacs-lisp :exports results :results silent
|
||||||
|
(defun org-get-scheduled-end-time (pom &optional inherit)
|
||||||
|
(let ((parse-end-time
|
||||||
|
(lambda (time)
|
||||||
|
(let ((ts-regexp (concat org-ts-regexp1
|
||||||
|
"\\(-\\([0-9]\\{1,2\\}\\):\\([0-9]\\{2\\}\\)\\)")))
|
||||||
|
(when (string-match ts-regexp time)
|
||||||
|
(org-parse-time-string (string-join (list (string-join (list (match-string 2 time)
|
||||||
|
(match-string 3 time)
|
||||||
|
(match-string 4 time))
|
||||||
|
"-")
|
||||||
|
(match-string 5 time)
|
||||||
|
(string-join (list (match-string 10 time)
|
||||||
|
(match-string 11 time))
|
||||||
|
":"))
|
||||||
|
" ")))))))
|
||||||
|
(let* ((time (org-entry-get pom "SCHEDULED"))
|
||||||
|
(end-time (org-habit-streaks--parse-scheduled-end-time time)))
|
||||||
|
(if end-time
|
||||||
|
(apply 'encode-time end-time)
|
||||||
|
(org-get-scheduled-time pom inherit)))))
|
||||||
|
|
||||||
(defun xts-announcement (location language)
|
(defun xts-announcement (location language)
|
||||||
(print (string-join `("#+LATEX: \\fontspec{Antonio-Bold}\\color{trek@lightyellow}"
|
(print (string-join `("#+LATEX: \\fontspec{Antonio-Bold}\\color{trek@lightyellow}"
|
||||||
"#+LATEX: \\Huge"
|
"#+LATEX: \\Huge"
|
||||||
|
@ -17,8 +38,9 @@
|
||||||
"#+END_CENTER"
|
"#+END_CENTER"
|
||||||
"#+LATEX: \\Large\\color{trek@lightorange}"
|
"#+LATEX: \\Large\\color{trek@lightorange}"
|
||||||
"#+BEGIN_CENTER"
|
"#+BEGIN_CENTER"
|
||||||
,(format-time-string "%a, %B %e @%l:%M%p"
|
,(concat (format-time-string "%a, %B %e @%l:%M%p"
|
||||||
(org-get-scheduled-time (point)))
|
(org-get-scheduled-time (point)))
|
||||||
|
(format-time-string "-%l:%M%p" (org-get-scheduled-end-time (point))))
|
||||||
"#+END_CENTER"
|
"#+END_CENTER"
|
||||||
"#+LATEX: \\normalsize\\color{trek@lightblue}"
|
"#+LATEX: \\normalsize\\color{trek@lightblue}"
|
||||||
"#+BEGIN_CENTER"
|
"#+BEGIN_CENTER"
|
||||||
|
|
Loading…
Reference in a new issue