Wish this article had been written a year ago when when I added Anki import to my learning app (https://traverse.link/)!
Especially importing media files and de-renaming them was a pain, as well as handling the different types of cloze deletes (some of this is described quite well in anki's docs, for example here https://docs.ankiweb.net/#/templates/generation)