diff options
author | Sacha Chua <sacha@sachachua.com> | 2023-09-13 08:58:06 -0400 |
---|---|---|
committer | Sacha Chua <sacha@sachachua.com> | 2023-09-13 08:58:24 -0400 |
commit | 077112b718eb29aecf331b1e703e7e90d8538e6c (patch) | |
tree | 5eab58517501dce8c79101bb7740c5000c506511 /roles/caption | |
parent | 366d6aec267f543f9a7b928778a09b80852346f3 (diff) | |
download | emacsconf-ansible-077112b718eb29aecf331b1e703e7e90d8538e6c.tar.xz emacsconf-ansible-077112b718eb29aecf331b1e703e7e90d8538e6c.zip |
add some more scripts, change 2022 to emacsconf_year
Diffstat (limited to 'roles/caption')
-rw-r--r-- | roles/caption/tasks/main.yml | 18 | ||||
-rwxr-xr-x | roles/caption/templates/process-captions.py | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/roles/caption/tasks/main.yml b/roles/caption/tasks/main.yml index df35645..b34a67d 100644 --- a/roles/caption/tasks/main.yml +++ b/roles/caption/tasks/main.yml @@ -46,15 +46,15 @@ src: talks.json dest: "{{ emacsconf_caption_dir }}/talks.json" mode: 0664 -- name: Install init.d configuration - tags: system - become: true - template: - src: captions.init.d - dest: /etc/init.d/captions - owner: root - group: root - mode: 0755 +# - name: Install init.d configuration +# tags: system +# become: true +# template: +# src: captions.init.d +# dest: /etc/init.d/captions +# owner: root +# group: root +# mode: 0755 - name: Change the group for all the files file: dest: "{{ emacsconf_caption_dir }}" diff --git a/roles/caption/templates/process-captions.py b/roles/caption/templates/process-captions.py index 9b345fe..dc7ef29 100755 --- a/roles/caption/templates/process-captions.py +++ b/roles/caption/templates/process-captions.py @@ -114,7 +114,7 @@ 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 - subprocess.call(["/data/emacsconf/2022/scripts/upload.sh", work['audio']]) + subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['audio']]) return work def to_sec(time_str): @@ -149,7 +149,7 @@ def generate_captions(work): whisper.utils.write_txt(result['segments'], file=txt) work['vtt'] = new_file work['txt'] = work['base'] + '.txt' - subprocess.call(["/data/emacsconf/2022/scripts/upload.sh", work['vtt'], work['txt']]) + subprocess.call(["/data/emacsconf/{{ emacsconf_year }}/scripts/upload.sh", work['vtt'], work['txt']]) if 'srv2' in work: del work['srv2'] return work |