summaryrefslogtreecommitdiffstats
path: root/roles/prerec
diff options
context:
space:
mode:
Diffstat (limited to 'roles/prerec')
-rw-r--r--roles/prerec/defaults/main.yml2
-rw-r--r--roles/prerec/tasks/main.yml11
-rwxr-xr-xroles/prerec/templates/process-prerec.sh4
-rwxr-xr-xroles/prerec/templates/reencode.sh8
-rwxr-xr-xroles/prerec/templates/talk (renamed from roles/prerec/templates/update-task-status.sh)14
5 files changed, 20 insertions, 19 deletions
diff --git a/roles/prerec/defaults/main.yml b/roles/prerec/defaults/main.yml
new file mode 100644
index 0000000..3668655
--- /dev/null
+++ b/roles/prerec/defaults/main.yml
@@ -0,0 +1,2 @@
+reencode_quality: 32
+reencode_cpu: 4
diff --git a/roles/prerec/tasks/main.yml b/roles/prerec/tasks/main.yml
index 954c5a7..e44617d 100644
--- a/roles/prerec/tasks/main.yml
+++ b/roles/prerec/tasks/main.yml
@@ -24,22 +24,21 @@
dest: "{{ emacsconf_caption_dir }}/scripts/reencode.sh"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
- # This avoids overwriting zaeph's
- force: no
+ backup: yes
mode: 0775
- name: Copy scripts for processing
- tags: process-prerec
+ tags: process-prerec, wip
template:
src: "{{ item }}"
- dest: "{{ emacsconf_caption_dir }}/scripts/{{ item }}"
+ dest: "/usr/local/bin/{{ item }}"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
mode: 0775
loop:
- process-prerec.sh
- - update-task-status.sh
+ - talk
- upload.sh
- publish-backstage-index.sh
- update-emacsconf.sh
- thumbnail.sh
-
+ - reencode.sh
diff --git a/roles/prerec/templates/process-prerec.sh b/roles/prerec/templates/process-prerec.sh
index 8fdca72..4544b43 100755
--- a/roles/prerec/templates/process-prerec.sh
+++ b/roles/prerec/templates/process-prerec.sh
@@ -10,9 +10,9 @@ if ! ( screen -ls | grep -q $SLUG ); then
screen -dmS $SCREEN
fi
( cd /data/emacsconf/cache; ./update-cache )
-# /data/emacsconf/2022/scripts/update-task-status.sh $SLUG "WAITING_FOR_PREREC" "PROCESSING"
+# /data/emacsconf/2022/scripts/talk $SLUG "WAITING_FOR_PREREC" "PROCESSING"
#if [[ ! -f "$REENCODED" ]]; then
screen -S $SCREEN -X screen -t reencode-$SLUG /bin/bash -c "/data/emacsconf/2022/scripts/reencode.sh \"$ORIGINAL\" \"$REENCODED\" && /data/emacsconf/2022/scripts/upload.sh $REENCODED $MAIN && /data/emacsconf/2022/scripts/thumbnail.sh \"$MAIN\" && /data/emacsconf/2022/scripts/upload.sh $(echo "$MAIN" | sed s/webm$/png/) exec /bin/bash" &
#fi
-screen -S $SCREEN -X screen -t captions-$SLUG /bin/bash -c "/data/emacsconf/2022/scripts/process-captions.py $(dirname $ORIGINAL); /data/emacsconf/2022/scripts/update-task-status.sh $SLUG PROCESSING TO_ASSIGN; exec /bin/bash"
+screen -S $SCREEN -X screen -t captions-$SLUG /bin/bash -c "/data/emacsconf/2022/scripts/process-captions.py $(dirname $ORIGINAL); exec /bin/bash"
screen -x $SCREEN
diff --git a/roles/prerec/templates/reencode.sh b/roles/prerec/templates/reencode.sh
index 63be1d0..b0bdfc7 100755
--- a/roles/prerec/templates/reencode.sh
+++ b/roles/prerec/templates/reencode.sh
@@ -3,12 +3,12 @@
set -euo pipefail
# Defaults
-q=32
-cpu=4
+q={{ reencode_quality }}
+cpu={{ reencode_cpu }}
time_limit=""
print_only=false
-limit_resolution=1080
-limit_fps=30
+limit_resolution={{ res_y }}
+limit_fps={{ fps }}
while getopts :q:c:t:s OPT; do
case $OPT in
diff --git a/roles/prerec/templates/update-task-status.sh b/roles/prerec/templates/talk
index b3f59d2..0531cda 100755
--- a/roles/prerec/templates/update-task-status.sh
+++ b/roles/prerec/templates/talk
@@ -1,7 +1,7 @@
#!/bin/bash
# {{ ansible_managed }}
-# How to use: update-task-status.sh slug from-status-regexp to-status
-# or update-task-status.sh slug to-status
+# How to use: talk slug from-status-regexp to-status
+# or talk slug to-status
SLUG="$1"
FROM_STATUS="$2"
@@ -11,11 +11,11 @@ if [ "x$TO_STATUS" == "x" ]; then
TO_STATUS="$2"
fi
cd {{ emacsconf_private_dir }}
-echo "Pulling conf.org..."
-git pull
+#echo "Pulling conf.org..."
+#git pull
echo "Updating status..."
emacsclient --eval "(emacsconf-with-todo-hooks (emacsconf-update-talk-status \"$SLUG\" \"$FROM_STATUS\" \"$TO_STATUS\"))" -a emacs
-echo "Committing and pushing in the background"
-git commit -m "Update task status for $SLUG from $FROM_STATUS to $TO_STATUS" conf.org
-git push &
+#echo "Committing and pushing in the background"
+#git commit -m "Update task status for $SLUG from $FROM_STATUS to $TO_STATUS" conf.org
+#git push &