Importing Deck Name from CSV

I don’t know the Anki database well enough, but git assumes a baseline over all, whereas in Anki you have different entities (decks, notes, …) that do not necessarily affect each other. Is one big (mono)repo the right answer? Maybe a repo per deck is more suitable? Even if Anki doesn’t maintain versions or modification dates, you could just tag the resource in question with a commit id or so.

Well you could check the size of your collection ls -lh collection.anki2, and then the size of your media directory du -h collection.media/ and that may give you a clue. I suspect that your sqlite file is actually rather small, and that all the bulk is in the media directory, since that would be where the audio files are stored.

This is good to know! Thanks very much. Would you be willing to share the decks/media? Or a procedure for how you generated them? So I can reproduce the issue!

I’m not sure I understand what you mean by “a baseline over all”. The problem of diffing two sqlite databases is pretty hairy, and I’m not sure I could do it better than the existing implementation (converting things to files and then relying in git).

I like where you’re headed with these ideas! Correct me if I’m wrong, but I think that what you’re proposing is that we treat each deck within the database as a separate source, and only pull from a source if its content has changed. The trouble with this is that you need a way of determining if changes have been made to a deck that is quicker than just reading all the data from that deck (or else you don’t gain any speed by doing splitting things up this way). For that, the decks need to be content-addressed. But doing this is difficult, because decks aren’t really first-class objects in Anki. Notes are the source of all content in the database, but decks do not contain notes, they contain cards, and a single note’s cards may be split across multiple decks. In worst case, you could have a large number of decks, change a single byte in a single note, and have that force updates across all of your decks.

In any case, just treating the problem of no-op open/close actions changing the hash of the database should be the top priority, in my humble opinion!

That’s the plugin I was talking about AwesomeTTS (1436550454) to bulk up on media :slight_smile:
You were right my .anki2 is only about 10MB.