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(-) (limited to '2022/organizers-notebook') 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/index.org | 47 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) (limited to '2022/organizers-notebook') 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/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2022/organizers-notebook') 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/index.org | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to '2022/organizers-notebook') 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/index.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to '2022/organizers-notebook') 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/index.org | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to '2022/organizers-notebook') 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/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2022/organizers-notebook') 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/index.org | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to '2022/organizers-notebook') 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