jasonwilliams / anki

Anki VSCode Plugin
MIT License
278 stars 32 forks source link

Update README.md - updateCards requires insertNewCardID #133

Closed mkraenz closed 2 months ago

mkraenz commented 2 months ago

Hi, thanks for the introduction of note updates. It was my pain point number 1 with the extension for a long time. So thank you and the contributors!

Changes

Background

When migrating to updating notes however, I ran into Error: ['cannot create note because it is a duplicate'].

Using the docs to set updateCards to true did not solve the issue. Only checking the gh issues and reading about the insertNewCardID flag in https://github.com/jasonwilliams/anki/issues/122 I noticed what's wrong.

So apparently anki.md.updateCards requires anki.md.insertNewCardID.

If this is a wrong interpretation of what went wrong, feel free to close this PR.

Note

This might be a migration issue. I installed the extension a long time ago. I am unaware of whether anki.md.insertNewCardID is set to true by defaults for new installs or not.

jasonwilliams commented 2 months ago

Hi @mkraenz

Thanks for raising this, and thank you for the contribution. It looks like we may need to eventually fold those options into one as that will be confusing.

Originally the plan was to have updateCards be one setting, then the update strategy be a different setting, but in the end we only had 1 update strategy (which is to add a noteID to the item). As we don't plan to have any other strategy for persistence we might be able to just remove the second option (anki.md.insertNewCardID) altogether.

I've raised an issue for this here: https://github.com/jasonwilliams/anki/issues/134