summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--2022/organizers-notebook/index.org40
1 files changed, 40 insertions, 0 deletions
diff --git a/2022/organizers-notebook/index.org b/2022/organizers-notebook/index.org
index b315a95c..14e75392 100644
--- a/2022/organizers-notebook/index.org
+++ b/2022/organizers-notebook/index.org
@@ -3787,8 +3787,48 @@ while true; do
_sleep
done
#+end_src
+*** Fetch upload data
+#+begin_src sh :eval no :tangle prerecs-fetch-upload-data.sh
+#!/usr/bin/env sh
+
+set -eu
+
+current_time() {
+ date +"[%T]"
+}
+
+log() {
+ printf "%s $1\n" "$(current_time)"
+}
+if [ -t 0 ]; then
+ log "Fetching data..."
+fi
+TERM=xterm ssh orga@media.emacsconf.org -- cat /srv/upload/*/*json
+#+end_src
+*** Fetch new talk data formatted
+#+begin_src sh :eval no :tangle prerecs-fetch-new.sh
+#!/usr/bin/env sh
+
+set -eu
+
+echo "Fetching data..."
+data_raw="$(./fetch-upload-data.sh)"
+
+echo
+
+echo "$data_raw" | awk "$(cat << EOF
+func dewrap(a) {gsub(/^ *".*": "|",$/, "", a); return a};
+BEGIN {i=0};
+/^ "sid"/ { a[0] = dewrap(\$0); };
+/^ "name"/ { a[2] = sprintf("%s\t", dewrap(\$0)) };
+/^ "comment"/ { a[3] = sprintf("%s\t", dewrap(\$0)); if (a[3] == "\t"){a[3] = "No comment"} };
+/^ "key"/ { a[1] = dewrap(\$0); };
+/^\}/ { printf "[%d]\t%s\t%s\t%s\n\t%s\n\n", i, a[0], a[1], a[2], a[3]; i=i+1};
+EOF
+ )"
+#+end_src
** Publish this page
#+begin_src emacs-lisp
(defun emacsconf-org-publish-this-page ()