anki icon indicating copy to clipboard operation
anki copied to clipboard

Feature suggestion: avoid creating duplicated flash cards when sending to anki

Open songguoqiang opened this issue 5 years ago • 4 comments

In the current version (0.3.0), if I push the same markdown file twice to anki, duplicated cards are created in anki.

Can we automatically detect the duplicates (e.g. by comparing front side of cards)?

songguoqiang avatar Sep 12 '20 11:09 songguoqiang

The only time a duplicate happens is if you push the same card to different decks. It definitely shouldn’t be possible to create duplicates in the same deck. The API guards against this already.

I’ve tested this manually and never had duplicates.

jasonwilliams avatar Sep 12 '20 11:09 jasonwilliams

My anki version is 2.1.33

This is the markdown file I was testing with

TypeScript

TypeScript: Utility Type: Partial<Type>

Test

When I executed the command "Anki: Send to Deck" a few times, I got the duplicates in Anki, all under "notes" deck. Here is the screenshot

image

songguoqiang avatar Sep 14 '20 10:09 songguoqiang

Thanks I will take a look, it could be a possible regression

jasonwilliams avatar Sep 14 '20 11:09 jasonwilliams

@songguoqiang I've been able to reproduce this by using certain characters. It looks like the > character gets converted to &gt; and for some reason AnkiConnect or Anki cannot discern that it is unique. If you try the same without the < > it should work.

Im not sure why special characters break the duplicate check, i would need to raise it with AnkiConnect.

jasonwilliams avatar Sep 14 '20 18:09 jasonwilliams