enable v2 apkg export
This commit is contained in:
parent
1afac2492b
commit
b9280ca31e
@ -26,7 +26,7 @@ class AnkiPackageImporter(Anki2Importer):
|
||||
suffix = ".anki2"
|
||||
|
||||
col = z.read("collection" + suffix)
|
||||
colpath = tmpfile(suffix=suffix)
|
||||
colpath = tmpfile(suffix=".anki2")
|
||||
with open(colpath, "wb") as f:
|
||||
f.write(col)
|
||||
self.file = colpath
|
||||
|
@ -11,7 +11,7 @@ from anki import hooks
|
||||
from anki.exporting import exporters
|
||||
from anki.lang import _, ngettext
|
||||
from aqt.qt import *
|
||||
from aqt.utils import checkInvalidFilename, getSaveFile, showInfo, showWarning, tooltip
|
||||
from aqt.utils import checkInvalidFilename, getSaveFile, showWarning, tooltip
|
||||
|
||||
|
||||
class ExportDialog(QDialog):
|
||||
@ -104,17 +104,6 @@ class ExportDialog(QDialog):
|
||||
deck_name = self.decks[self.frm.deck.currentIndex()]
|
||||
deck_name = re.sub('[\\\\/?<>:*|"^]', "_", deck_name)
|
||||
|
||||
if (
|
||||
not self.isVerbatim
|
||||
and self.isApkg
|
||||
and self.exporter.includeSched
|
||||
and self.col.schedVer() == 2
|
||||
):
|
||||
showInfo(
|
||||
"Please switch to the regular scheduler before exporting a single deck .apkg with scheduling."
|
||||
)
|
||||
return
|
||||
|
||||
filename = "{0}{1}".format(deck_name, self.exporter.ext)
|
||||
while 1:
|
||||
file = getSaveFile(
|
||||
|
Loading…
Reference in New Issue
Block a user