mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
handle cloned note types in mnemo import
This commit is contained in:
parent
ce99114dc3
commit
a379e47ca5
1 changed files with 8 additions and 7 deletions
|
@ -43,11 +43,12 @@ select _fact_id, fact_view_id, tags, next_rep, last_rep, easiness,
|
||||||
acq_reps+ret_reps, lapses from cards"""):
|
acq_reps+ret_reps, lapses from cards"""):
|
||||||
# categorize note
|
# categorize note
|
||||||
note = notes[row[0]]
|
note = notes[row[0]]
|
||||||
if row[1] == "1.1":
|
if row[1].endswith(".1"):
|
||||||
|
if row[1].startswith("1.") or row[1].startswith("1::"):
|
||||||
front.append(note)
|
front.append(note)
|
||||||
elif row[1] == "2.1":
|
elif row[1].startswith("2.") or row[1].startswith("2::"):
|
||||||
frontback.append(note)
|
frontback.append(note)
|
||||||
elif row[1] == "3.1":
|
elif row[1].startswith("3.") or row[1].startswith("3::"):
|
||||||
vocabulary.append(note)
|
vocabulary.append(note)
|
||||||
# merge tags into note
|
# merge tags into note
|
||||||
tags = row[2].replace(", ", "\x1f").replace(" ", "_")
|
tags = row[2].replace(", ", "\x1f").replace(" ", "_")
|
||||||
|
@ -71,7 +72,7 @@ acq_reps+ret_reps, lapses from cards"""):
|
||||||
rem = int((next - time.time())/86400)
|
rem = int((next - time.time())/86400)
|
||||||
c.due = self.col.sched.today+rem
|
c.due = self.col.sched.today+rem
|
||||||
# get ord
|
# get ord
|
||||||
m = re.match("\d+\.(\d+)", row[1])
|
m = re.search(".(\d+)$", row[1])
|
||||||
ord = int(m.group(1))-1
|
ord = int(m.group(1))-1
|
||||||
if 'cards' not in note:
|
if 'cards' not in note:
|
||||||
note['cards'] = {}
|
note['cards'] = {}
|
||||||
|
|
Loading…
Reference in a new issue