summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2022-10-12 09:27:08 -0400
committerSacha Chua <sacha@sachachua.com>2022-10-12 09:27:08 -0400
commitf88668e69740986e776b72d9e929902f9128d60d (patch)
tree2c976bdd32a30f51f1e330cb7240115dc2c4e940
parent2ec605d934911db56a07fddf63223f24c22fa1e5 (diff)
downloademacsconf-el-f88668e69740986e776b72d9e929902f9128d60d.tar.xz
emacsconf-el-f88668e69740986e776b72d9e929902f9128d60d.zip
Ansible-related support code
-rw-r--r--emacsconf.el20
1 files changed, 19 insertions, 1 deletions
diff --git a/emacsconf.el b/emacsconf.el
index e027a74..d5d4c53 100644
--- a/emacsconf.el
+++ b/emacsconf.el
@@ -38,7 +38,10 @@
"Directory where the wiki files are."
:group 'emacsconf
:type 'directory)
-
+(defcustom emacsconf-ansible-directory nil
+ "Directory where the Ansible repository is."
+ :group 'emacsconf
+ :type 'directory)
(defcustom emacsconf-timezone "US/Eastern" "Main timezone."
:group 'emacsconf
@@ -869,5 +872,20 @@ Include some other things, too, such as emacsconf-year, title, name, email, url,
(message "Missing %s" (mapconcat #'symbol-name missing ", "))
(format "Missing %s" (mapconcat #'symbol-name missing ", "))))))
+;;; Ansible support
+(defun emacsconf-ansible-export-talks ()
+ (interactive)
+ (when emacsconf-ansible-directory
+ (with-temp-file (expand-file-name "talks.json" emacsconf-ansible-directory)
+ (insert (json-encode (list :talks
+ (mapcar (lambda (o)
+ (apply 'list
+ (cons :start-time (format-time-string "%FT%T%z" (plist-get o :start-time) t))
+ (cons :end-time (format-time-string "%FT%T%z" (plist-get o :end-time) t))
+ (mapcar (lambda (field)
+ (cons field (plist-get o field)))
+ '(:slug :title :speakers :pronouns :pronunciation :url :track)))
+ )
+ (emacsconf-filter-talks (emacsconf-get-talk-info)))))))))
(provide 'emacsconf)
;;; emacsconf.el ends here