Jump to content

[REQUEST] Anki Workflow to Create Cards


Recommended Posts

Anki is a powerful flashcard program. It is written in python and fully documented.

 

There are two primary areas where Anki excels.

1. The spaced repetition algorithm.

2. Its fully customizable.

 

 

Types of Cards:

 

Basic: Side1=Question, Side2=Answer

 

Cloze Deletion: Essentially a fill in blank, but extremely useful.

 

 

 

Example of Cloze: 

 

This is what is written:

Ventricular {{c1::Tachycardia}} is caused by {{c2::reentry}}. 

Antiarrhythmic drugs alter the {{c1::absolute}} refactory period or {{c1::conduction}} {{c1::velocity}} to prevent {{c2::reentry}}.

The c1 and c2 are two different cards.

 

The c1 would show as:

Ventricular ___ is caused by reentry. 

Antiarrhythmic drugs alter the ___ refactory period or ___ ___ to prevent reentry.

The c2 would show as:

Ventricular Tachycardia is caused by ___. 

Antiarrhythmic drugs alter the absolute refactory period or conduction velocity to prevent ___.

Optionally, you can designate a hint when writing the cloze deletion:

Ventricular {{c1::Tachycardia::BMP > 100}} is caused by {{c2::reentry}}.

So the result would display as:

Ventricular [BPM > 100] is caused by reentry.

There is also the possibility to add an image to the "Extra" field.

X3EQF3r.png

 

 

 

There are many other options, but I just highlighted a few.

 

 

This endeavor is well beyond my scope of expertise, and this post is basically a "shot in the dark" as I don't expect anyone to actually assume this task. I thought maybe, just maybe, there is someone out there who is so well versed in the arts of Alfred and Python that this request would be trivial.

 

 

Med students everywhere would be forever grateful.

 

best,

Edited by DrLulz
Link to post

Yeah I had some similar questions - I looked at the docs and it looks like for each card you would be entering a front and back, then optionally cloze, tags, etc.  Wondering if Alfred is really the best tool for this.

 

Thanks for the ref. to Anki btw.  Looks v. powerful and useful.

Link to post

Alfred could work as an interface to the cards: i.e. actually studying the cards through Alfred. Proper image support would suffer, but it could be doable with a fun script filter.

 

Making the cards this way wouldn't be the best through Alfred because you'd need way too much text for Alfred to handle elegantly. If you want to "batch" make cards, then you'd probably want to just create the text in some structured format (XML or JSON) or have a script that puts the structured text together and then imports it into Anki.

Link to post

What, specifically, would be some sample code for creating a card? Also, what would the potential workflow look like? As in, would you just type the full card into Alfred? Or would something with more text viewable be preferable?

 

The best cards are generally short and to the point, and Alfred may be useful for creating them. Using Anki correctly requires that the cards not cover more than a topic or two. After a card is presented you tell Anki if you knew the topic, if it was "fuzzy" remembering it, or if you flat out had no idea. Based on your input Anki calculates when to show you the card again based on the algorithm.

 

I love that Alfred never gets in the way. Its always there, but like a silent friend ready to spring into action at a moments notice. I'm always reading something, and consequently most of my cards are just copy/paste. If I could call up Alfred and input some text into Anki without making the Cloze Deletions, it would still save abundant time. I wouldn't skip a beat, and later I could go in and add some brackets with little effort.

 

 

 

Alfred could work as an interface to the cards: i.e. actually studying the cards through Alfred. Proper image support would suffer, but it could be doable with a fun script filter.

 

 

I'm not sure about reviewing cards with Alfred. It seems like it would be monster effort to get the deletions to show correctly, or to tell Anki your proficiency on a topic so that it can calculate when to show the card again.

Link to post

The best cards are generally short and to the point, and Alfred may be useful for creating them. Using Anki correctly requires that the cards not cover more than a topic or two. After a card is presented you tell Anki if you knew the topic, if it was "fuzzy" remembering it, or if you flat out had no idea. Based on your input Anki calculates when to show you the card again based on the algorithm.

 

I love that Alfred never gets in the way. Its always there, but like a silent friend ready to spring into action at a moments notice. I'm always reading something, and consequently most of my cards are just copy/paste. If I could call up Alfred and input some text into Anki without making the Cloze Deletions, it would still save abundant time. I wouldn't skip a beat, and later I could go in and add some brackets with little effort.

Why not just have a simple workflow that allows you to add text to a file, line by line. You pop up Alfred, enter the appropriate keyword, then your text, then enter and Alfred disappears. Once you are done with whatever you were doing, you open the text file, edit the lines however you like with the Cloze Deletions, then send that to Anki. That seems like close to what you want, but also insanely simple (I know there is already a log to text file workflow out there).

Link to post

Not sure exactly how you get new cards into Anki, but I was thinking, giving the scripting support, that you could automate it. So, the process would be:

[1] open Alfred

[2] type card data

[3] workflow appends that to a text file

[4] (later) open text file

[5] edit cards (1 per line) with any desired Close Deletions

[6] script iterates over lines of file and sends each one to Anki as individual card.

That was what I was imagining, tho again, I know nothing about how Anki works.

Link to post

The harder part is also figuring out how to deal with the interaction with Alfred because you need two parts: the question and the answer.

 

It's easy enough to get those two parts, but you lose focus with Alfred when you need to copy/paste for the second interaction, so we'd have to invoke it manually again...

 

There could be a sort of "Alfred-created-cards-on-queue" to process for the Cloze parts, but, again, that would be hard to do with Alfred because of how its interface is invoked.

 

It seems like Alfred could be good to save grabbing "snippets" for questions and answers but not really at all for the Cloze deletions.

 

It could be done using CocoaDialog or Pashua (probably better) quite a bit, but that would be a much, much, much more intense development process.

Link to post
  • 3 weeks later...

I don't use Anki (the price of the app on iOS is ridiculous), but I use flashcards a lot (I had about 10,000 last time I looked).

 

What I do is create the lists as TSV (tab-separated) files in a text editor and have a script to convert the TSV files into an importable format, e.g. .studyarchive files for Mental Case or a differently-formatted TSV for Flashcards Deluxe.

 

It's hard to imagine a more efficient input interface than an editor, and I think it'd be a better investment of time creating a syntax definition for an editor than trying to coerce Alfred into working as a flashcard editor.

Edited by deanishe
Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...