Coder Social home page Coder Social logo

migaku-official / migaku-dictionary-addon Goto Github PK

View Code? Open in Web Editor NEW
64.0 8.0 23.0 23.73 MB

Migaku Dictionary allows users to lookup word definitions, export definitions to their cards in real-time, hear word audio and see word frequency, etc. If you have an issue please report it in the "Issues" tab. Reponses to issues can be slow on GitHub, for faster support consider joining our Discord server through our Patreon page.

License: GNU General Public License v3.0

Python 98.91% HTML 0.89% CSS 0.16% JavaScript 0.01% C 0.03%

migaku-dictionary-addon's Introduction

Migaku Dictionary Addon




Lookup word definitions, frequency, audio, and export that information to Anki cards in real-time

Table of Contents

Installation

  1. Install the version of Anki that is listed under the "Migaku Development Cycles" section of the AnkiWeb add-on page
  2. Download the latest version of the addon from AnkiWeb

Contributing

Contributions are welcome! Please review the contribution guidelines on how to:

  • Report issues
  • File pull requests
  • Support the project as a non-developer

License and Credits

Migaku Dictionary Addon is

*Copyright © 2020 Migaku ltd.

Migaku Dictionary Addon is free and open-source software. The add-on code that runs within Anki is released under the GNU AGPLv3 license, extended by a number of additional terms. For more information please see the LICENSE file that accompanied this program.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY.


migaku-dictionary-addon's People

Contributors

fsmiamoto avatar glutanimate avatar lucasmia avatar ricbent avatar shanrauf avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

migaku-dictionary-addon's Issues

Add button to purge database file

Type:

  • bug
  • feature
  • enhancement
  • question

I'm going to open a PR to resolve the issue:

  • yes (if you help me out on it, first Anki addon I'd contribute to :) )
  • no

Description:
I had some trouble installing the dictionaries. Not sure what went wrong, but Anki kept removing one of them constantly. I've deleted the database file with the hope that that would force the addon to re-import everything. But that wasn't actually the case. I got an error as it couldn't find the database file.

Would it be possible to somehow add a simple button that just drops all tables and creates them again? Basically deleting all data inside of them?

Monolingual japanese dictionary?

Type:

  • question

Environment:

  • OS: Arch linux

I'm going to open a PR to resolve the issue:

  • no

Description:
Does a monolingual dictionary for japanese exist? Can it be manually added like the other ones?

Pressing ctrl+c+space doesnt work in Linux

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Manjaro Linux x86_64
  • Kernel: 5.3.15-1-MANJARO
  • WM: awesome

Description:

I installed the addon and dictionaries exactly as the tutorial video said how to do it, and when I select a word in an external program, and press CTRL+C+SPACE, Anki opens up a popup with ↓ instead of the dictionary with the selected word.

Anki 2.1.15 (442df9d6) Python 3.8.0 Qt 5.13.2 PyQt 5.13.2
Platform: Linux
Flags: frz=False ao=True sv=1
Add-ons possibly involved: MIA Dictionary

Caught exception:
  File "/home/nitsi/.local/share/Anki2/addons21/1655992655/main.py", line 442, in captureKey
    mw.hkThread.handleSystemSearch()
  File "/home/nitsi/.local/share/Anki2/addons21/1655992655/midict.py", line 727, in handleSystemSearch
    self.search.emit(Pyperclip.paste())
  File "/home/nitsi/.local/share/Anki2/addons21/1655992655/Pyperclip.py", line 638, in lazy_load_stub_paste
    return paste()
  File "/home/nitsi/.local/share/Anki2/addons21/1655992655/Pyperclip.py", line 155, in paste_gtk
    clipboardContents = gtk.Clipboard().wait_for_text()
  File "/usr/lib/python3.8/site-packages/gi/__init__.py", line 72, in __getattr__
    raise AttributeError(_static_binding_error)
<class 'AttributeError'>: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183

search both kanas simultaneously

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: any (Linux/AwesomeWM)

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
I have the MIA Japanese addon set to convert all kana to katakana, but now when i select a word (lets say 来ル) and press ctrl+s, it never finds the words cuz the dictionary is expecting hiragana (来る), so can you make a system where if it doesn't find results from the kana that got searched, it should automatically convert it to the other kana so that it will find the words, cuz as of now, with convert-to-katakana on, the dictionary addon is unusable in Japanese

Card Exporter: (Ctrl + Shift + v) shortcut not being recognized by [email protected]

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Arch Linux
  • DE: KDE Plasma 5.19.4
  • Clibboard tool: xsel (xclip not installed)

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Symptom: unable to paste image and/or audio to CardExporter
Problem: in my environment, pressing Ctrl + Shift + v doesn't trigger captureKey's elif @main.py
Solution: change shotcut to Ctrl + Shift + V (caps V)

It' a really trivial bug, literally one line to fix it.

https://github.com/mass-immersion-approach/MIA-Dictionary-Addon/blob/48c2aebeb0e42dd36414ebb911c3c0cf83916f5a/src/main.py#L470

My particular solution:

elif 'Key.ctrl' in mw.currentlyPressed and 'Key.shift' in mw.currentlyPressed and ("'V'" in mw.currentlyPressed or "'v'" in mw.currentlyPressed):

I've left both 'V' and 'v' in my setup since I thought it was capitalized because of shift modifier, but testing with caps on doesn't seem to change anything, it stays 'V'. But i left it anyway since other systems may have the lowercase 'v'.
Uppercase and lowercase behavior

More flexible "send to field" options

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Win 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
I'd love to see more control over what part/s and where to, the header of a definition gets sent to. Currently the whole header gets sent to a single field. There is no option to change formatting, choose which parts get sent, or choose where they are being sent to.

I think more control over this would be beneficial, because it could help to improve the efficiency of doing reviews. With the current implementation, information that I don't need during reviews is displayed on the card, and is distracting. I don't need to see the altterm or the card's frequency. This information though, is useful whilst adding the definitions in the first place, and later, the frequency especially is useful when deciding what to do with a leech card.

The other reason is so that I can match the cards to have the same format as the rest of my (6000+) non-MIA-dictionary made cards. If the information on the cards is in the same place each time, I don't have to waste any time searching.

Obviously it's not much time, but I think these little inefficiencies can add up over tens of thousands of reviews. The way I'm imagining that it could be implemented, is a "custom..." option under the part where you select a field to send the information to.

image

Error on launch

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Mac OSX Mojave 10.14.6
  • Anki: Version 2.1.15 (442df9d6) Qt 5.9.7 PyQt 5.9

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Thanks for your hard work on this addon. It looks awesome and I can't wait to try it out. I can't get it to work though. After installing it according to the instructions, I get this error on launch. Boot camped into Windows 10 and had the same problem. Your help with resolving the issue would be really appreciated. Thanks again!

Screen Shot 2019-12-28 at 10 35 18 AM

Splitting up Term and glossary into separate fields

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Win 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
When importing dictionary definitions into cards, the addon will put everything into the Glossary field.
That includes the definition header and the description into the same field.
Is it possible to split up the header and the description?
According to the JSON files, there is Kanji-Kana header for every description so it should be possible. For terms with the same Kanji but different kana readings and descriptions, they are different entries, so this also should not be a problem.

The question is, should it be 2 fields, one for both Kanji/Kana and one for description, or should there be 3 fields Kanji/kana/description respectively.

Disable Image Upscaling

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
When pasting an image into the exporter, or picking out an image from google images, if the image being pasted is smaller than the maximum width or height, the image gets upscaled. This adds extra size to cards and adds blur to small images.

Example, a small image being upscaled to fit the minimum/maximum of 300x300:
無題2
無題3

Error MIA Dictionary

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • [] no

Description:
MIA Dictionary add-on worked fine for me, until a couple of days ago. I now get the following error when I want to open the add-on. Any thoughts?

errors-mia-dictionary.txt

Daijirin dictionary is not working.

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10 64Bit Anki 2.1.20

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Daijirin (Sanseido) dictionary does not work. Others, like Daijisen, work without issues. I can import Daijirin, but when I search for words, no entries are displayed. This is what my index.json looks like:

{"title":"三省堂 スーパー大辞林","format":3,"revision":"daijirin1","sequenced":true}

And this is what the first few entries of term_bank_1.json look like:

[["あ","","","",0,["あ\n(1)五十音図ア行第一段の仮名。後舌の広母音。\n(2)平仮名「あ」は「安」の草体。片仮名「ア」は「阿」の行書体の偏。\n"],0,""],["足","あ","","",0,["あ 【足】\nあし。「―の音せず行かむ駒もが/万葉 3387」\n〔多く「足掻(アガ)き」「足結(アユイ)」など,複合した形で見られる〕\n"],1,""],["畔","あ","","",0,["あ 【畔・畦】\n田のあぜ。「営田(ツクダ)の―を離ち/古事記(上)」\n"],2,""],["畦","あ","","",0,["あ 【畔・畦】\n田のあぜ。「営田(ツクダ)の―を離ち/古事記(上)」\n"],2,""],["阿","あ","","",0,["あ 【阿】\n〔梵 a〕\n梵語の第一字母の音訳。\n⇔吽(ウン)\n→阿字\n→梵字\n"],3,""],["唖","あ","","",0,["あ [1] 【唖】\n話しことばが重度に障害された状態。話しことばをまったく,あるいは,ほとんど発することができない状態をいう。\n"],4,""],["吾","あ","","",0,["あ 【吾・我】 (代)\n〔上代語。中古以降は「わ」が用いられた〕\n一人称。わたし。あれ。「吾妹子に―が恋ひ死なば/万葉 3566」\n"],5,""],["我","あ","","",0,["あ 【吾・我】 (代)\n〔上代語。中古以降は「わ」が用いられた〕\n一人称。わたし。あれ。「吾妹子に―が恋ひ死なば/万葉 3566」\n"],5,""],["彼","あ","","",0,["あ 【彼】 (代)\n遠称の指示代名詞。あれ。「―はと見る淡路の島のあはれさへ/源氏(明石)」\n"],6,""],  ...

Info from Card fields randomly getting mixed with others

Type:

  • [o] bug

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • [o] no

Description:
Info from one card fields getting mixed with other cards is occuring uncommonly (only noticing when it comes for review that something foreign is on my card). Usually occuring when doing reviews + creating new cards with dictionary and (the MIA Editor still open?).

I think it might be a conflicting issue with MIA Editor addon (it acts weird when I push a definiton into one of my cards while I'm reviewing). Happened a few times over the past few days as I migrated to using the dictionarys card exporter, and inserting definitons straight into cards while reviewing. Usually when I am sentence mining and creating cards, as info I am working with will get mixed into cards I've already made/cards awaiting for review (very uncommon 1-2 a day, but evidently reoccuring daily), from various fields such as images, and dictionary fields. Unable to reproduce on demand yet, will update if I manage to realize what is happening.

Using forvo search causes Anki to freeze

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: OSX 10.14.6

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Using forvo search causes Anki to freeze. Tested with Anki 2.1.14 and 2.1.16. Forvo appears to return results from Chrome. Tested using ”資産” https://forvo.com/word/%E8%B3%87%E7%94%A3/#ja as the search term. Disabling Wi-Fi while Anki is frozen doesn't cause MIA Dictionary to time out. This is the first time I've seen this error (2020-02-16).

Bug in MIA Dictionary

Type:

  • [ *] bug

Environment:

  • OS: Windows 10 pro

I'm going to open a PR to resolve the issue:

  • [ *] No

Description:
[Hello, Matt and Yoga, thank you for the new addon. When I tried to search or use the MIA Dictionary, it's showing the following error: Whenever I search or use the MIA dictionary, it is showing the following error. If you could, please resolve it for me. Thank you again for everything

Debug info: Anki 2.1.15 (442df9d6) Python 3.6.7 Qt 5.12.1 PyQt 5.11.3 Platform: Windows 10 Flags: frz=True ao=True sv=1 Caught exception: File "C:\Users\Raj\AppData\Roaming\Anki2\addons21\1655992655\main.py", line 535, in dictionaryInit mw.miaDictionary = DictInterface(mw, addon_path, welcomeScreen, term = term) File "C:\Users\Raj\AppData\Roaming\Anki2\addons21\1655992655\midict.py", line 797, in init self.startUp(term) File "C:\Users\Raj\AppData\Roaming\Anki2\addons21\1655992655\midict.py", line 871, in startUp self.dict.loadHTMLURL(html, url) File "C:\Users\Raj\AppData\Roaming\Anki2\addons21\1655992655\midict.py", line 65, in loadHTMLURL self._page.setHtml(html, url) <class 'TypeError'>: setHtmlWithBaseurl() takes 2 positional arguments but 3 were given ]

Copying directly from the entry will preserve HTML formating

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: win 10
  • Anki: 2.1.20 (47a1bf8b)

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
After I update to Anki 2.1.20, it seems to have a new feature of preserving formating. But the kanji's light color is hard to see. I hope it can be pasted as raw text.
image

Use urllib.request.urlretrieve to download dictionaries

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS:

I'm going to open a PR to resolve the issue:

  • yes
  • no
  • maybe

Description:
[ Write the issue description here ]
Instead of downloading dictionaries and putting it manually to specific folder, use
http://docs.python.org/dev/library/urllib.request.html#urllib.request.urlretrieve from standard library to retrieve and save dictionaries or frequency list

Speed up "If Empty

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: all

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

Improve responsiveness of dictionary window

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: all

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

I profiled the dictionary lookup using the hotkey. With the PRAGMA PR that I submitted are still two issues that add to the time it takes to show the result to the user:

  1. The window is created every time the window is show. This window can probably be created at startup, once only for the entire session, instead of each time the window is shown.

  2. looking up words twice. In the tests I ran, the same queries were issued twice. There is probably a way to reduce the number of queries, but this improvement is probably one order the magnitude less than the issue #1 above.

Google Images' HTTP requests aren't using network proxy

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Win 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Google Images always shows "Loading..." and then "No Images Found. This is likely due to a connectivity error." I am in a region where Google's services are blocked, so I am using a system-wide global HTTP proxy. However, it seems that it doesn't send requests via the proxy.

Here are some other Anki add-ons that can make requests via the proxy. Hope it helps.

Custom Shortcuts

Type:

  • bug
  • feature
  • [ X] enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • [ X] no

Description:
Hello guys, is there a way to add custom shortcuts in a new build or to change it in the current one.
Thanks!

Conflict with pigoz anki-canvas

Type:
bug

Environment:
Windows 10

I'm going to open a PR to resolve the issue:
Not sure what this is

Description:

A bit of a weird bug this, but when using pigoz's anki-canvas note type (https://github.com/pigoz/anki-canvas) with this addon, the cards work fine but the moment you open the dictionary either from the main menu of by looking up a word, the cards stop displaying with the error:

Invalid HTML on card: SecurityError: Failed to read the 'localStorage' property from 'Window': Storage is disabled inside 'data:' URLs.

This error persists until you restart Anki.

Speed up "If Empty" definition exports

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: all

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

A common use case is incremental generation (eg: target field updated by Morphman) of definitions, where most definitions are already filled and only a small subset of cards need their definitions generated. Currently, Generating all definitions and only picking a small subset is a bit wasteful and is very slow in a deck with a lot of definitions already present. Can we optimize to skip the slow export lines

https://github.com/migaku-official/Migaku-Dictionary-Addon/blob/master/src/main.py#L964-L973

if note[dest] isn't empty when "If Empty" is selected? I can open a PR to fix this.

Anki crash whenever I try to add a new card using the addon

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • [x ] no

Description:
[ This is my first time attempting to create cards using Migaku dictionary, after preparing everything in the card whenever I click 'add' to add the card to my deck Anki immediately crashes, a (Not responding) sign appears beside the Migaku card exporter and then I have to restart Anki.

I hope this is the right place for posting this issue, I will appreciate your help.]

[idea] online dictionaries

Would it be possible to display in dictionary part online dictionaries, the same way a web browser does it or similarly to Web Query add-on does it?
https://ankiweb.net/shared/info/627484806

I am thinking about dictionaries like:
bilingual:
https://dictionary.cambridge.org/pl/dictionary/english-polish/
https://www.wordreference.com/
or monolingual
https://www.ldoceonline.com/
https://www.oxfordlearnersdictionaries.com/

Perhaps this could be as separate add-on if you don't want to mess with a code of this one

Not finding pronunciations even though Forvo has them

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
If you search for '篦鮒' using this extension you will get no results. '篦鮒' is voiced on Forvo however as '篦鮒 (へらぶな)'. This is picked up the Forvo search but gets listed as "related words and phrases".

Sanseido web dictionary support

Type:

  • bug
  • [ x] feature
  • enhancement
  • question

I'm going to open a PR to resolve the issue:

  • [ x] yes
  • no

Description:
The sanseido web dictionary is a monolingual japanese web dictionary.

It provides concise definitions of words and seems to be useful for the monolingual transition, as can be seen in this video.

After some short testing it's results can be accessed with simple http requests (I tested it with curl).
I think it could be implemented in the MIA-Dictionary-Addon in a similar way to the google photos feature.

Would you accept a pull request if I would implement this?

Forvo/Google Images not showing up/Dictionary order remains unchanged (1.1.05, Anki 2.1.35)

Type:

  • [ *] bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Win 10

I'm going to open a PR to resolve the issue:

  • yes
  • [ *] no

Description:

  1. i've switched the order of the dictionaries around several times in my dictionary group, but despite restarting anki etc, the order of the dicts remain unchanced
    unchanged
  2. i have forvo and google imagse selected, but they are not showing up in the lookup window

japanese/korean and or chinese sentence only dictionary?

Type:

  • bug
  • feature
  • enhancement
  • [ x] question

Environment:

  • OS: Linux (Manjaro x64)

I'm going to open a PR to resolve the issue:

  • yes
  • [x ] no

Description:
[ Is there a japanese/korean and or chinese sentence only dictionary? With or without translations (monolingual) is fine too. ]

Card Exporter: Audio pasting not implemented for linux

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Arch Linux

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Currently there's no implementation for audio pasting on linux, even though everything else is already implemented

https://github.com/mass-immersion-approach/MIA-Dictionary-Addon/blob/48c2aebeb0e42dd36414ebb911c3c0cf83916f5a/src/midict.py#L742-L759

I'm not sure what kind of special treatment mac needs, so I didn't change it's code.
But with few modifications, I could make it work on my environment:

        elif clip.endswith('.mp3') or clip.endswith('.mp3\n'):
                if isLin:
                    path = clip.replace("file://", '', 1)
                    temp, mp3 = self.moveAudioToTempFolder(path)
                    if mp3: 
                        self.image.emit([temp, '[sound:' + mp3 + ']', mp3]) 
                else:
                    if isMac:
                        try:
                            clip = str(self.mw.app.clipboard().mimeData().urls()[0].url())
                        except:
                            return
                    if clip.startswith('file:///') and clip.endswith('.mp3'):
                        try:
                            if isMac:
                                path = clip.replace('file://', '', 1)
                            else:
                                path = clip.replace('file:///', '', 1)
                            temp, mp3 = self.moveAudioToTempFolder(path)
                            if mp3:
                                self.image.emit([temp, '[sound:' + mp3 + ']', mp3]) 
                        except:
                            return

Bug on win 7 64bit

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS:

I'm going to open a PR to resolve the issue:

  • [ v] yes
  • no

Debug info:
Anki 2.1.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 7
Flags: frz=True ao=True sv=1
Add-ons, last update check: 2020-06-07 13:17:34

Caught exception:
Traceback (most recent call last):
File "C:\Users\laptop88\AppData\Roaming\Anki2\addons21\1655992655\main.py", line 523, in openDictionarySettings
mw.dictSettings = SettingsGui(mw, addon_path, openDictionarySettings)
File "C:\Users\laptop88\AppData\Roaming\Anki2\addons21\1655992655\addonSettings.py", line 92, in init
self.userGuideTab = self.getUserGuideTab()
File "C:\Users\laptop88\AppData\Roaming\Anki2\addons21\1655992655\addonSettings.py", line 544, in getUserGuideTab
guide._page.setHtml(html, url)
TypeError: setHtmlWithBaseurl() takes 2 positional arguments but 3 were given

Global hotkeys (problems)

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Manjaro Linux

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Global hotkeys like Ctrl+C+Space are not working, but inside anki hotkeys are ok (Ctrl+S and +W). For example, when I press Ctrl+C+Space to search for currently highlighted text in my browser the following error appears (is there any way to fix it?):

Caught exception:
Traceback (most recent call last):
File "/home/arthurvc/.local/share/Anki2/addons21/1655992655/main.py", line 462, in captureKey
mw.hkThread.handleSystemSearch()
File "/home/arthurvc/.local/share/Anki2/addons21/1655992655/midict.py", line 726, in handleSystemSearch
self.search.emit(Pyperclip.paste())
File "/home/arthurvc/.local/share/Anki2/addons21/1655992655/Pyperclip.py", line 287, in paste_klipper
assert len(clipboardContents) > 0
AssertionError

Epwings dictionaries not working

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Converted 3 epwings dictionaries( daijirin, daijisen and kenkyusha) to json with yomichan, the importation works but there is no entry when you search for a word.
Also tried with with the json from munasawagi's github repository, but the importation didn't even work.
My question would be, is this purposely not working because this is illegal?

All 3 folders have the same structure
1
2
3

Changelog

Type:

  • bug
  • feature
  • [ x] enhancement
  • question

Environment:

  • OS:

I'm going to open a PR to resolve the issue:

  • yes
  • [x ] no

Description:
[ Write the issue description here ]

I noticed you you have added a version number. This is great. It would be beneficial to have a changelog that enumerates the major changes between versions. thank you

font size change missing

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS:

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
[It would be a great option if MIA Dictionary has the possibility to change the font size, specially for those whose have vision dysfunctionality (or otherwise want just a bigger font). It would be great that with control + mouse scroll the words could become bigger to fit user necessities]

Support for more media containers than just png or mp3

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows, MacOS and Linux

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
The addon Card Exporter currently only works with mp3 and png. Also, there are some unused imports in the files that make up the project.

I'm going to open a Pull Request that removes some of the major unused imports and adds support for the following audio containers:
wav, mp3, ogg, flac, mp4, swf, mov, mpeg, mkv, m4a, 3gp, spx, oga, webm, mpg, ogx, avi, flv and ogv.

As well as to the following image formats: jpg, jpeg, png, tif, tiff, gif, svg and webp.

Those formats are supported by anki, according to its source code.

The header of dictionary window takes too much vertical space

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Win 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
In Anki 2.1.20, it seems to have a new feature to set user interface size. I set it to 130%. When I let the window be half size of the screen, the header takes too much space.
image


Until the window is 2/3 of the screen, the buttons don't break into 2 lines.
image

And to be honest, I think even in normal settings, the header is already too big.

Option for not having pronunciations? Japanese/Chinese

Type:

  • bug
  • [ x] feature
  • enhancement
  • question

Environment:

  • OS: Linux x64

I'm going to open a PR to resolve the issue:

  • yes
  • [ x] no

Description:
Does the possibility exist to not have the bracketed/alternative pronunciations before the definitions of a word? I mean these:
【簗】 やな
やな【梁・簗】
--Definition--

I use tts to play the definition and it's pretty cumbersome to hear all the alternative sounds. I can remove everything within brackets with awesometts but there's still the other part.

Card template/CSS not displaying correctly

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10
  • Anki: 2.1.22

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Something is stopping my card template/CSS from displaying correctly. It displays correctly without MIA Dictionary open, but as soon as I have MIA dictionary open, then go to edit a card, it will discard all my styling and won't display it correctly until I reopen anki. The code below is the only note type of mine that I noticed is causing his behaviour. Others seem to work fine.

Code and screenshots:

Front

{{Expression}}

Styling

.win rt {
font-size: 20px; /* ankidroid 17px PC 45px */
line-height:100%;
padding:0px;
margin:3px;
}

.win hr {
padding:0px;
margin:3px;
}

.win .card {
font-family: myfont;
 font-size: 35px; /* ankidroid 25px PC 57px */
 text-align: left;
/* color: black;*/
/* background-color: white; */
 line-height: 95%;

@font-face { font-family: myfont; src: url('_NotoSansJP-Regular.ttf');
}
}

.mobile rt {
font-size: 17px; /* ankidroid 17px PC 55px */
line-height:100%;
padding:0px;
margin:3px;
}

.mobile hr {
padding:0px;
margin:3px;
}

.mobile .card {
font-family: myfont;
 font-size: 25px; /* ankidroid 25px PC 70px */
 text-align: left;
/* color: black;*/
/* background-color: white; */
 line-height: 95%;

@font-face { font-family: myfont; src: url('_NotoSansJP-Regular.ttf');
}
}

Back

{{FrontSide}}

<hr>

{{furigana:Reading}}
<hr style="font-size:1px">
{{origMeaning}}

{{#Word}}
{{Word}}: {{Meaning}}
{{/Word}}

{{#Notes}}<br>
{{Notes}}
{{/Notes}}

{{#Image}}
<br>
{{Image}}
{{/Image}}

{{#mmTarget}}
<br>
FocusMorph: {{mmTarget}}</p>
{{/mmTarget}}

Displaying correctly:
image

Not displaying correctly:
image

Missing return from Reviewer._linkHandler breaks add-ons that depend on return value

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: all

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

Add-ons like Pop-up Dictionary depend on the link handler to pass values between JS and PY. Unfortunately MIA Dictionary currently does not return the return value of the original link handler, breaking that bridge.

cf.: ankitects/anki#228 and ankitects/anki@56e1643

Related bug report

glutanimate/popup-dictionary#39

Capitalized Esperanto Characters are Case Sensitive

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
When searching for Esperanto words in the dictionary, non-latin Esperanto characters are treated as case sensitive.

Characters effected:
ĈĜĤĴŜŬ
ĉĝĥĵŝŭ

"Export Definitions" operation should remember selected options

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
As someome using this addon together with MorphMan, I have to perform a ritual every day after finishing my reps and running MorphMan recalc where I need to generate meanings for cards that just turned into 1T (got a focus morph). Using a saved filter in the browser, selecting the new 1T cards is easy enough. However, using the Export Definitions functionality, I have to set the same options every single time I run it. It would be very useful if the addon remembered the options I chose the last time.

Check this video to see what I am talking about:
https://www.youtube.com/watch?v=JTpqnb52FLc

All in all, I counted 13 precise mouse clicks. Sometimes there will be new cards with meaningless focus morphs (like in the video) where I need to set "already known" and recalc again, which means I need to perform the steps again until there are no new 1T cards.

Import error in clipboard hotkeys

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Arch linux: Linux 5.4.7-arch1-1 x86_64 GNU/Linux

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
Trying to activate the "search highlighted text" or "add highlighted text in card exporter" hotkeys results in the following error on linux:

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.8.1 Qt 5.14.0 PyQt 5.14.1
Platform: Linux
Flags: frz=False ao=True sv=1
Add-ons possibly involved: MIA Dictionary

Caught exception:
  File "/home/chiel/.local/share/Anki2/addons21/1655992655/main.py", line 442, in captureKey
    mw.hkThread.handleSystemSearch()
  File "/home/chiel/.local/share/Anki2/addons21/1655992655/midict.py", line 727, in handleSystemSearch
    self.search.emit(Pyperclip.paste())
  File "/home/chiel/.local/share/Anki2/addons21/1655992655/Pyperclip.py", line 155, in paste_gtk
    clipboardContents = gtk.Clipboard().wait_for_text()
  File "/usr/lib/python3.8/site-packages/gi/__init__.py", line 72, in __getattr__
    raise AttributeError(_static_binding_error)
<class 'AttributeError'>: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183

I do have both pygtk and python-gobject installed in pacman.

For now I myself am going to disable the gtk clipboard check as I'm not entirely familiar how that works in python, so consider this a low-priority issue.

Redundant Dependencies

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: All

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

There are several dependencies in the root space which are redundant:

  • requests and bs4 are fulfilled by Anki here and here
  • urllib3 is fulfilled by requests here

Dependencies should also have their own folder instead of sharing the root space with the other project files. This would include:

  • keyboardMac/
  • linux/
  • pynput/
  • Pyperclip.py

It looks like six isn't used(?)

This should help clean things up, reduce the addon payload, and help with future contributions :)


P.S. Great addon! Lot of work went into this. I'd like to help with PyQt and general refactoring/organizing if/when I have more free time. This project could really benefit from the use of Qt Designer and .ui files!

DB insertion is slow

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Any (but Arch Linux/KDE)

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
I recognize that this is probably not a huge priority.

DB insertion for words inserts a single word at a time, this is very slow as DB calls are expensive even in SQLite. It would be better to batch word insertion.

What you do is change https://github.com/mass-immersion-approach/MIA-Dictionary-Addon/blob/21169885ce98bbf8674a8298d6303248d5f15c20/src/dictdb.py#L350 to use executemany and an array instead of a single item at a time. (see https://stackoverflow.com/a/32239587)

追い返されちゃった fails to be de-conjugated.

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:
As outlined by @ Jiro 3000 on the #ideas-discussion channel of the MIA discord (11/5/2020), the MIA dictionary fails to conjugate words such as 追い返されちゃった。I figured this is because the conjugation only goes one deinflection deep, but this word in fact needs 3 deinflections. I have written code so that it will now continue to run the deinflection loop until no more deinflections are found. This solves the aforementioned problem, verified manually with the standard japanese conjugations.json file running current dev cycle add-on on windows 10.

Dictionary not opening through RDP (Remote Desktop Connection)

Type:

  • [Dictionary Hang in the background while in a RDP sessions ] bug

Environment:

  • OS: Windows 10 Pro

I'm going to open a PR to resolve the issue:

  • [X ] no

Description:
[Locally MIA Dictionary Work but when I go to my workstation and make a RDP connection to my home-station where Anki is installed MIA Dictionary will appear in the background but cannot be brought in front of the Anki main windows, all others add-ons from MIA work in RDP mode except for this one. I'm trying dirrent approach to see what could be causing this issues from a technical perspective. Will update if I find something. ]

Navigation Hotkey Support

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

Currently the addon is lacking in navigation hotkey support. I propose adopting conventions from GoldenDict and most web browers. Ordered from most to least used. Preferred hotkey when alternatives are present are listed first. Alternatives are listed for the purpose of popular convention.

  • Focus on search bar: Ctrl+L or Alt+D
  • Next / previous tab: Ctrl+Page Down or Ctrl+Tab / Ctrl+Page Up or Ctrl+Shift+Tab
  • Next / previous history: Alt+Right / Alt+Left
  • Open a new tab: Ctrl+T
  • Close current tab: Ctrl+W (this is already used as a hotkey for opening the dictionary) or Ctrl+F4
  • Reopen the last closed tab: Ctrl+Shift+T
  • Jump to the next / previous dictionary in the results: Alt+Down / Alt+Up
  • Switch to the specified tab, counting from the left: Ctrl+1-8
  • Switch to the last tab: Ctrl+9
  • Zoom in / Zoom out: Ctrl+= or Ctrl+Mousewheel Up / Ctrl+- or Ctrl+Mousewheel Down

KeyError: "undefined character name 'COMBINING APOSTROPHE'"

Type:

  • bug
  • feature
  • enhancement
  • question

Environment:

  • OS: Windows 10

I'm going to open a PR to resolve the issue:

  • yes
  • no

Description:

I didn't isolate exactly how to reproduce it, but I noticed that the error appears when I finish reviewing my cards, in a session where I used the dictionary. My cards have text in both German and English.

image

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, repeat 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.22 (0ecc189a) Python 3.8.0 Qt 5.14.1 PyQt 5.14.1
Platform: Windows 10
Flags: frz=True ao=True sv=2
Add-ons, last update check: 2020-07-01 21:53:11

Unhandled exception in listener callback
Traceback (most recent call last):
  File "C:\Users\irio\AppData\Roaming\Anki2\addons21\1655992655\pynput\_util\__init__.py", line 162, in inner
    return f(self, *args, **kwargs)
  File "C:\Users\irio\AppData\Roaming\Anki2\addons21\1655992655\pynput\keyboard\_win32.py", line 236, in _process
    key = self._event_to_key(msg, vk)
  File "C:\Users\irio\AppData\Roaming\Anki2\addons21\1655992655\pynput\keyboard\_win32.py", line 267, in _event_to_key
    key = KeyCode(**self._translate(
  File "C:\Users\irio\AppData\Roaming\Anki2\addons21\1655992655\pynput\keyboard\_base.py", line 49, in __init__
    self.combining = unicodedata.lookup(
KeyError: "undefined character name 'COMBINING APOSTROPHE'"

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.