summaryrefslogtreecommitdiffstats
path: root/roles/prerec
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--roles/prerec/tasks/main.yml26
-rwxr-xr-xroles/prerec/templates/process-prerec.sh8
2 files changed, 25 insertions, 9 deletions
diff --git a/roles/prerec/tasks/main.yml b/roles/prerec/tasks/main.yml
index 43c9bd5..da62340 100644
--- a/roles/prerec/tasks/main.yml
+++ b/roles/prerec/tasks/main.yml
@@ -1,13 +1,28 @@
- name: Ensure the directory exists
file:
- path: "{{ emacsconf_caption_dir }}/scripts"
+ path: "{{ emacsconf_caption_dir }}/{{ item }}"
state: directory
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
-- name: Create the symlink
+ loop:
+ - scripts
+ - cache
+ - files
+- name: Create the symlinks
file:
- src: "{{ emacsconf_caption_dir }}/scripts"
- dest: "/home/{{ emacsconf_user }}/scripts"
+ src: "{{ emacsconf_caption_dir }}/{{ item }}"
+ dest: "/home/{{ emacsconf_user }}/{{ item }}"
+ owner: "{{ emacsconf_user }}"
+ group: "{{ emacsconf_group }}"
+ state: link
+ loop:
+ - scripts
+ - cache
+ - files
+- name: Create the symlinks
+ file:
+ src: "{{ emacsconf_caption_dir }}"
+ dest: "/home/{{ emacsconf_user }}/current"
owner: "{{ emacsconf_user }}"
group: "{{ emacsconf_group }}"
state: link
@@ -27,7 +42,7 @@
backup: yes
mode: 0775
- name: Copy scripts for processing
- tags: process-prerec, wip
+ tags: process-prerec
template:
src: "{{ item }}"
dest: "/usr/local/bin/{{ item }}"
@@ -43,3 +58,4 @@
- thumbnail.sh
- reencode.sh
- run-aeneas.sh
+ - rename-original.sh
diff --git a/roles/prerec/templates/process-prerec.sh b/roles/prerec/templates/process-prerec.sh
index 69787f2..795753d 100755
--- a/roles/prerec/templates/process-prerec.sh
+++ b/roles/prerec/templates/process-prerec.sh
@@ -9,10 +9,10 @@ SCREEN=reencode-$SLUG
if ! ( screen -ls | grep -q $SLUG ); then
screen -dmS $SCREEN
fi
-( cd /data/emacsconf/cache; ./update-cache )
+# ( cd /data/emacsconf/cache; ./update-cache )
# /data/emacsconf/{{ emacsconf_year }}/scripts/talk $SLUG "WAITING_FOR_PREREC" "PROCESSING"
-#if [[ ! -f "$REENCODED" ]]; then
-screen -S $SCREEN -X screen -t reencode-$SLUG /bin/bash -c "/data/emacsconf/{{ emacsconf_year }}/scripts/reencode.sh \"$ORIGINAL\" \"$REENCODED\" && /data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh $REENCODED $MAIN && /data/emacsconf/{{ emacsconf_year }}/scripts/thumbnail.sh \"$MAIN\" && /data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh $(echo "$MAIN" | sed s/webm$/png/) exec /bin/bash" &
-#fi
+if [[ ! -f "$REENCODED" ]]; then
+ screen -S $SCREEN -X screen -t reencode-$SLUG /bin/bash -c "/data/emacsconf/{{ emacsconf_year }}/scripts/reencode.sh \"$ORIGINAL\" \"$REENCODED\" && /data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh $REENCODED $MAIN && /data/emacsconf/{{ emacsconf_year }}/scripts/thumbnail.sh \"$MAIN\" && /data/emacsconf/{{ emacsconf_year }}/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/{{ emacsconf_year }}/scripts/process-captions.py $(dirname $ORIGINAL); exec /bin/bash"
screen -x $SCREEN