add anki import scripts, download missing audio
This commit is contained in:
parent
f5bc166276
commit
1ee725d0a6
BIN
oxford_api/audio/1021_scintilla_1.mp3
Normal file
BIN
oxford_api/audio/1021_scintilla_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/1081_form_1.mp3
Normal file
BIN
oxford_api/audio/1081_form_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/10_abreast_1.mp3
Normal file
BIN
oxford_api/audio/10_abreast_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/1164_bar_1.mp3
Normal file
BIN
oxford_api/audio/1164_bar_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/1251_later_1.mp3
Normal file
BIN
oxford_api/audio/1251_later_1.mp3
Normal file
Binary file not shown.
Binary file not shown.
BIN
oxford_api/audio/1290_pot_1.mp3
Normal file
BIN
oxford_api/audio/1290_pot_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/1336_chagrin_1.mp3
Normal file
BIN
oxford_api/audio/1336_chagrin_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/1415_exult_1.mp3
Normal file
BIN
oxford_api/audio/1415_exult_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/378_hack_1.mp3
Normal file
BIN
oxford_api/audio/378_hack_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/605_post_1.mp3
Normal file
BIN
oxford_api/audio/605_post_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/622_pro_1.mp3
Normal file
BIN
oxford_api/audio/622_pro_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/783_plethora_1.mp3
Normal file
BIN
oxford_api/audio/783_plethora_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/822_accession_1.mp3
Normal file
BIN
oxford_api/audio/822_accession_1.mp3
Normal file
Binary file not shown.
BIN
oxford_api/audio/830_barrage_1.mp3
Normal file
BIN
oxford_api/audio/830_barrage_1.mp3
Normal file
Binary file not shown.
13
oxford_api/format_audio_for_import
Executable file
13
oxford_api/format_audio_for_import
Executable file
@ -0,0 +1,13 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
for file in json/*.json
|
||||||
|
do
|
||||||
|
#echo "file:$file"
|
||||||
|
no="$(echo "$file" | cut -d'_' -f1 | sed 's|json/||')"
|
||||||
|
word="$(echo "$file" | cut -d'_' --complement -f1 | sed 's/\.json$//')"
|
||||||
|
sounds="$(for audio in audio/"$no"_$word*
|
||||||
|
do
|
||||||
|
file="$(echo "$audio" | sed 's/audio\///')"
|
||||||
|
printf '[sound:%s]' "$file"
|
||||||
|
done)"
|
||||||
|
printf '%s\t%s\n' "$no" "$sounds"
|
||||||
|
done
|
15
oxford_api/get_pronunciation
Executable file
15
oxford_api/get_pronunciation
Executable file
@ -0,0 +1,15 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
for file in json/*.json
|
||||||
|
do
|
||||||
|
#echo "file:$file"
|
||||||
|
no="$(echo "$file" | cut -d'_' -f1 | sed 's|json/||')"
|
||||||
|
word="$(echo "$file" | cut -d'_' --complement -f1 | sed 's/\.json$//')"
|
||||||
|
spellings="$(jq -r '.results[].lexicalEntries[].entries[].pronunciations[] | .phoneticSpelling' "$file" | awk '!seen[$0]++')"
|
||||||
|
if [ -z "$spellings" ]; then
|
||||||
|
echo "ERROR: no spelling for $word found!"
|
||||||
|
continue
|
||||||
|
fi
|
||||||
|
formatted="$(echo "$spellings" | sed 's/^/\//; s/$/\//' | sed 's/$/<br>/' | tr -d '\n' | sed 's/<br>$//')"
|
||||||
|
printf '%s\t%s\n' "$no" "$formatted"
|
||||||
|
done
|
Loading…
x
Reference in New Issue
Block a user