17 2
Contact Author Sign in to rate

πŸ˜„ KanjiEater's Smart Japanese Kindle Highlights

4.71MB. Updated 2021-11-28.
The author has shared 8 other item(s).


This add-on makes Anki cards from words you've highlighted. By highlighting only the word you read on your kindle, this add-on can generate a card containing: 1. The deconjugated word you read 2. The sentence the highlighted word was used in 3. The meta data of when and where this word was read Here's a video covering the features & setup: How does it work? It works by looking up the highlighted text in the Kindle's built in Vocab Builder feature which automatically records sentences of words you looked up. It then matches the words to sentence usages, and pulls the deconjugated word, sentence, and meta data, and creates a card in a deck named after the book. Every time you run it, it records when you last generated cards, and continues from where it left off - making adding new cards from you Kindle practically effortless. Current Limitations - This only supports kindles in the Japanese language and Japanese books; Each kindle's highlight format is different depending on the language - Windows is the only officially supported platform, though Mac & Linux should work; PR's welcome - Only supports Kindle's with My Clippings.txt (no html/Android based clippings) Kindle Limitations - Books must use a Kindle vocab compatible format: .azw3 is compatible; .mobi should be too; I used Calibre to easily convert my books that were mobi to azw3 without any issues (covers still work if you delete any Amazon ids) - Only matches what your Kindle dictionary finds. The Kindle automatically makes `/system/vocabulary/vocab.db` and updates it with words that were found in the dictionary. The entries in this are automatically created by the Kindle itself. If your dictionary couldn't find it, you'll have to make a card manually for the word (the add-on will prompt you in this case). Instructions 0. Install the official Anki Japanese Support add-on: https://ankiweb.net/shared/info/3918629684 1. Make sure Vocab Builder is on, on your Kindle device (inside Settings -> Reading Options) 2. Make sure you Kindle is in Japanese 3. Make sure your Kindle highlights are in `KindlePath/documents/My Clippings.txt`, where KindlePath is something like `F:` or whatever your Kindle's drive is: `F:/documents/My Clippings.txt` 4. I recommend erasing the contents of `My Clippings.txt` for the first time you use this, just to make sure you don't have any words or sentences that could mess up the matching. 5. Set up the add-on config variables: ``` { "model_name": "Japanese", "word_field": "Vocab", "sentence_field": "Expression", "source_field": "Meta", "deck_name": "!ε„ͺε…ˆ::1 θ‡ͺεˆ†::kindle", "last_added": null, "path": "F:/" } ``` 6. `model_name` is the model to use for the cards. This model must have fields in it named whatever the word_field, sentence_field, and source_field are. 7. `word_field` is where the deconjugated word will be put in the card 8. `sentence_field` is where the sentence where the word was used will be put in the card 9. `source_field` is where the meta data of what page and what time you highlighted the word. It looks something like this: `γƒšγƒΌγ‚Έ78 2021εΉ΄2月3ζ—₯ζ°΄ζ›œζ—₯ 8:50:57 食べて` 10. `deck_name` is the "root" deck where sub decks will be created. Every highlight imported will be placed in a subdeck named after the book it was read from. So in my case, I have a deck named `!ε„ͺε…ˆ`, which is where my Japanese cards are, with a subdeck of `1 θ‡ͺεˆ†` where I put cards I make myself, with a sub-deck of `kindle` where are the kindle cards are generated to. Inside `kindle` I have decks like `η‹Όγ―ηœ γ‚‰γͺい`, which is the name of a book I read, and generated cards to automatically. 11. `last_added` is when the last Kindle Highlight was added. Don't change this unless you want it to rescan & readd cards from that time. If you set it to `null` it will start at the beginning of all of your highlights. 12. `path` the root path of your Kindle device. It expects `F:/documents/clippings` and a hidden folder & file `F:/system/vocabulary/vocab.db` to exist. Tips on Usage - After hitting 10k sentence cards, I switched all of my cards to Vocab cards. As generated vocab cards, these autogenerated cards work great. As sentence cards, you would want to manually make the sentences as short as possible to provide context. **Shorter sentence cards are better.** Hot Take: Vocab cards are even better if you're actually spending time reading daily. Use Anki for vocab entries, use immersion to get things to actually sink in. Sentence cards take 30% longer to review I've found. Thank You - HelenFoster: Your add-ons are some of the best written code, and I frequently use snippets in my own code - gmcmanus: Your English kindle highlighting add-on helped inspire this add-on & I was able to re-use a portion of that code - stegatxins0#7346: https://rentry.co/mining Dope mining guide that contains an alternative set of instructions (that are probably better than my own) Update History 2/13/2021 - Initial Release! 2/14/2021 - Bug fix on importing the add-on. Added a dialog so feedback of the highlight scanning starting is immediate (otherwise if you have hundreds of highlights it might look like it's not working). 2/20/2021 - Better error handling for bad configuration. The add-on will now tell you (instead of throwing an error) when something goes wrong with file paths, Note Types, and missing fields 2/20/2021 - Updated again to fix issues with parsing for some users 3/11/2021 - Add-on now ignores buggy highlights that are duplicates (same source and vocab) or if the highlight is blank. The add-on now creates cards in chronological order. 4/15/2021 - Older versions add cards as duplicates. Update to 2.1.35 to avoid chaos 4/18/2021 - Bookmarks no longer show in bad highlight clippings popup. Also fixed an issue where the matching between kindle's built in vocab.db and highlights could get off & skip highlights in between. More highlights should add automatically now. 6/5/2021 - Massive Update! More highlights should add automatically. The accuracy relies on the highlight and the dictionary lookup happening within two minutes of each other. The deinflection logic has been improved to now include words from ε€§θΎžζ³‰ & ε€§θΎžζž—. Mecab fallback parsing has also been improved. Other minor bug fixes has been included as well. 8/1/2021 - Another large update. The code that matches the vocab lookup to the clipping has been completely rewritten, and is now 99.9% less dumb. A match should always happen now if the Kindle Vocab Builder picked it up (which doesn't always happen as the Kindle is buggy). There was also a bug fix for a breaking error if you managed to get an image highlighted in a clipping (a very odd thing one user reported on Discord). 11/27/2021 - Explicit error if your kindle isn't in Japanese (add-on requires your Kindle language to be in Japanese). Also fixed the locale error others were seeing (hopefully). Please make any additional reports on the discord server. Support If you have an issue, join the discord & post in #tech-support: https://discord.com/invite/agbwB4p If you find my tools useful please consider supporting via Patreon. I have spent countless hours to make these useful for not only myself but other's as well and am now offering them completely 100% free. Motivate me through PayPal: Please follow the a link below to buy me a coffee, sandwich, meal, or anything else you'd like if you find my work interesting. If you can't contribute monetarily please consider following on:


As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.

Supported Anki versions:

To download this add-on, please copy and paste the following code into Anki 2.1:


If you were linked to this page from the internet, please open Anki on your computer, go to the Tools menu and then Add-ons>Browse & Install to paste in the code.

All Anki 2.1.x Add-Ons Contact Author


on 1662477818
Everything have to be in japonese
on 1660288834
Works as intended, would be nice to fix or make it an option, multiple target words sentence, so no duplicates anymore if the highlighted words are from the same sentence.
You might think that it's better to force i+1 sentence cards but hey I have no issue with i+2 sentences, it's not that much more difficult and I get to review my words in the context I wanted :D

Also F* Amazon for making me need to use internet and register my kindle to use the vocabulary builder, now it's bloated with useless things, like really thank you Amazon, good job!

Switched to Manjaro linux, I barely know a thing about coding but apparently line 17 in "importer.py" it needs to be "ja_JP.UTF-8" instead of "ja_JP".

EDIT2( 8/12/2022):
You can register your device without problems actually, I used my mobile internet(shared) to register the kindle and as soon as it was registered I cut off the internet from my mobile, the kindle didn't have the time download dictionaries or whatever files, got no ads, no stupid screensaver and yes I have the vocabulary builder and the features unlocked with registering

so now I have my custom screensaver because my device is jailbroken
Comment from author
Thanks for sharing how to get around the registration - I'm tempted to reset my kindle and try this.
on 1652652622
For mac, change the Path to "path": "/Volumes/Kindle/"
Comment from author
Thanks for sharing your solution!
on 1648714784
Amazing add-on, thanks so much!
You do need a bit of anki knowledge to set it up, but just watch the video and/or reach out in the discord if you run into trouble ;)
Comment from author
Thanks for the thumbs up! Feel free to dm or post on the discord what was confusing. It can be difficult to know what's difficult once you've smoked as much Anki as I have. πŸ™‡
on 1648445981
Your Kindle must be in Japanese to use this add-on currently.
No Japanese was detected.
Before trying again, try changing your Kindle to Japanese and deleting your My Clippings.txt from your Kindle.

My kindle is in Japanese, also try deleting My Clippings.txt and doesent work
Comment from author
If you're having trouble, please make a quick post in the discord. If you post your clippings file there I can probably help.


Also, if you downvote it makes it harder for others to find the addon on Anki's site, which makes it less likely that someone else will post something useful that could help in your error.

EDIT 8/22: Never got an update or found out what this lad's issue was :(
on 1644257122
It's great.
on 1641140498
simple and efficient
on 1635722978
An error occurred. Please start Anki while holding down the shift key, which will temporarily disable the add-ons you have installed.
If the issue only occurs when add-ons are enabled, please use the Tools > Add-ons menu item to disable some add-ons and restart Anki, repeating until you discover the add-on that is causing the problem.
When you've discovered the add-on that is causing the problem, please report the issue on the add-on support site.
Debug info:
Anki 2.1.48 (fb07bad3) Python 3.8.6 Qt 5.14.2 PyQt 5.14.2
Platform: Windows 8.1
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2021-10-31 13:25:31

Caught exception:
Traceback (most recent call last):
File "C:\Users\Shigen\AppData\Roaming\Anki2\addons21\1353504091\__init__.py", line 8, in main
from . import importer
File "C:\Users\Shigen\AppData\Roaming\Anki2\addons21\1353504091\importer.py", line 19, in <module>
locale.setlocale(locale.LC_ALL, 'ja_JP')
File "C:\python\lib\locale.py", line 608, in setlocale
locale.Error: unsupported locale setting
Comment from author
Yay! This has been fixed.

If you have an issue, please join the discord & post in #tech-support:
on 1634193828
It helps my day!!

The only thing I find it inconvenient is that it lacks dictionary definition from Kindle. Is there any way I can add definition of words automatically?
Comment from author
Thank you! Unfortunately that's outside the scope of this add-on.
My personal solution is to just use Migaku to add definitions and Forvo audio to all of my cards in bulk. It's not too bad to set up once, then set & forget. I don't use it for anything else.
on 1629225238
Very useful, quick and easy to set up. Mining is a piece of cake with this.
on 1623200138
Sweet app that has, dare I say, bigly improved my workflow and productivity.

Do your AJATTing self a favor and download this.
on 1618539768
bad ass
on 1618538915
Great addon, makes adding cards from my kindle super efficient and the guy behind it was super helpful in getting up and running properly. :)
on 1617496345
Excellent addon, thanks so much!

This saves me loads of time importing sentences from my kindle. The only thing that would make it better is if the definitions could be loaded from a dictionary on import, but a couple of keyboard shortcuts and sdcv can be used to get this done pretty quickly.
on 1614903651
Very handy, thanks!
on 1613877701
Works great on my Kindle Paperwhite 7th gen!
Make sure your Note Types are correct when using.
on 1613773930
Awesome add-on, makes it super easy to make cards from my kindle. Thanks so much!
on 1613323104
Great concept but I'm getting the following error:
Caught exception:
Traceback (most recent call last):
File "C:\Users\Erik\AppData\Roaming\Anki2\addons21\1353504091\__init__.py", line 7, in main
File "importlib\__init__.py", line 169, in reload
File "<frozen importlib._bootstrap>", line 604, in _exec
File "<frozen importlib._bootstrap_external>", line 783, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Erik\AppData\Roaming\Anki2\addons21\1353504091\importer.py", line 14, in <module>
from kindleImporter.splitter import deconjugate, Splitter, Words
ModuleNotFoundError: No module named 'kindleImporter'

It seems to originate from, as the error indicates, the kindleImporter in importer.py. Commenting out the line no longer gives the same error, but it can't parse the clippings, as expected. Hopefully, there's a fix because this addon seems amazing!
Comment from author
UPDATE: The user confirmed the add-on is now working on reddit. The issue was that their kindle language was not set to Japanese. The kindle language must be set to Japanese for the add-on to work.
I've fixed your original issue. Thank you for the prompt & detailed bug report.

As for your issue of "The following 68 clippings could not be parsed",

let's run through a quick checklist:

1. Is your kindle in Japanese? (The kindle & clippings must be in Japanese) If so, can you DM your MyClippings.txt?

2. Is Vocab Builder enabled on your Kindle? ( inside Settings -> Reading Options ). This must be enabled BEFORE you highlight words. Old highlights done before Vocab Builder was enabled won't work. I recommend deleting all your old MyClippings.txt before starting with this.

3. Vocab Builder didn't work on my sideloaded .mobi files. If your books are mobi, try converting them to azw3 with Calibre.
on 1613309640