diff options
Diffstat (limited to '')
-rw-r--r-- | 2022/organizers-notebook.md | 60 | ||||
-rw-r--r-- | 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 -<table id="orgecfc040" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> +<table id="org8eb532e" border="2" cellspacing="0" cellpadding="6" rules="groups" frame="hsides"> <colgroup> @@ -3241,7 +3246,7 @@ Where: Nice if there’s an Ansible playbook sachac’s notes: - <file:///home/sacha/code/docker/emacsconf-publish/> + <file:///home/zaeph/code/docker/emacsconf-publish/> - 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 |