diff options
author | Sacha Chua <sacha@sachachua.com> | 2022-11-02 09:08:51 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2022-11-02 09:08:51 -0400 |
commit | e10ab93db435c18f024c2c30d4939aee18f469c6 (patch) | |
tree | 823239438841651e7cb684f5d4cd59b71e72e637 | |
parent | a737e350040516537ea797af3127b32c73c31365 (diff) | |
download | emacsconf-el-e10ab93db435c18f024c2c30d4939aee18f469c6.tar.xz emacsconf-el-e10ab93db435c18f024c2c30d4939aee18f469c6.zip |
Add tramp info so that the stream can use sudo
Diffstat (limited to '')
-rw-r--r-- | emacsconf-stream.el | 14 | ||||
-rw-r--r-- | emacsconf.el | 4 |
2 files changed, 10 insertions, 8 deletions
diff --git a/emacsconf-stream.el b/emacsconf-stream.el index 3ae5fe1..20704cb 100644 --- a/emacsconf-stream.el +++ b/emacsconf-stream.el @@ -33,14 +33,15 @@ Files should be in YEAR/video-slug--main.webm and video-slug--main.vtt.") "Return user@host for the track." (when (plist-get track :track) (setq track (emacsconf-get-track (plist-get track :track)))) - (concat emacsconf-id "-" (plist-get track :id) "@" emacsconf-stream-host)) + (or (plist-get track :tramp) + (concat "/ssh:" emacsconf-id "-" (plist-get track :id) "@" emacsconf-stream-host))) (defvar emacsconf-stream-bottom-limit 80 "Number of characters for bottom text.") (defun emacsconf-stream-write-news (track message) (interactive (list (emacsconf-complete-track) (read-string "Message: "))) - (with-temp-file (expand-file-name "news.txt" (concat "/ssh:" (emacsconf-stream-track-login track) ":~")) + (with-temp-file (expand-file-name "news.txt" (concat (emacsconf-stream-track-login track) "~")) (insert message))) (defun emacsconf-stream-broadcast (message) @@ -62,7 +63,7 @@ Files should be in YEAR/video-slug--main.webm and video-slug--main.vtt.") (defun emacsconf-stream-set-talk-info-from-strings (track url bottom) (interactive (list (emacsconf-complete-track) (read-string "URL: ") (read-string "Bottom: "))) - (let* ((home (concat "/ssh:" (emacsconf-stream-track-login track) ":~"))) + (let* ((home (concat (emacsconf-stream-track-login track) "~"))) (with-temp-file (expand-file-name "url.txt" home) (insert url)) (with-temp-file (expand-file-name "bottom.txt" home) (insert bottom)))) @@ -110,9 +111,10 @@ Final files should be stored in /data/emacsconf/stream/YEAR/video-slug--main.web (defun emacsconf-stream-play-video (talk) (interactive (list (emacsconf-complete-talk-info))) - (start-process (concat "mpv-" (plist-get talk :slug)) - "test" - "ssh" (emacsconf-stream-track-login talk) "nohup" "~/bin/track-mpv" (emacsconf-stream-get-filename talk) "&")) + (let ((default-directory (emacsconf-stream-track-login talk))) + (start-process (concat "mpv-" (plist-get talk :slug)) + "test" + "~/bin/track-mpv" (emacsconf-stream-get-filename talk)))) (provide 'emacsconf-stream) ;;; emacsconf-stream.el ends here diff --git a/emacsconf.el b/emacsconf.el index 20d7dec..c527c45 100644 --- a/emacsconf.el +++ b/emacsconf.el @@ -931,8 +931,8 @@ (emacsconf-backstage-password . emacsconf_backstage_password)))))) ;; (emacsconf-ansible-load-vars (expand-file-name "prod-vars.yml" emacsconf-ansible-directory)) ;;; Tracks -(defvar emacsconf-tracks '((:name "General" :color "peachpuff" :id "gen" :channel "emacsconf-gen") - (:name "Development" :color "skyblue" :id "dev" :channel "emacsconf-dev"))) +(defvar emacsconf-tracks '((:name "General" :color "peachpuff" :id "gen" :channel "emacsconf-gen" :tramp "/sudo:emacsconf-gen@localhost:") + (:name "Development" :color "skyblue" :id "dev" :channel "emacsconf-dev" :tramp "/sudo:emacsconf-dev@localhost:"))) (defun emacsconf-get-track (name) (when (listp name) (setq name (plist-get name :track))) |