Completely syncrhonizing decks during import

Hello everyone,

I would like to update my Anki deck from a text file. Currently, the text file can only ever be used to complement the existing deck, adding notes that were not previously present. I want to completely synchronize the deck with the file, meaning that I want to delete any notes in the deck that are not present in the text file. I think the most straightforward way to offer this functionality would be a fourth option besides “Update”, “Preserve” and “Duplicate” in the “Existing notes” dropdown in the Import File dialogue.
Is there another, better option? Did anyone already discuss this idea? I looked here on the forum and also found this GitHub issue:

I’d be happy to try my hands at implementing that feature myself if someone could give me some directions. I feel comfortable with Rust, but I’ve never taken a look at the Anki code, and I feel like I’m using only a small portion of all the Anki features.

Thanks and all the best,
Simon

A feature that deletes content that’s not in a file you’re importing feels like a footgun, and I’m not sure about its inclusion into the program. If you frequently find yourself deleting material from your source of truth, one alternative you could use is to edit the material to add “delete me” or similar instead of removing it. You could then locate those cards in the browse screen and suspend them.

2 Likes

To maybe rephrase my use case a bit: When I delete cards from my web deck, I can synchronize these deletions with all my devices, albeit with an “are you sure” dialogue. The reverse can also be done, deleting cards locally and synchronizing that deletion to anki web. What I want to do is to point anki at some other source like a file or a shared deck and tell it to completely synchronize with that instead.
However, I see your point, and I accept if you do not want this functionality in anki. Thank you for the workaround, I hadn’t though of that. That will make my life somewhat easier.

2 Likes

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.