Dear Anki Addon Community,
I hope that some generous person might be willing to help me with an addon problem, or even just take over the addon.
I am not a coder or programmer, just an avid Anki user and promoter for over ten years. About 6 years ago, a friendly addon writer helped me develop a simple addon (only 8 lines of code) that has been very helpful for me, my children, and many of my friends who use Anki.
However, that addon broke around version 2.1.18 or 2.1.19, and I have not been able to figure out how to fix it. Thus, we havenât been able to update to any Anki release since then.
The addon is a simple concept. Some cards are are just more difficult to learn than others. And everyone is going to have some problematic or difficult cards. I donât like to just suspend these difficult cards, and even sometimes after reformulating a card, it might still require special attention to learn accurately.
For these cards, we created a small addon that plays a small âding,â âchimeâ or ânotificationâ sound when such a card comes up. This sound notifies the user to pay extra attention before answering the card. This has helped us learn troublesome cards more efficiently.
The addon (pasted at bottom of post) was very simple. It was triggered based on tags. So, you could tag a card with any word you wanted (such as âhardâ) and when a card came up for review with that tag, the sound would play. You could even trigger different or multiple sounds based on tags (such as âhardâ and âveryhardâ). You could even just use Ankiâs built in tags of âmarkedâ and âleechâ and just trigger a small sound with those.
In addition to the addon itself, a person had to add the sound file(s) into their media folder (something like â_marked.mp3â or _leech.mp3) and also had to add a line like this in the card template:
{{ring(marked):_marked.mp3}}{{ring(leech):_leech.mp3}
If someone wanted to make the line not noticeable, they could also wrap it in a span like this:
{{ring(marked):_marked.mp3}}{{ring(leech):_leech.mp3}}
All that to say, we are all still running older versions of Anki to keep the addon working, but Iâd love to update the addon to work with current versions. Unfortunately, with my very weak coding knowledge, I have not been able to get the addon working.
Any help in getting it working again would be greatly appreciated. And if you like the idea of the addon, you are welcome to even create/update/post the addon as your own. I think that many others in the Anki community would also find it helpful.
Thanks in advance for any help.
All the Best,
mnhende2
I canât seem to attach the addon to this post, so here is the add one code:
Addon for audio dubbing of tag
Key-expression format: {{ring(my_tag):file.mp3}}
from anki.hooks import addHook
def addModifier(txt, my_tag, fields, fname, full):
if my_tag in fields[âTagsâ]:
txt = â[sound:â+fname+â]â
else:
txt = ââ
return txt
addHook(âfmod_ringâ, addModifier)