summaryrefslogtreecommitdiffstats
path: root/2022/organizers-notebook
diff options
context:
space:
mode:
authorLeo Vivier <zaeph@zaeph.net>2022-10-21 17:24:45 +0200
committerLeo Vivier <zaeph@zaeph.net>2022-10-21 17:24:45 +0200
commitf2df64db7df3325af25708f8cde5773ab4499daa (patch)
treebc890968524c0beb68b9883683c813ff9c641501 /2022/organizers-notebook
parent77349d924e95ba1ebb4124a8cbb76eb6f532c9ec (diff)
downloademacsconf-wiki-f2df64db7df3325af25708f8cde5773ab4499daa.tar.xz
emacsconf-wiki-f2df64db7df3325af25708f8cde5773ab4499daa.zip
Add watch script for prerecs
Diffstat (limited to '')
-rw-r--r--2022/organizers-notebook.md60
-rw-r--r--2022/organizers-notebook/index.org47
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 &ldquo;/ssh:live|sudo::/etc/icecast2/icecast.xml&rdquo;)
+
+
+#### TODO Set up watch/gen/480p
### TODO publishing environment
@@ -2307,7 +2312,7 @@ Probably focus on grabbing the audio first and seeing what&rsquo;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&rsquo;s an Ansible playbook
sachac&rsquo;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&rsquo;s now on front.
@@ -3907,6 +3912,55 @@ chatter in the other lists Cc&rsquo;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