rgamici / anki_plugin_jaja_definitions Goto Github PK
View Code? Open in Web Editor NEWAnki add-on to obtain Japanese definitions from a Ja-Ja dictionary (weblio)
License: GNU General Public License v3.0
Anki add-on to obtain Japanese definitions from a Ja-Ja dictionary (weblio)
License: GNU General Public License v3.0
Word:: 助かります
The text is not useful at all as it merely points to the less polite word.
Entry: 承知しました
Extra text: 承知しました 読み方:しょうちしましたサ行変格...
It currently matches it until it finds a space char, but some don't have it.
Need to use hiragana unicode range in the regex.
Ex: お見舞い
result:
読み方:おみまい
名詞「見舞い」に、接頭辞「お」がついたもの。
» 「見舞い」の意味を調べる
Probably not set by default.
Not sure which keys to use.
The scraped text has some extra text and links to check other sources.
For example:
[furigana] 【[word]】
» 類語の一覧を見る
>>『三省堂 大辞林 第三版』の表記・記号についての解説を見る
「[word]」に似た言葉
It also messes with the formatting, and a few newlines would make it easier to read.
Word: 貿易会社 総務課
Result:
(貿易会社 から転送)
出典: フリー百科事典『ウィキペディア(Wikipedia)』 (2019/03/24 15:31 UTC 版)
貿易(ぼうえき...
I'm not sure if they can still be used, as it looks like those two point to a different word.
The entries are useless and should be removed.
If the cards are processed in bulk, there is no way to know if all of them succeeded.
It may be possible to do a search including JapaneseDefinition:
, but it requires some effort, and it is also hard to remember to check it.
Possible solutions:
Currently new updates require you to re-set custom fields.
Some variables are strings and might be misconfigured by the user and this can cause unexpected errors.
Check variables about force_update and see if they match the expected values.
Check field names???
Add warning if max_threads is higher than 30.
Hello.
I can't seem to get the addon working. When I click regenerate definitions, it shows the anki loading bar for a bit and then disappears. When I check the field I specified it's empty
Browser's selection.zip
Even when I make a note type with the base 'Japanese' and 'JapaneseDefinition' fields, it does not work for me.
Processing several words takes too long because they are searched sequentially.
Most of the time is spent waiting for the weblio response, and searching several of them in parallel might increase the performance without clogging the PC.
Hi,
We had a short discussion on the ankiweb page for your add-on, and I've finally uploaded my own add-on for scraping from weblio, which can be found at https://ankiweb.net/shared/info/1591861881, so I'm just writing here to let you know about it (not sure this is the ideal place for this, but I figure it's more visible than changing the review on ankiweb).
My add-on lacks some of your features (since I don't do bulk stuff), but it does quite a bit more in terms of formatting the output, so perhaps you will find my code useful.
https://www.weblio.jp/content/%E9%9D%B4
The page doesn't follow the standard template.
The card receives what starts with 【か】[漢字]
Sorry, don't know where I can ask questions
Error
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-ons section of our support site.
Debug info:
Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3
Platform: Windows 7
Flags: frz=True ao=True sv=1Traceback (most recent call last):
File "C:\Users\Zenobian\AppData\Roaming\Anki2\addons21\2055037404_init_.py", line 82, in regenGlosses
glossNote(f)
File "C:\Users\Zenobian\AppData\Roaming\Anki2\addons21\2055037404_init_.py", line 61, in glossNote
f[jap_defField] = fetchDef(f[expressionField])
File "C:\Users\Zenobian\AppData\Roaming\Anki2\addons21\2055037404_init_.py", line 36, in fetchDef
response = urllib.request.urlopen(pageUrl)
File "urllib\request.py", line 223, in urlopen
File "urllib\request.py", line 532, in open
File "urllib\request.py", line 642, in http_response
File "urllib\request.py", line 570, in error
File "urllib\request.py", line 504, in _call_chain
File "urllib\request.py", line 650, in http_error_default
urllib.error.HTTPError: HTTP Error 404: 404
Add button to add card window.
So, I'm not really sure if I'm bringing this up in the right space, so forgive the ignorance.
Basically, this addon was working quite fine for my when I went to add, say, 3 to 45 cards at a time.
Then I tried to bulk add about 1500 cards in one go and I was shown a very long error message saying something went wrong. When I checked on the deck that I tried obtaining definitions for, there were only about 16 definitions in total gathered while the rest of the deck's definition fields were left blank. I tried uninstalling the addon, reinstalling it, waiting for 15 minutes between attempts of using it, but I'm still getting inconsistent results.
Some of the above methods worked a few times; for instance, after waiting 15 minutes, I was able to bulk add 20 definitions, then I tried to add 35, then 50, then, all the way up to 100 and that is when it failed. So, I'm really confused about the consistency here and was hoping there was an easy fix for me. If not, maybe its another problem.
Below, I will attach a copy of the exact error message I'm receiving.
ErrorMessageGitHub.txt
Currently, if a note has anything written on JapaneseDefinition field, it is skipped when scraping words.
Word: 会議中
Result:
会議中
作者江坂遊
収載図書仕掛け花火
出版社講談社
刊行年月1992.12
シリーズ名講談社ノベルス
収載図書仕掛け花火―綾辻・有栖川復刊セレクション
出版社講談社
刊行年月2007.11
シリーズ名講談社ノベルス
There is no definition of the word.
https://www.weblio.jp/content/%E3%81%8A%E7%9A%BF
An "error" page is shown, but it suggest some possible entries for the word.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.