Remix.run Logo
allenu 2 days ago

I wrote my own flashcard app and had a very basic import from Anki feature and I have to admit that I underestimated how Anki handles it. My first attempt at import was very naive and sort "flattened" the imported data into simple front/back content. It lost a lot of fidelity from the original Anki data.

After investigating the way Anki represents its flashcards a bit more, I can really appreciate the way Anki uses notes, models, and templates to essentially create "virtual cards" (my term).

I suspect other people creating their own flashcard apps underestimate the data model Anki uses and have a hard time matching their own data model with Anki's, which may be why decent import options are hard to find. If someone wants to support Anki deck import, they have to essentially use the same data model to represent notes and models (plus cloze deletions). I'm now adopting Anki's model for my flashcard app for better import fidelity.

Regarding the SQLite data format, I was thinking it would be great if there were a text-based format instead for defining the deck and its contents as that would make it much easier to collaborate on shared decks on GitHub, like you suggest. It would be great to have a community work on essential flashcard decks together in an open format that encourages branching and collaboration. I know some groups do this with Anki decks, but I can't imagine the SQLite file format makes it easy to collaborate.

I don't think it would be that hard to come up with a universal text file-based format for a flashcard deck that supports notes, models, templates, and assets. For instance, we could have each note placed in its own text file and have the filename encode the a unique ID of that particular note. Having unique identities for everything would make it easier to re-import updated decks to apply new updates if you had previously imported the deck. The note files could also be organized into sub-folders to make it easier to organize groups of info that should be learned together.