From 77349d924e95ba1ebb4124a8cbb76eb6f532c9ec Mon Sep 17 00:00:00 2001 From: Leo Vivier Date: Fri, 21 Oct 2022 17:21:34 +0200 Subject: Fix trailing whitespace --- 2022/organizers-notebook/index.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 86057caa..68abe0e6 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -51,7 +51,7 @@ or ~C-c \~ (~org-match-sparse-tree~) to see anything tagged with your tag. ~org-agenda~ with ~<~ for the file restriction may also be handy. -* Cadence +* Cadence :PROPERTIES: :CUSTOM_ID: cadence :OWNER: sachac @@ -2063,7 +2063,7 @@ Make a table of the form *** People have a hard time seeing dark-mode presentations (or light-mode) mpv --vf=negate $url -* Task archive +* Task archive :PROPERTIES: :CUSTOM_ID: archive :END: -- cgit v1.2.3 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 ++++++++++++++++++++++++++++++++++++-- 2022/organizers-notebook/index.org | 47 +++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+), 3 deletions(-) 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 () diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 68abe0e6..0a31aced 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -3376,6 +3376,53 @@ Throw an error if ERROR is non-nil, skip otherwise." (message "Back to safety. Phew!") #+end_src +** Prerecs +*** Receive notification when new prerecs are available +#+begin_src sh :eval no :tangle prerecs-wait-new.sh +#!/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" +#+end_src + ** Publish this page #+begin_src emacs-lisp -- 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 ++-- 2022/organizers-notebook/index.org | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) 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 diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 0a31aced..89dc1c4b 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -3381,7 +3381,7 @@ Throw an error if ERROR is non-nil, skip otherwise." #+begin_src sh :eval no :tangle prerecs-wait-new.sh #!/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 +++++------ 2022/organizers-notebook/index.org | 9 ++++----- 2 files changed, 9 insertions(+), 11 deletions(-) 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 diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 89dc1c4b..9d80af36 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -3388,8 +3388,6 @@ 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}" @@ -3409,11 +3407,12 @@ notify() { 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 +++--- 2022/organizers-notebook/index.org | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) 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)) diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 9d80af36..059d01e6 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -3386,7 +3386,7 @@ set -eu sleep_duration=1800 data=prerec-wait-new.data -touch check-new-prerecs.data +touch "$data" plural() { if [ "$2" = 1 ] || [ "$2" = -1 ]; then @@ -3409,7 +3409,7 @@ notify() { 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 ++++++++---- 2022/organizers-notebook/index.org | 12 ++++++++---- 2 files changed, 16 insertions(+), 8 deletions(-) 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 diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 059d01e6..667747f0 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -3396,7 +3396,7 @@ plural() { "is" ) "are" ;; - * ) + ,* ) "${1}s" esac fi @@ -3410,10 +3410,14 @@ notify() { 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 +- 2022/organizers-notebook/index.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -
+
diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index 667747f0..a1b8edd4 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -407,7 +407,7 @@ in prod or docker container :Effort: 1:00 :END: :LOGBOOK: -CLOCK: [2022-10-20 Thu 12:36] +# CLOCK: [2022-10-20 Thu 12:36] :END: (find-file "/ssh:live|sudo::/etc/icecast2/icecast.xml") -- 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 +- 2022/organizers-notebook/index.org | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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 -
+
diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org index a1b8edd4..f998db87 100644 --- a/2022/organizers-notebook/index.org +++ b/2022/organizers-notebook/index.org @@ -407,7 +407,7 @@ in prod or docker container :Effort: 1:00 :END: :LOGBOOK: -# CLOCK: [2022-10-20 Thu 12:36] +[2022-10-20 Thu 12:36] :END: (find-file "/ssh:live|sudo::/etc/icecast2/icecast.xml") -- cgit v1.2.3