summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2023-10-10 10:19:19 -0400
committerSacha Chua <sacha@sachachua.com>2023-10-10 10:19:19 -0400
commit5c321d33dbf529006049e03ef8fa20ad95646940 (patch)
treeb93bdf5e579114ebe3c5e5c84de9210fa7a0f9d1
parent349730df8736db703ab70c510f0ec3d04f63e726 (diff)
downloademacsconf-ansible-5c321d33dbf529006049e03ef8fa20ad95646940.tar.xz
emacsconf-ansible-5c321d33dbf529006049e03ef8fa20ad95646940.zip
rename VIDEO_SLUG to FILE_PREFIX
Diffstat (limited to '')
-rw-r--r--README.org19
-rwxr-xr-xroles/prerec/templates/rename-original.sh13
2 files changed, 31 insertions, 1 deletions
diff --git a/README.org b/README.org
index ccffb34..ed09db5 100644
--- a/README.org
+++ b/README.org
@@ -64,8 +64,25 @@ ssh ikiwiki@localhost -p 2222 ikiwiki --setup /home/ikiwiki/emacsconf.setup -v
* Processing prerecs
-ansible-playbook -i inventory.yml prod-playbook.yml --tags prerec
+1. Update =group_vars/all.yml=: set =emacsconf_year=.
+2. In the conf.org file, call =M-x emacsconf-set-file-prefixes= to set the file prefixes. Tweak as needed.
+3. Export the talks.json with =M-x emacsconf-ansible-export-talks=.
+4. ansible-playbook -i inventory.yml prod-playbook.yml --tags prerec
+5. ansible-playbook -i inventory.yml prod-playbook.yml --tags caption
+When you receive a file, create a directory for it named =~/current/files/$slug=. Copy the uploaded file as =$video_slug--original.$extension=, or use =rename-original.sh $slug $file=.
+
+Then call =process-prerec.sh $file=. It will launch some screen sessions for reencoding the file and creating the VTT.
+
+
+* Setting up the backstage area
+
+1. Doublecheck the host in [[file:inventory.yml]] and the variables in [[file:roles/media/defaults/main.yml]].
+2. ansible-playbook -i inventory.yml prod-playbook.yml --tags media
+3. Update the following variables in your Emacs configuration:
+ - emacsconf-backstage-dir
+ - emacsconf-backstage-phase
+
* Publishing
Goals:
diff --git a/roles/prerec/templates/rename-original.sh b/roles/prerec/templates/rename-original.sh
new file mode 100755
index 0000000..110d39a
--- /dev/null
+++ b/roles/prerec/templates/rename-original.sh
@@ -0,0 +1,13 @@
+#!/bin/bash
+# {{ ansible_managed }}
+SLUG=$1
+FILE=$2
+TALKS_JSON=${3:-~/current/talks.json}
+filename=$(basename -- "$FILE")
+extension="${filename##*.}"
+filename="${filename%.*}"
+FILE_PREFIX=$(jq -r '.talks[] | select(.slug=="'$SLUG'")["file-prefix"]' < $TALKS_JSON)
+mv "$FILE" $FILE_PREFIX--original.$extension
+if [ -f $FILE_PREFIX--original.webm ] && [ ! -f $FILE_PREFIX--main.$extension ]; then
+ cp $FILE_PREFIX--original.$extension $FILE_PREFIX--main.webm
+fi