-
Notifications
You must be signed in to change notification settings - Fork 9
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
any way to import anki decks? #17
Comments
Hi, no there is no way |
I don’t know about Anki but some apps (notably quizlet, cram.com) allow exporting cards as csv/tsv. For the simplest (text-only) flashcards, you can create a file that can be imported by the app using the following little function (which you can easily amend for other input formats): with open(csv_file) as f:
lines = f.readlines()
deck_uid = -812177 # Doesn’t matter much
cards = []
for line in lines:
question, answer = line.split("\t")
cards.append(
{
"id": 1,
"deckId": 1,
"ordinal": 0,
"question": question,
"questionImage": "",
"questionVoice": "",
"answer": answer,
"answerImage": "",
}
)
print(
json.dumps(
[
{
"serialVersionUID": deck_uid,
"deck": {
"id": 1,
"name": deck_name,
"createdDateTime": "1703530960604",
"updatedDateTime": "1703530960604",
},
"cardList": cards,
}
]
)
) Write the output of the script into a file called I’m rather new to this app but just made this work by looking at an export file that the app produces. |
Hi! Is there any way to import flashcard decks from the flashcard app anki?
The text was updated successfully, but these errors were encountered: