Are there any existing libraries for generating Anki decks?
It feels like generating Anki decks from data sources with defined object-relational schemas should be easy and fruitful. Alternatively, generating them from something like an R data frame seems like it could be worth doing.
ETA: I have Googled this before asking, by the way, but there are so many Anki decks about programming languages that it seems resistant to the obvious search terms.
Anki can import .csv files easily. I did create my Anki color perception deck via R and the process was very straightforward without the need for any special library.
On the other hand there great care to be taken with auto-generating cards from existing data sources. Taking time to think about each card often makes sense. Bad cards cost a lot of review time and when you automatically create cards it can frequently lead to a lot of bad cards.
Can you tell me something about your color perception deck? Are you trying to train yourself to be better at distinguising (and naming?) colours for some reason?
Yes, I train color distinctions. Every card has two colors and shows them plus a color name then the user has to decide which color Anki displayed. Over times the distance between the colors goes down and I pick colors that are more near to each other.
I was wondering why. It doesn’t seem all that useful, unless you are abnormally bad at color perception or you have a job or hobby that somehow needs good color perception (something in art or design?). I suppose it’s fun and interesting to see how well that kind of thing can be trained, and how it changes your experience, but I was wondering if there was more to it.
I had a similar problem a while back (given a bunch of one-sided cards, I wanted to programmatically generate their inverses). I couldn’t find anything either, and wound up scripting my browser(!?).
Are there any existing libraries for generating Anki decks?
It feels like generating Anki decks from data sources with defined object-relational schemas should be easy and fruitful. Alternatively, generating them from something like an R data frame seems like it could be worth doing.
ETA: I have Googled this before asking, by the way, but there are so many Anki decks about programming languages that it seems resistant to the obvious search terms.
Anki can import .csv files easily. I did create my Anki color perception deck via R and the process was very straightforward without the need for any special library.
On the other hand there great care to be taken with auto-generating cards from existing data sources. Taking time to think about each card often makes sense. Bad cards cost a lot of review time and when you automatically create cards it can frequently lead to a lot of bad cards.
Can you tell me something about your color perception deck? Are you trying to train yourself to be better at distinguising (and naming?) colours for some reason?
Yes, I train color distinctions. Every card has two colors and shows them plus a color name then the user has to decide which color Anki displayed. Over times the distance between the colors goes down and I pick colors that are more near to each other.
I have written about this on LW in the past.
I was wondering why. It doesn’t seem all that useful, unless you are abnormally bad at color perception or you have a job or hobby that somehow needs good color perception (something in art or design?). I suppose it’s fun and interesting to see how well that kind of thing can be trained, and how it changes your experience, but I was wondering if there was more to it.
Here and here.
When I do this, I write a little one-off program that spits out a tab-separated values file, then import the file with the Anki desktop app.
I had a similar problem a while back (given a bunch of one-sided cards, I wanted to programmatically generate their inverses). I couldn’t find anything either, and wound up scripting my browser(!?).
That’s done by adding note types:
Tools/Manage Note Types/Card/+