continuing-cyan•4mo ago
"Field settings" option in the anki addon doesn't work with non legacy browser extension
Hello.
The "field setting" option present in the anki addon was quite useful, allowing cards created by the browser extension to be automatically edited based on regular expression substitution.
I've recently switched to using the non-legacy browser extension, and ever since I did this feature no longer works for me.
I've tried updating to version 0.3.31 of the addon (anki 24.06) but the issue persists.
Can someone help me in understand and solving the issue possibly?
Thank you.
6 Replies
metropolitan-bronze•4mo ago
@tcoren there was a recent anki addon update and now the latest version 25.02 is supported
can you try updating everything and trying again?
continuing-cyanOP•4mo ago
It still does not work, I have updated both anki and the migaku addon
.
Looking into your code, I believe the issue is the regex substitution is in migaku_connection/card_creator.py, which is not used with the new chrome extension (migaku_connection/card_receiver.py is the script that is used instead).
Not completly sure though - I haven't fully dived into your code
metropolitan-bronze•4mo ago
Ok I see
unfortunately this is not likely to be a priority fix and so may take quite some time
continuing-cyanOP•4mo ago
Ok. For what it's worth, I've managed to restore the desired functionality by editing the addon's python code. So if no one else desires a fix then the situation is pretty much solved as far as I'm concerned (I would prefer if the issue is "officially" fixed of course, if only so I don't have to edit the addon code on every version update)
metropolitan-bronze•4mo ago
Sounds good
continuing-cyanOP•4mo ago
(For the record, the solution was to the copy post_process_text function from card_creator to card_receiver, and to change line 69 in card receiver from str(getattr(card, type)) to self.post_process_text(str(getattr(card, type)), fieldname). I needed to remove the lines about convert_audio_mp3 in post_process_text since they caused issues, as well as to import config)
Anyway, as I said, you can consider the issue resolved as far as I'm concerned.
Thank you for helping