Conversation
| end | ||
|
|
||
| def self.apkg_importer | ||
| # TODO: This is daft |
There was a problem hiding this comment.
agreed. i'll probably massage the api to be something like Anki::export and Anki::import
|
@rkachowski would be fantastic if you could take a look at this. :) |
|
Hmm, my email notifications seem to be screwed up. Thanks for mentioning me - I'll look at this asap |
|
@rkachowski Do you have the time to look at this? :) |
Support cards with null content
Fix crash when importing cards with external media
| end | ||
|
|
||
| def self.apkg_importer | ||
| # TODO: This is daft |
There was a problem hiding this comment.
agreed. i'll probably massage the api to be something like Anki::export and Anki::import
| back_text, back_media = self.parse_text(back) | ||
|
|
||
| # TODO: Is it one card per card or per note? | ||
| # And where should the id come from? |
There was a problem hiding this comment.
the anki db schema is a bit funky, but conceptually a card contains references to several notes. afaik as long as they are unique and consistent within a deck, all should be fine. https://github.com/dae/anki/blob/b5a89737913afe04a518cd7741a2c90d5eeb9692/anki/storage.py#L233
Adds a function
Anki::apkg_importer.importthat imports decks from an apkg file. Added instructions to the readme file.