From cf3ab315f2df9f4548bec5fcd336a839a68291ec Mon Sep 17 00:00:00 2001 From: Sacha Chua Date: Mon, 13 Dec 2021 01:20:27 -0500 Subject: Add base variables --- emacsconf.el | 79 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) create mode 100644 emacsconf.el (limited to 'emacsconf.el') diff --git a/emacsconf.el b/emacsconf.el new file mode 100644 index 0000000..8f2be80 --- /dev/null +++ b/emacsconf.el @@ -0,0 +1,79 @@ +;;; emacsconf.el --- Core functions and variables for EmacsConf -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Sacha Chua + +;; Author: Sacha Chua +;; Keywords: multimedia + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;; + +;;; Code: + +(defgroup emacsconf nil "EmacsConf" :group 'multimedia) + +(defcustom emacsconf-name "EmacsConf" + "Name of conference" + :group 'emacsconf + :type 'string) +(defcustom emacsconf-year "2021" + "Conference year. String for easy inclusion." + :group 'emacsconf + :type 'string) +(defcustom emacsconf-directory "~/vendor/emacsconf-wiki" + "Directory where the wiki files are." + :group 'emacsconf + :type 'directory) +(defcustom emacsconf-timezones '("America/Toronto" "America/Los_Angeles" "UTC" "Europe/Paris" "Europe/Athens" "Asia/Kolkata" "Asia/Singapore" "Asia/Tokyo") "List of timezones." + :group 'emacsconf + :type '(repeat string)) + +(defcustom emacsconf-base-url "https://emacsconf.org/" "Includes trailing slash" + :group 'emacsconf + :type 'string) +(defcustom emacsconf-publishing-phase 'resources + "Controls what information to include. +'program - don't include times +'schedule - include times; use this leading up to the conference +'resources - after the emacsconference, don't need status" + :group 'emacsconf + :type '(choice + (const :tag "Program: Don't include times" program) + (const :tag "Schedule: Include detailed times" schedule) + (const :tag "Resources: Don't include status" resources))) + +(defcustom emacsconf-org-file nil + "Path to the Org file with conference information." + :type 'file + :group 'emacsconf) + +(defcustom emacsconf-upcoming-file nil + "Path to the Org file with upcoming talks." + :type 'file + :group 'emacsconf) + +(defcustom emacsconf-download-directory "~/Downloads" + "Directory to check for downloaded files." + :type 'directory + :group 'emacsconf) + +(defun emacsconf-latest-file (path &optional filter) + "Return the newest file in PATH. Optionally filter by FILTER." + (car (sort (seq-remove #'file-directory-p (directory-files path 'full filter t)) #'file-newer-than-file-p))) + +(provide 'emacsconf) +;;; emacsconf.el ends here -- cgit v1.2.3