Japanese Definition Scraper from weblio Dictionary
As add-ons are programs downloaded from the internet, they are potentially malicious. You should only download add-ons you trust.
- 2.1.0 (Updated 2019-12-17)
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
update (answering author): I definitely did a little more than just change the way definitions are displayed. As I mentioned, my initial plan was to write the add-on from scratch, so I had some different features in mind, meant to help the way I make cards. For example, I set up my add-on to use the onFocusLost hook to read the content of a "Words" field, fetch the definitions, and post them in the "Meaning" field, similar to how the Japanese add-on adds furigana readings.
Another notable change I did was concerning subdefinitions (well, I say "change", but I think my current version only borrows ideas from yours, not actual code). For example, for a definition like 撮る, I believe your add-on treats "❶手に持つ。 《取・執》" and its subdefinition "①離れているものを手でつかんで持つ。手で握る。 「茶碗を手に－・って見る」 「書棚の本を－・る」 「ペンを－・る」" as if they were two separate definitions. My current version identifies one as a subdefinition of the other, and displays them with indentation to reflect this.
Anyway, my version is still work in progress (since the html on weblio is inconsistent, some definitions still don't display as I want them), but if you have interest I'm ok with sharing my version.
If you will only modify the way the definitions are shown, please submit a pull request with them.
My idea was to just get the definition in bulk after adding them while reading with a browser add-on, and I didn't care too much about formatting the results, because I usually check them to see if they are useful or not.
I just uploaded this add-on, because the original one doesn't work for Anki 2.1, and since I already had the trouble of coding a bit, why not share it and see if it is useful for someone else.
When you think your code is good, please upload it to ankiweb.
Just one small suggestion.
For some Japanese vocabularies, the Kanjis are the same but the readings and usages are different.
Like 避ける has 2 reading, さける and よける.
And your add-on put explanation together so users cannot know which example sentence is read as さける or よける.
I will take a look on it and it seems simple to fix it.
Can you provide more details by opening an issue on github?