add the ability to skip cards for shared decks

This commit is contained in:
Damien Elmes 2011-10-22 00:05:09 +09:00
parent 4539ca2b73
commit 8bb26aaf74

View file

@ -21,6 +21,7 @@ class Anki2Importer(Importer):
needMapper = False needMapper = False
groupPrefix = None groupPrefix = None
needCards = True
def run(self, media=None): def run(self, media=None):
self.dst = self.deck self.dst = self.deck
@ -141,6 +142,8 @@ class Anki2Importer(Importer):
###################################################################### ######################################################################
def _importCards(self): def _importCards(self):
if not self.needCards:
return
# build map of (guid, ord) -> cid # build map of (guid, ord) -> cid
self._cards = {} self._cards = {}
for guid, ord, cid in self.dst.db.execute( for guid, ord, cid in self.dst.db.execute(