Closed Captions / Subtitles for Vintage Story.
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add a shell script to scan for missing sounds.

+24
+24
report-missing.sh
··· 1 + #!/usr/bin/env fish 2 + argparse 'd/domain=' -- $argv 3 + or return 4 + 5 + set -l domain "survival" 6 + set -ql _flat_domain 7 + and set domain $_flat_domain 8 + 9 + set -l asset_directory "/Applications/Vintage Story.app/assets/"$domain"/sounds/" 10 + set -l data_file "ClosedCaptions/assets/captions/captions/"$domain".json" 11 + 12 + stat $asset_directory >/dev/null 13 + or return 14 + stat $data_file >/dev/null 15 + or return 16 + 17 + set -l keys (find $asset_directory -iname "*.ogg" | string replace $asset_directory "" | string replace ".ogg" "") 18 + for key in $keys 19 + # Reformat key to strip numbers. 20 + set clean_key (string replace -r '[/\d_-]+$' "" $key) 21 + if not jq -e '.["'$clean_key'"]' $data_file >/dev/null 22 + echo $clean_key is missing. 23 + end 24 + end | sort | uniq