CABankSakuraCHJP / retriever.sh
Fhrozen's picture
add wav files
583ad2d
raw
history blame contribute delete
632 Bytes
#!/usr/bin/env bash
set -e
set -u
set -o pipefail
lang="jpn"
main_link="https://media.talkbank.org/ca/CallHome/${lang}/0wav"
rm -f *.txt
wget --no-check-certificate ${main_link} -O orig_lnk.txt
ext=wav
mkdir -p dummy/${ext}
grep -e '.'"${ext}"'"' orig_lnk.txt | sed -e 's|.*href="||g' \
| sed -e 's|">.*||g' \
| awk -v LNK=${main_link} '{print LNK "/" $1}' > ${ext}_links.txt
wget --no-check-certificate -i ${ext}_links.txt -c -nc -t 3 -P dummy/${ext}
wget --no-check-certificate https://ca.talkbank.org/data/CallHome/${lang}.zip -c -nc -t 3
unzip -q ${lang}.zip
mv ${lang} dummy/cha
rm -f *.txt
rm -f *.zip