From f2df64db7df3325af25708f8cde5773ab4499daa Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 21 Oct 2022 17:24:45 +0200 Subject: Add watch script for prerecs --- 2022/organizers-notebook.md | 60 ++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 57 insertions(+), 3 deletions(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index 6b17a943..08118dcc 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -695,7 +695,12 @@ in prod or docker container ### TODO restreamers on live0 -### TODO icecast on live0 +### STARTED icecast on live0 + +(find-file “/ssh:live|sudo::/etc/icecast2/icecast.xml”) + + +#### TODO Set up watch/gen/480p ### TODO publishing environment @@ -2307,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form - +
@@ -3241,7 +3246,7 @@ Where: Nice if there’s an Ansible playbook sachac’s notes: - + - probably good to set it up on front It’s now on front. @@ -3907,6 +3912,55 @@ chatter in the other lists Cc’d on this message. Thank you. (message "Back to safety. Phew!") +## Prerecs + + +### Receive notification when new prerecs are available + + #!/usr/bin/env sh + + set -xeu + + sleep_duration=1800 + + data=prerec-wait-new.data + touch check-new-prerecs.data + + prerecs_number_current="$(TERM=xterm ssh orga@media.emacsconf.org -- ls -1 /srv/upload | wc -l)" + + plural() { + if [ "$2" = 1 ] || [ "$2" = -1 ]; then + echo "${1}" + else + case $1 in + "is" ) + "are" + ;; + * ) + "${1}s" + esac + fi + } + + notify() { + echo "$1" + notify-send -t 0 "EmacsConf" "$1" + } + + prerecs_number_past=$(cat check-new-prerecs.data) + diff=$((prerecs_number_current - prerecs_number_past)) + + echo "Currently waiting for prerec" + + while [ $diff = 0 ]; do + sleep "$sleep_duration" + done + + notify "Yay~, $diff new $(plural "prerec" $diff) $(plural "is" $diff) available!" + + echo "$prerecs_number_current" > "$data" + + ## Publish this page (defun emacsconf-org-publish-this-page () -- cgit v1.2.3 From f9ea05ec16bada6539c8a7588ed4662da6c5f333 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 21 Oct 2022 17:27:59 +0200 Subject: Remove debugging flag --- 2022/organizers-notebook.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index 08118dcc..5577e8fb 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -2312,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form -
+
@@ -3919,7 +3919,7 @@ chatter in the other lists Cc’d on this message. Thank you. #!/usr/bin/env sh - set -xeu + set -eu sleep_duration=1800 -- cgit v1.2.3 From 5d5ca79c681f2a78967ddb9ac6527fb77935b40e Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 21 Oct 2022 17:32:55 +0200 Subject: Fix unmodified name --- 2022/organizers-notebook.md | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index 5577e8fb..c2849cc7 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -2312,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form -
+
@@ -3926,8 +3926,6 @@ chatter in the other lists Cc’d on this message. Thank you. data=prerec-wait-new.data touch check-new-prerecs.data - prerecs_number_current="$(TERM=xterm ssh orga@media.emacsconf.org -- ls -1 /srv/upload | wc -l)" - plural() { if [ "$2" = 1 ] || [ "$2" = -1 ]; then echo "${1}" @@ -3947,11 +3945,12 @@ chatter in the other lists Cc’d on this message. Thank you. notify-send -t 0 "EmacsConf" "$1" } - prerecs_number_past=$(cat check-new-prerecs.data) - diff=$((prerecs_number_current - prerecs_number_past)) - echo "Currently waiting for prerec" + prerecs_number_past=$(cat $data) + prerecs_number_current="$(TERM=xterm ssh orga@media.emacsconf.org -- ls -1 /srv/upload | wc -l)" + diff=$((prerecs_number_current - prerecs_number_past)) + while [ $diff = 0 ]; do sleep "$sleep_duration" done -- cgit v1.2.3 From 7d8553380a41a9ec0e54a7fb63737cc229f09cfd Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 21 Oct 2022 17:40:07 +0200 Subject: Fix quoting --- 2022/organizers-notebook.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index c2849cc7..81f50b43 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -2312,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form -
+
@@ -3924,7 +3924,7 @@ chatter in the other lists Cc’d on this message. Thank you. sleep_duration=1800 data=prerec-wait-new.data - touch check-new-prerecs.data + touch "$data" plural() { if [ "$2" = 1 ] || [ "$2" = -1 ]; then @@ -3947,7 +3947,7 @@ chatter in the other lists Cc’d on this message. Thank you. echo "Currently waiting for prerec" - prerecs_number_past=$(cat $data) + prerecs_number_past=$(cat "$data") prerecs_number_current="$(TERM=xterm ssh orga@media.emacsconf.org -- ls -1 /srv/upload | wc -l)" diff=$((prerecs_number_current - prerecs_number_past)) -- cgit v1.2.3 From b167f67c9fe1fdb905ddbbdf6b1b739a729aa95f Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 21 Oct 2022 17:47:27 +0200 Subject: Fix cond --- 2022/organizers-notebook.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index 81f50b43..4b7195d8 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -2312,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form -
+
@@ -3948,10 +3948,14 @@ chatter in the other lists Cc’d on this message. Thank you. echo "Currently waiting for prerec" prerecs_number_past=$(cat "$data") - prerecs_number_current="$(TERM=xterm ssh orga@media.emacsconf.org -- ls -1 /srv/upload | wc -l)" - diff=$((prerecs_number_current - prerecs_number_past)) + diff=0 - while [ $diff = 0 ]; do + while true; do + prerecs_number_current="$(TERM=xterm ssh orga@media.emacsconf.org -- ls -1 /srv/upload | wc -l)" + diff=$((prerecs_number_current - prerecs_number_past)) + if [ $diff -gt 0 ]; then + break + fi sleep "$sleep_duration" done -- cgit v1.2.3 From 69d530e5f612ac54be85db29d532054dd3cd64c6 Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sat, 22 Oct 2022 13:03:04 +0200 Subject: Comment out unfinished clock-log MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit I should probably remove the file from my org-agenda-files. ʕ •̀ᴥ•́ʔ --- 2022/organizers-notebook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index 4b7195d8..8264cbfb 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -2312,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form -
+
-- cgit v1.2.3 From 4e1a45ec6a7e587331920e1dd517f07fd6df4ebf Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Sat, 22 Oct 2022 13:05:10 +0200 Subject: Fix, but harder --- 2022/organizers-notebook.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2022/organizers-notebook.md') diff --git a/2022/organizers-notebook.md b/2022/organizers-notebook.md index 8264cbfb..b65d3145 100644 --- a/2022/organizers-notebook.md +++ b/2022/organizers-notebook.md @@ -2312,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what’s worth keeping Make a table of the form -
+
-- cgit v1.2.3