summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-11-16 08:04:19 -0500
committerSacha Chua <sacha@sachachua.com>2024-11-16 08:04:19 -0500
commitf4083224e1da8a5a5abe7751e2a5df587290c5f7 (patch)
treecd615e63ce3a496d489f8446e2c212db671ae93a
parent6044d5f92e4c9545218f59c675b87b1803150894 (diff)
downloademacsconf-ansible-main.tar.xz
emacsconf-ansible-main.zip
update shell scriptsHEADmain
-rw-r--r--roles/obs/defaults/main.yml2
-rw-r--r--roles/obs/tasks/track.yml2
-rw-r--r--roles/obs/templates/i3-config2
-rwxr-xr-xroles/obs/templates/overlay20
-rwxr-xr-xroles/obs/templates/play-with-intro9
-rw-r--r--roles/obs/templates/set-overlay20
-rw-r--r--roles/publish/tasks/emacs.yml2
-rw-r--r--roles/publish/tasks/main.yml2
-rw-r--r--roles/publish/templates/emacsconf-config.el4
9 files changed, 30 insertions, 33 deletions
diff --git a/roles/obs/defaults/main.yml b/roles/obs/defaults/main.yml
index 1c193e0..d95b900 100644
--- a/roles/obs/defaults/main.yml
+++ b/roles/obs/defaults/main.yml
@@ -3,7 +3,7 @@ ff_vcustom: rt cpu-used=5 threads=2 error-resilient=1 crf=30 g=120 minrate=1.5M
ff_vbitrate: 1500
ff_vgopsize: 120
obs_profile_path: /home/{{ emacsconf_user }}/.config/obs-studio/basic/profiles
-emacsconf_asset_dir: /data/{{ emacsconf_id }}/assets
+emacsconf_asset_dir: /data/{{ emacsconf_id }}/shared/{{ emacsconf_year }}/assets
mumble_server: mumble.emacsconf.org
background_music_dir: "{{ emacsconf_asset_dir }}/music"
background_music_volume: 30
diff --git a/roles/obs/tasks/track.yml b/roles/obs/tasks/track.yml
index 3d3a8d6..cbd4b39 100644
--- a/roles/obs/tasks/track.yml
+++ b/roles/obs/tasks/track.yml
@@ -103,7 +103,7 @@
include_tasks: emacs.yml
- name: Set up symbolic links
file:
- src: "/data/{{ emacsconf_id }}/assets/stream"
+ src: "/data/{{ emacsconf_id }}/shared/{{ emacsconf_year }}/assets/stream"
dest: "~{{ emacsconf_user }}/stream"
state: link
diff --git a/roles/obs/templates/i3-config b/roles/obs/templates/i3-config
index 1787b64..31a7b40 100644
--- a/roles/obs/templates/i3-config
+++ b/roles/obs/templates/i3-config
@@ -23,7 +23,7 @@ font pango:monospace 8
# xss-lock grabs a logind suspend inhibit lock and will use i3lock to lock the
# screen before suspend. Use loginctl lock-session to lock your screen.
-exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
+# exec --no-startup-id xss-lock --transfer-sleep-lock -- i3lock --nofork
# NetworkManager is the most popular way to manage wireless networks on Linux,
# and nm-applet is a desktop environment-independent system tray GUI for it.
diff --git a/roles/obs/templates/overlay b/roles/obs/templates/overlay
index 1361884..0836a59 100755
--- a/roles/obs/templates/overlay
+++ b/roles/obs/templates/overlay
@@ -3,20 +3,20 @@
SLUG=$(echo "$1" | perl -ne 'if (/emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ]]; then
echo "Found other overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ~/other.png
-elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ~/other.png
+elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/other.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/other.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png, please override ~/other.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.svg.png ~/other.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png, please override ~/other.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.png ~/other.png
fi
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/video.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/video.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png, override ~/video.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.svg.png ~/video.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png, override ~/video.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.png ~/video.png
fi
diff --git a/roles/obs/templates/play-with-intro b/roles/obs/templates/play-with-intro
index 7f7865b..0390f8f 100755
--- a/roles/obs/templates/play-with-intro
+++ b/roles/obs/templates/play-with-intro
@@ -13,15 +13,10 @@ PREFIX=$(get-file-prefix $SLUG)
/usr/local/bin/reset-state
# Update the overlay
-overlay $SLUG
+/usr/local/bin/overlay $SLUG
# Play the intro if it exists. If it doesn't exist, switch to the intro slide and stop processing.
-if [[ -f $CACHE_DIR/$PREFIX--intro.webm ]]; then
- mpv $CACHE_DIR/$PREFIX--intro.webm
-else
- firefox --kiosk $BASE_DIR/assets/in-between/$SLUG.png
- exit 0
-fi
+/usr/local/bin/intro $SLUG
/usr/local/bin/play $SLUG
diff --git a/roles/obs/templates/set-overlay b/roles/obs/templates/set-overlay
index 0b6712b..8a408bf 100644
--- a/roles/obs/templates/set-overlay
+++ b/roles/obs/templates/set-overlay
@@ -6,20 +6,20 @@ if [[ ! -f $FILE ]]; then
fi
shift
SLUG=$(echo "$FILE" | perl -ne 'if (/^emacsconf-[0-9]*-(.*?)--/) { print $1; } else { print; }')
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ]]; then
echo "Found other overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png ~/other.png
-elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png ~/other.png
+elif [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/other.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/other.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.svg.png, please override ~/other.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.svg.png ~/other.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-other.png, please override ~/other.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-other.png ~/other.png
fi
-if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ]]; then
+if [[ -f {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ]]; then
echo "Found video overlay for $SLUG, copying"
- cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png ~/video.png
+ cp {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png ~/video.png
else
- echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.svg.png, override ~/video.png manually"
- cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.svg.png ~/video.png
+ echo "Could not find {{ emacsconf_caption_dir }}/assets/overlays/$SLUG-video.png, override ~/video.png manually"
+ cp {{ emacsconf_caption_dir }}/assets/overlays/blank-video.png ~/video.png
fi
diff --git a/roles/publish/tasks/emacs.yml b/roles/publish/tasks/emacs.yml
index 3944876..d961878 100644
--- a/roles/publish/tasks/emacs.yml
+++ b/roles/publish/tasks/emacs.yml
@@ -8,6 +8,8 @@
- pkg-config
- libjansson-dev
- libgnutls28-dev
+ - libtiff-dev
+ - libtiff5-dev
- automake
- texinfo
state: present
diff --git a/roles/publish/tasks/main.yml b/roles/publish/tasks/main.yml
index 546a4f0..797ac7f 100644
--- a/roles/publish/tasks/main.yml
+++ b/roles/publish/tasks/main.yml
@@ -26,7 +26,7 @@
- name: Set up Emacs
become: yes
import_tasks: emacs.yml
- when: not emacs.stat.exists
+ # when: not emacs.stat.exists
- name: Configure git
template:
src: git-config
diff --git a/roles/publish/templates/emacsconf-config.el b/roles/publish/templates/emacsconf-config.el
index 05f705a..767de85 100644
--- a/roles/publish/templates/emacsconf-config.el
+++ b/roles/publish/templates/emacsconf-config.el
@@ -23,8 +23,8 @@
(setq emacsconf-upload-dir "/ssh:orga@media.emacsconf.org:/srv/upload")
{% if ansible_host == "res.emacsconf.org" %}
-(setq emacsconf-res-dir "/data/{{ emacsconf_id }}/{{ emacsconf_year}}")
-(setq emacsconf-cache-dir "/data/{{ emacsconf_id }}/cache")
+(setq emacsconf-res-dir "/data/{{ emacsconf_id }}/shared/{{ emacsconf_year}}")
+(setq emacsconf-cache-dir "/data/{{ emacsconf_id }}/shared/{{ emacsconf_year}}/cache")
(setq emacsconf-stream-host "localhost")
(setq emacsconf-stream-overlay-dir "{{ emacsconf_caption_dir }}/assets/overlays")
(setq emacsconf-stream-asset-dir "{{ emacsconf_caption_dir }}/assets")