From c6b0945af1b8c75cd246090d5206787a7824cd5a Mon Sep 17 00:00:00 2001 From: Damien Elmes Date: Sat, 22 Dec 2012 09:39:38 +0900 Subject: [PATCH] import descriptions in parent decks --- anki/importing/anki2.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/anki/importing/anki2.py b/anki/importing/anki2.py index e00320a07..c6a0143c2 100644 --- a/anki/importing/anki2.py +++ b/anki/importing/anki2.py @@ -186,6 +186,14 @@ class Anki2Importer(Importer): name = self.deckPrefix if tmpname: name += "::" + tmpname + # manually create any parents so we can pull in descriptions + head = "" + for parent in name.split("::")[:-1]: + if head: + head += "::" + head += parent + idInSrc = self.src.decks.id(head) + self._did(idInSrc) # create in local newid = self.dst.decks.id(name) # pull conf over