Flashcards.js is a project mainly written in JavaScript, it's free.
A relatively simple but flexible flashcards library
A flexible javascript library for creating flashcards
flashcards.js generates something that looks like this gorgeous ASCII drawing:
/---------------\
| item A | <-- touch this to get a new flashcard
\---------------/
/---------------\
| item B | <-- touch this to get a new flashcard
\---------------/
flashcards.js should generate a 2-pane layout, where interacting with a pane displays a specific item from a randomly selected tuple. flashcards.js will internally handle user interaction events and data management. control over the data, on the other hand, is left to the user. Thus, flashcards.js will have the following features:
flashcards.js is content agnostic. It interacts with data through a set of extractor functions working on tuples (where the reified type of a tuple remains unstated). A tuple contains, at the very least, the data for a single flashcard consisting of two items. We define the following API:
.data(function() { return <array of tuples> })
.itemA(function(tuple) { return <unicode string> }) - this string will be displayed in pane A
.itemB(function(tuple) { return <unicode string> }) - this string will be displayed in pane B
.shuffle(<boolean>) - shuffle the tuple array before flashcarding?
.reset() - simply reset all internal state.
.redraw() - redraw the current character. Ideal if you chanced
State: changing any of these functions will regenerate all internal state. This makes it easy to build a control panel that interacts with this data.
<html>
<head>
<script>
var f1 = flashcards("flashcard1_paneA","flashcard1_paneB")
.data(function() { return [(1,"one"),(2,"two"),(3,"three")]; })
.itemA(function(t) { return t[0]; })
.itemB(function(t) { return t[1]; })
</script>
</head>
<body>
<div id="flashcard1">
<div id="flashcard1_paneA"></div>
<div id="flashcard1_paneB"></div>
</div>
</body>
</html>