Modify deck with python

Hi,

I’m trying to modify the deck: https://ankiweb.net/shared/info/192537753.

I’d like to re-enforce the “Dual coding theory” for the article. In german, they have three articles for the noun which are der (masculin), die (feminine), das (neutral).

So instead of writing the answer in german:
der Hut
die Frau
das Fräulein

I’d like to have
:droplet: der Hut
:pink_heart: die Frau
:green_apple: das Fräulein

To do this, I was going to use python. But I did not found any package that could read/modify/write a .apkg file.

Could you point me to a good package ?

Use the official anki package. Here’s an example of creating a collection and importing a .apkg package:

Refer to the add-on docs for more details:

2 Likes

Just use JavaScript in the Notes of the package. You can determine the gender, if you have a separate column or if you can parse the definite article from the beginning of the word. Then you can apply your emoji/icon and its colour.

2 Likes

I remember seeing a nice post about it, not sure if it’s this one ( Color Formatting of Gender-Marked Articles for 4 Languages using Regex and Javascript ) or a more updated one that I saw.

Edit: the one I saw is Reddit - The heart of the internet

1 Like