summaryrefslogtreecommitdiffstats
path: root/roles/caption
diff options
context:
space:
mode:
authorSacha Chua <sacha@sachachua.com>2024-10-01 19:59:03 -0400
committerSacha Chua <sacha@sachachua.com>2024-10-01 19:59:03 -0400
commit2be81b299be9cad0b03495f2ea038a01969c6cb2 (patch)
tree6f798cdf8233d0c1079eaff3a52fd3bdabf8bdf7 /roles/caption
parenta50799ae2d27ea57f9f470a9ecfb06dd77499c34 (diff)
downloademacsconf-ansible-2be81b299be9cad0b03495f2ea038a01969c6cb2.tar.xz
emacsconf-ansible-2be81b299be9cad0b03495f2ea038a01969c6cb2.zip
Update for new ansible version
Diffstat (limited to '')
-rw-r--r--roles/caption/tasks/main.yml2
-rwxr-xr-xroles/caption/templates/process-captions.py8
2 files changed, 5 insertions, 5 deletions
diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml
index fea78f4..d3ee4c0 100644
--- a/roles/caption/tasks/main.yml
+++ b/roles/caption/tasks/main.yml
@@ -18,7 +18,7 @@
- torchaudio
- num2words
- name: Set up aeneas
- include: aeneas.yml
+ include_tasks: aeneas.yml
- name: Create group
group:
name: "{{ emacsconf_group }}"
diff --git a/roles/caption/templates/process-captions.py b/roles/caption/templates/process-captions.py
index a42439b..fde766c 100755
--- a/roles/caption/templates/process-captions.py
+++ b/roles/caption/templates/process-captions.py
@@ -114,8 +114,8 @@ def extract_audio(work):
log("Extracting audio from %s acodec %s" % (work['video'], acodec))
output = subprocess.check_output(['ffmpeg', '-y', '-i', work['video'], '-acodec', acodec, '-vn', new_file], stderr=subprocess.STDOUT)
work['audio'] = new_file
- if os.path.isfile("/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh"):
- subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['audio']])
+ if os.path.isfile("/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh"):
+ subprocess.call(["/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh", work['audio']])
return work
def to_sec(time_str):
@@ -150,8 +150,8 @@ def generate_captions(work):
txt_writer(result, work['audio'], {'max_line_width': 60, 'max_line_count': None, 'highlight_words': None})
work['vtt'] = new_file
work['txt'] = work['base'] + '.txt'
- if os.path.isfile("/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh"):
- subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['vtt'], work['txt']])
+ if os.path.isfile("/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh"):
+ subprocess.call(["/data/emacsconf/admin/{{ emacsconf_year }}/scripts/upload.sh", work['vtt'], work['txt']])
if 'srv2' in work: del work['srv2']
return work