aboutsummaryrefslogtreecommitdiff
path: root/bulk-audio/readme.md
diff options
context:
space:
mode:
authorlonkaars <loek@pipeframe.xyz>2023-10-08 19:26:14 +0200
committerlonkaars <loek@pipeframe.xyz>2023-10-08 19:26:14 +0200
commit711b0913548ebb8b91779633024f51e3133fd162 (patch)
treeaa86951708d40a9191869cf80f23f71fe3c342fe /bulk-audio/readme.md
parent1cf671c61981442b76c575e944bc132f514cf7a5 (diff)
update readme's
Diffstat (limited to 'bulk-audio/readme.md')
-rw-r--r--bulk-audio/readme.md57
1 files changed, 56 insertions, 1 deletions
diff --git a/bulk-audio/readme.md b/bulk-audio/readme.md
index 37b70d4..682794c 100644
--- a/bulk-audio/readme.md
+++ b/bulk-audio/readme.md
@@ -1,7 +1,9 @@
# Bulk audio adder
This is a Python and POSIX shell script that downloads native speaker audio for
-words from the same sources as Yomichan:
+words from the same sources as Yomichan by default. The `./get` script is
+responsible for actually downloading the audio for a word, and can easily be
+modified to work for languages other than Japanese. The default sources are:
- JapanesePod101
- JapanesePod101 (Alternate)
@@ -30,3 +32,56 @@ template](../anki-card-template) by default.
|`./bulk-audio.py -C`|Clear all Audio fields|
|`./bulk-audio.py -q flag:1 -O -s lp101_alt`|Override audio of all notes with red flag with audio from JapanesePod101 (Alternate)|
+## `./bulk-audio.py -h`
+
+```
+usage: ./bulk-audio.py [options] [anki options]
+
+Bulk Japanese audio downloader (refold-tools)
+
+options:
+ -h, --help show this help message and exit
+ -t NOTE_TYPE, --note-type NOTE_TYPE
+ note type to add audio to (default: Sentence mining)
+ -a AUDIO_FIELD, --audio-field AUDIO_FIELD
+ field name to modify with audio (default: Audio)
+ -f FILENAME_PREFIX, --filename-prefix FILENAME_PREFIX
+ download filename prefix (default: refold-tools-)
+ -s SOURCE_LIST, --source-list SOURCE_LIST
+ set source list (see `./get -h`) (default: None)
+ -O, --force-override force override audio field, even if it is not empty
+ (default: False)
+ -C, --clear-audio CLEARS ALL AUDIO FIELDS REGARDLESS OF VALUE (default:
+ False)
+ -n, --noaudio only modify notes that have "noaudio" as AUDIO_FIELD
+ value (default: False)
+ -i NOTE_ID, --note-id NOTE_ID
+ select specific note (specify multiple times to select
+ multiple notes) (default: [])
+ -d, --dry-run print only, do not edit anything (default: False)
+ -q QUERY, --query QUERY
+ filter notes by search query (default: None)
+
+This program calls Anki internally, so any CLI options supported by Anki are
+forwarded. Run `anki -h` to see available options
+```
+
+## `./get -h`
+
+```
+usage: ./get [OPTIONS] <KANJI> <KANA> > <OUTPUT>
+
+attempt to download a native Japanese recording of word written as KANJI and
+read as KANA. outputs mp3 to stdout. return value is 0 if OUTPUT was written
+(clip was found), and 1 if no clip could be found.
+
+options:
+ -s <source1[,source2,...]> set source order (default: lp101,lp101_alt,jisho)
+ -h show help
+
+sources:
+ lp101 JapanesePod101
+ lp101_alt JapanesePod101 (Alternate)
+ jisho Jisho.org
+
+```