Giter Site home page Giter Site logo

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

View Code? Open in Web Editor NEW
50.0 4.0 12.0 64.16 MB

Learn kanji within the context of the vocab in your Anki collection. Comes with a powerful lookup browser.

Home Page: https://migaku.io

License: GNU General Public License v3.0

Python 18.67% HTML 3.52% CSS 5.00% JavaScript 24.51% SCSS 3.80% Nunjucks 44.48% Shell 0.01%
anki anki-addon kanji kanjivg kanjidic kanji-frequency japanese japanese-study japanese-characters japanese-language-learners

migaku-kanji-addon's People

Contributors

anonymouscommitter avatar benjaminprice avatar hgiesel avatar minmotech avatar mjuhanne avatar ricbent avatar saxoncameron avatar saxoncameron-mudbath 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

Watchers

 avatar  avatar  avatar  avatar

migaku-kanji-addon's Issues

[FEATURE] Provide supplementary info to Radicals buttons

Currently, Primitive buttons have this useful tooltip, if clicked, display the primitive in the kanji lookup browser:
unknown2

However, Radical buttons have no info tooltip, and are not clickable:
unknown1

I think perhaps just providing the radical name in an on-hover tooltip would be enough.
I'll explain the difference etc. in #12 which can be a separate effort in future.

[FEATURE] Distinguish "new" cards in linked words

Currently, under the "Appears in" section (a.k.a. "linked words"), there are two distinctions:

  1. Cards in your collection
  2. Example words (you can view in the dictionary).

Pasted_Image_24_10_21__8_15_pm

Adding a third type, in-between, for "new" cards in your collection (i.e. "upcoming" cards) would be awesome. It just needs to be a new class name on the button. I'd probably style it something like so:

Pasted_Image_24_10_21__8_19_pm

I think maybe I'll add a tooltip - which explains "what" it is.

[STYLE] Distinguish primitive buttons by known/new/unknown status

Currently all primitive buttons look the same, solid color:
image

Whereas in linked vocab, we make distinctions between known/new/unknown with these styles:
image

It would be nice if we could reflect similar statuses for primitives and primitives_of.

Challenges

  • Significant backend work required
  • Whenever a basic kanji learned/unlearned potentially dozens of cards need to be updated to reflect that
  • In the lookup browser, we'd have to distinguish between recognition and production status somehow

[TWEAK] Clicking example dictionary words opens them in the dictionary

I know Shift+Click does this already, and now I've even added a little note that says as much, I still think it'd be an intuitive change to make it so that if you click on the grayed-out example words it opens them in the dictionary.

I think keeping Shift+Click behaviour also makes sense, because it can be used to do dictionary lookup of linked cards (the solid color buttons).

Pasted_Image_27_10_21__10_03_pm

[FEATURE] Display why a card was created

When learning some cards, especially cards that have been recursively created, it's not clear to a user why they are learning it.

For example:
image

Which has no linked words. With the new "primitives of" feature, we can see that it's useful to learn because it's a building block used in some other kanji:

image

However, that still doesn't tell us WHY we're learning it, and what card/word triggered it to be created. Turns out, it was this card/vocab which, when added, recursively created the unknown primitive cards.
image

Showing why you're learning the card, e.g. displaying the vocab/card that triggered the card creation, would be really valuable. Could go alongside/nearby the "Appears in" vocab linked words:

image

but if/when we add this feature in, I'll probably look at restructuring/grouping the data in that section to make things a bit clearer.

[FEATURE] Display primitive alternative somewhere

Per kanji database spreadsheet:
https://docs.google.com/spreadsheets/d/1aw0ihw0RpmejWLTUynrFYjmOfLdzcPVrDX7UM50lwBY/edit#gid=2109245908&range=A344

image

There is a field "Primitive Alternatives" that'd be useful to display, since it can sometimes happen that the alternative is by far the most common representation of the primitive, e.g. with carve wood:
image

Perhaps displaying this, and the existing primitive name, could be displayed together somewhere separately

[FEATURE] "Mark Kanji Known" presets - WaniKani and RRTK?

Hey Bent I was scrolling through some of the older history on Discord, and there were some requests and half-baked plans for marking kanji known by WK level?

Also, there's this old text dump for RRTK which used to be MIA recommended way before the Refold/Migaku split, I think it'd be a nice/easy import preset addition:

一二三四五六七八九十口日月田目古吾明品呂早世旦旧自白百中千舌升丸寸専博占上下朝貝員見児元頁頑凡負万句勺的首乙乱直具真工左右有刀刃切召昭則別丁町可頂子了女好母兄小少大多夕外名石肖砕砂光太器妙省奇川州順水永泉原願源活消泊土圭寺時火炎点照魚里黒量埋同向字守完安寄富木林森植村相本暦案未昧味妹朱若草苦薄葉暮苗兆眺犬状黙然牛特告先洗介界茶合王玉現狂呈全理主注金道造迫逃辺車連前各格略客額夏処条落軍運夢高京景舎周週士吉壮売学覚書津攻敗枚故敬言警計詰話語読調談式試域成城威滅減銭浅止歩歴武正証政定走超越是題建衣装裏哀遠初巾布幕市姉帯刺制転芸雨雲冬天橋立泣章商適敵匕頃北背比皆旨毎梅海腹欠吹歌次資姿音暗識鏡境亡荒望方坊訪放激脱説曽増東廷染歳県地池虫独風己起改記包亀電遂家場湯羊美洋詳達差着唯誰焦集進雑準奪確午許権観羽習翌曜困固国団因園回店庫庭床心忘忍認志誌忠思応意想息恐惑感憂忙怖悔憎憶必手我義議抱批打捨指持推提担拠描接掛研鼻刑型才存在乃及吸扱丈史吏更又隻護奴怒友抜投設撃支技怪軽叔寂反坂板返爪浮将受愛払広弁雄台治始窓去法会至室到致互育充流出山崩密入込分貧公谷容欲堂常皮波破被残殊列死瞬耳取趣最恥職聖敢聴懐買置環夫規失鉄臣巨力男労勧努加行復得従徒待彼役徳微街程和移秋私秘称利香秀米迷奥数類膝様求竹笑筋箱筆等算答人住位仲体件仕他伏伝仏休仮俗信例個健側値倒僧儀催侮使便倍優宿傷保付府任代化花傾何荷傍俺久内丙柄肉座以似宮善年夜遊旅勿物易屋握屈居層局遅尺尽沢訳昼戸肩戻涙示礼福社視宗祭察由油甲押申伸神果斤所近折哲斬暫断質昨作雪尋急寝婦当争事君群耐端両満画曲斗料科図用備昔借惜散廿席度渡焼半判巻勝藤片版之芝不否杯矢族知智矛務帰引弘強弱第弟号汚与写身射謝老考孝教者著暑諸頬追師官父交効較校足距路踏骨過際障隙随陽防院隊降階隣隠穴空突究探深丘兵糸織線緒続絵統給結終級紅納経約細総継縁緊後幾機玄系係却脚卸御服命令冷領勇通疑犯厄危腕卵留印臼興酉酒酷酔配尊豆頭短豊喜樹皿血温盛銀根即節退限眼良娘食飯飲館養既概平呼評希凶胸離殺純辛辞壁新親幸報叫収陸勢熱亥刻述術寒毒素青精情晴清静責積表害割生星姓性産春実奉棒勤難乗今含念陰予野兼嫌西価要腰煙南門問間闇簡開閉聞倉創非悲罪輩侯喉決快偉違衛干軒岸余途束頼速整剣重動働種病疲痛癖医匹区抑仰迎登発形影彦顔参修珍文対斉済楽薬央英映赤変跡恋黄横色絶甘期基甚堪貴遺遣舞無組助並普霊業僕共供異暴選殿井囲亜悪円角触解再講構論輪氏紙婚低底民眠捕部都那郷響郎派衆段舟般船益暇敷来気飛沈妻凄面声呉承極牙邪番毛尾宅為長張髪展単戦脳悩厳挙鳥鳴島隅逆就免晩勉象像馬験駅騒駄驚虎虚戯慮劇鹿麗能態寅演辰振農送関鬼魂魔屯且或也巴疋云莫而肋妾坐

Sourced from the INDEX_MINIMAL.csv in the release as per README from here:
https://github.com/cyphar/heisig-rtk-index

Never quite made it in, back in the day...!
image

[FEATURE] About page in settings

Settings page should have an "About" tab at the right.

Should include:

  • License notices/links to Raphael, Dmak and KanjiVG.
  • License notice/links for the add-on itself (GitHub, AnkiWeb, Homepage, etc)

[BUG] Look-ahead card creation not occurring reliably

Per Discord:

Stevijs3#7444 summarises this known issue and its hack-fix:

If the cards aren't created, despite all the correct settings, opening and closing the kanji settings menu often helps

From user Ky#3749:

I had configured my settings as Stevie had recommended in the video he linked, but after a while I stopped getting new kanji cards in my queue (even after "refreshing"). Soon I started getting unfamiliar kanji in my sentence cards so I figured there was a problem. I just changed my "learn-ahead card count" to 60 and now I have new kanji cards queued up. Will I have to keep increasing this number periodically?

From user MichaelP#9248:

in my case, the add-on works fine on cards addition (new cards added to the mining deck) but not for cards that came with a deck (custom study -> Increase today's new cards on Tango decks). For the tango decks, I need to open/close the kanji settings to get the new cards.

[BUG] Consolidate found kanji duplicate window (triggered often by 1T exports)

Another one from the Discord archives:

(From me):

I don't know how feasible it is, but when you're running the "Export 1T" (e.g. on Netflix) it'd be cool if these could pop-ups could somehow consolidate as they appear (i.e. if a popup is already open when a card is parsed with new kanji, add it to the same popup instead of opening a new one)

image

[FEATURE] Add option to hide the Migaku header

Since the launch of the restyle, it's seemingly a very common customisation of the note types to remove the Migaku header. Having a checkbox in Kanji Settings, checked by default (essentially an opt-out) is probably an easy way to keep people happy.

Seeing as it would be a quick/easy setting to implement. What do you think?

[Bug] Key sequence wrong on lookup welcome screen

image

The key sequence on the welcome screen doesn't adapt to either OS or language.

Will inject the shortcut html from python to ensure the shortcut key names/language stays consistent across both sides.

[FEATURE] Add similar kanji to cards

From Discord user Dave#9546, and also requested in the past by various users:

I would love a "similar kanji" list on the back, that could be autopopulated, but it would actually be sufficient if I could just add the kanji that I often get confused with the card I'm repping. Confusion tends to arise from similar shape or similar meaning.
https://discord.com/channels/752293144917180496/905157925763416084/905167389757435944

Contentious

I think this may only seem like a good idea but in fact not be. Context from a previous (similar) discussion about training to distinguish similar kanji,

I saw an article once that you shouldn’t train similar things together, quoting a section:

“Minimal pairs are good for phonological research and for making learners aware of crucial, phonological distinctions, such as in the vowel in ship and sheep, or the initial consonant in tin, thin and sin. So, of course some listening practice and some pronunciation practice with minimal pairs will obviously have to take place, but only initially, for creating the awareness. Not more. They should never be automated pairwise, because of Hebb's principle, "neurons that fire together, wire together." That is, if the words are automated together, they will always pop up in my mind together. Even if (or, rather, particularly if) I master the distinction to exquisite perfection, every time I am about to say one of them in context, both of them will appear in my mind as in a multiple choice test, I will hesitate for a fraction of a second, and distressingly often pick the wrong one.”

Although it talks about minimal pairs for pronunciation/listening practice, the same principle applies.

“This happens not only in pronunciation but in grammar and vocabulary too, such as gender le-la in French or en-ett in Swedish. I'm sure every reader of this paper can recognize the situation. For instance, native speakers of English have a notorious tendency to pick the wrong alternative of their and there in writing their own language. This is not due to low education or low IQ but more likely to Hebbian muddle-up. Their teachers will have been very meticulous about teaching them the distinction a zillion times at school... So don't ever practice much with two similar things. Put them each in their own natural (and different!) context, and Quality Practice one the first day, and the other one another day. Monday: There was a cute, fluffy sheep in the barn. Wednesday: I saw their luxurious, white ship in the harbour.”

Full article here https://www.researchgate.net/publication/285234145_Quality_Practise_Pronunciation_With_Audacity_-_The_Best_Method
https://discord.com/channels/752293144917180496/846925957302714388/891323741739577374
From Discord user JMigCarrier#3963

[BUG] [STYLE] Words on front of card break with small screen sizes

The example words at the top of cards line break instead of other words beaking to new lines.

Mostly affects mobile devices roughly with the same size as an iPhone 6s or smaller.

Peek.2021-10-25.18-00.mp4

(ignore the flickering, that is caused by the screen recording)

[FEATURE] Have kanji diagram start with all strokes drawn

Currently, the default behaviour of the diagram is to draw all strokes simultaneously. This is because the underlying plugin "Draw Me a Kanji" (or DMAK for short) doesn't support otherwise. In fact, this "simultaneous" drawing feature is already a customisation we have made to the original DMAK library.

Initially I investigated implementing something like this, "start in a finished state", but found it difficult to do with DMAK. I compromised for the "simultaneous" behaviour we currently have. This issue is to bookmark future effort to try once again to implement something like "start in a finished state".

On a related note, some users have expressed an interest in having the existing setting ([x] "Autoplay stroke order from start") being changed to a dropdown to offer choice in how the diagram renders by default:

  1. Already drawn (prospective feature, and would-be default)
  2. All strokes simultaneously (current default)
  3. Play from start (a.k.a. autoplay)

[BUG] Shift-clicking words opens dictionary but doesn't populate (Windows)

From Discord user Seandub:

shift clicking pops up the migaku dictionary add-on, but doesn't copy the word. Also even if i right click on the grey word and select "Lookup Kanji", it will pull up the window but doesn't actually copy the word. Right click the grey and click "Search" does nothing (window doesn't even pop-up)

I don't think this worked for me even on the old version

image

[TESTS] Implement visual regression tests

Something like cypress or jest-image-snapshot to store screenshots of the demo html and derivative templates, as a form of regression test suite. Probably the simplest and most elegant way to implement tests for the addon templates.

[BUG] Kanji stats not syncing if marked manually

Per Discord user eizenga71#9453:

The kanji stats do not transfer from PC to PC.
I cant seem to find a way to move my kanji database if you will to another computer or if its saved in the Anki cloud its not translating over to the other install

image

👆 They checked both Anki versions and addon versions on both computers, finding no issue:

They are on ver. 2.1.35 and both my addons are on 0.1.4 so I have no idea what it could be

I suggested trying to manually copying the addon folder from the working PC to the other PC, but this did not work either.

Issue is potentially related to marking known manually:

I think the underlying issue must be the cards that I have marked as KNOWN manually. Maybe they are saved differently locally. But then by copying the folder it should still have that information saved so I don't understand why its not updating the information. I also refreshed the kanji stats and it is not updating the information either.

[BUG] Stroke diagram isn't working on AnkiDroid

I was able to emulate an Android device on my MacBook easily enough, and for free with BlueStacks. Then I just signed in with my Google account to download AnkiDroid, and synced with my account.

I've managed to get the assets loading properly, but we'll need to get the kanji diagram working too 🤔

Pasted_Image_23_10_21__7_50_pm

[FEATURE] Generate kanji cards from text box

Context:

From Discord user Dave#9546:

One thing I like to use the add on for is that I'll download the subtitle files for a show or episode I'm about to watch and copy/paste it all on the front of a new card and generate all the kanji cards from it. If I learn all the unknown kanji in it before I immerse, it really helps, honestly.
https://discord.com/channels/752293144917180496/905157925763416084/905174434254561310

Bent's reply:

Oh, I think I should add an option that gives you a text box to enter any text. The addon would then generate all the kanji cards for that.

[BUG] Expanded tooltips don't close on subsequent lookups

Due to the nature of the lookup browser, tooltips that have been toggled open stay open on subsequent searches. This is because the lookup browser isn't totally refreshed on every search - just the relevant parts updated/replaced. Therefore this isn't an issue in reviews.

Should be a relatively simple fix to target tooltip containers and hide them, in the lookup script on search.

Pasted_Image_3_11_21__11_22_am

[BUG] Stroke order hotkeys (arrow keys) very jumpy

I suspect that there is something amiss to do with unbinding/rebinding the hotkey event handler on successive page loads. Seems to work well on the first kanji, but break after displaying a few of them (i.e. in reviews).

[FEATURE] Option to disable dictionary radicals

Generally dictionary radicals aren't really useful for most learners.

An option should be added that allows toggling the radical section.

By default it should be disabled as the difference between primitives and radicals would just throw off beginners.

[FEATURE] [QUESTION] Retain note type customisations?

People have expressed frustration that changes they make to the note types in Anki (i.e. customised CSS/HTML) are reset every time they restart Anki. While it's possible to edit the models/* files directly in the addon folder, that's not easy or obvious for most users.

I'm guessing the note type is regenerated/restored to keep the Kanji Settings config up-to-date, right? Any way we could do this without completely overwriting the existing templates, to preserve any customisations...?

[FEATURE] Settings to selectively show/hide different parts of the templates

Originally discussed in #29.

Toggling show/hide on any/all sections; we've had a number of requests from users to customise what's displayed, since there's a tonne of info on the cards.

A simple way to implement this would be for me to make a class name apply display: none to the container, then your options could just selectively add class="-hide" to each of the containers.

Then we could just have this the only section that's hidden by default.

The two main challenges:

  1. Potential implications to the layout, depending on what's hidden, and there being gaps etc.
  2. Even MORE options added to an already very-crowded and complex settings menu

[BUG] Newly created cards end up in example words

@RicBent did you end up fixing this? I saw it as recently as the last update? It was always fixable with Migaku > Refresh Kanji Cards, but it did seem like there was hook upon card-creation that inserted those new (unlearned) words into the card's example words.

Screenshot from our old chat:
image

More context from our DM history:
image

[FEATURE] Drawable canvas for production card front

Putting a drawable on the front of production card templates would be nice:

This deck has a cool draw-in-place canvas, complete with stroke nice-ifying/correction:
https://ankiweb.net/shared/info/1558868613

image

It might be a nice feature/toggle to offer similar/same stroke nice-ifying/correction (especially since drawing on mobile and touch screens is always a little janky).

It might be a good idea to somehow/somewhere show the same drawn-canvas on the back of the card, so the user can compare the "correct" answer/stroke-order with what they've drawn, but that could be a challenge.

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.