aboutsummaryrefslogtreecommitdiff
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
parent1cf671c61981442b76c575e944bc132f514cf7a5 (diff)
update readme's
-rw-r--r--anki-card-template/readme.md14
-rw-r--r--bulk-audio/readme.md57
-rw-r--r--readme.md17
3 files changed, 71 insertions, 17 deletions
diff --git a/anki-card-template/readme.md b/anki-card-template/readme.md
index 50bf78c..e680623 100644
--- a/anki-card-template/readme.md
+++ b/anki-card-template/readme.md
@@ -1,13 +1,12 @@
# anki sentence mining template
-work in progress
-
this is an anki card template for sentence mining. it has fields for a foreign
-sentence, foreign word reading, translated word and an optional translated
-sentence. it has built-in parsers for adding markdown-like styling, furigana
-that is visible on either both sides or only on the back side, spoilers,
-definition context hints, and word type indicators. it supports a vertical and
-horizontal layout, desktop and mobile, as well as light and dark themes.
+sentence, foreign word reading, translated word, translated sentence and audio.
+
+it has built-in parsers for adding markdown-like styling, furigana that is
+visible on either both sides or only on the back side, spoilers, definition
+context hints, and word type indicators. it supports a vertical and horizontal
+layout, desktop and mobile, as well as light and dark themes.
> animations are now working in desktop Anki >=2.1.62
@@ -48,6 +47,7 @@ are instructions to apply to an empty deck.
|2|Target word reading|Dictionary reading of word (with word type)|
|3|Target word translation|(In context) translation of target word|
|4|Complete sentence translation|Complete sentence translation|
+ |5|Audio|Audio field (regular `[sound:file.mp3]` or `noaudio`/empty for no audio)|
3. In the 'Browse' view, click on Cards... (you might need to create a
temporary card in a deck) and paste the contents of front-template.html and
back-template.html in the front template and back template of the card type.
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
+
+```
diff --git a/readme.md b/readme.md
index 8177597..3cbcc00 100644
--- a/readme.md
+++ b/readme.md
@@ -1,18 +1,17 @@
# refold tools
-this is a repo with language learning stuff:
+this is a repo with refold language learning stuff (primarily japanese):
-- [anki sentence mining card template](anki-card-template/readme.md)
-- [yomichan user.js patch](yomichan/readme.md)
-- [yomichan stuff](yomichan-user/readme.md)
+- [anki sentence mining card template](anki-card-template/)
+- [bulk audio adder](bulk-audio/)
+- [yomichan user.js patch](yomichan/)
+- [yomichan stuff](yomichan-user/)
(custom theme, sentence export/copy button plugin)
## todo
- yomichan handwriting popup/input like in google translate using
[handwriting.js](https://github.com/ChenYuHo/handwriting.js)
-- play audio for word in anki card template (download/stream/localStorage
- cache?)
- edit(/add?) generated readings in yomichan
- add dictionary items to yomichan
- blacklist dictionary items from affecting generated readings
@@ -20,9 +19,9 @@ this is a repo with language learning stuff:
once manifest v2 support is removed from chromium)
i'm not sure if i'll find the motivation or time to work on a standalone
-yomichan server, but if i do, it's the first thing on this list i'll likely
-attempt to implement as yomichan is being deprecated. existing hacks in this
-repo are focused primarily on improving my sentence mining workflow, but
+yomichan-type server, but if i do, it's the first thing on this list i'll
+likely attempt to implement as yomichan is being deprecated. existing hacks in
+this repo are focused primarily on improving my sentence mining workflow, but
yomichan is primarily a lookup dictionary, with automatic anki card generation
kind of shoehorned in. a rewritten frontend with separate modes for popup
dictionary lookups, full dictionary lookups and sentence mining would be