CrowdAnki icon indicating copy to clipboard operation
CrowdAnki copied to clipboard

enhancement: Preventing overwriting of existing cards from import (in-built merge calling)

Open newageoflight opened this issue 4 years ago • 5 comments

An enhancement I'd like to see in CrowdAnki is the ability to prevent the importer from overwriting existing cards on import.

When collaborating with others I find that I will often edit cards for people as new changes are being pushed, and importing the newest commits (which don't have my changes in them) will destroy all the edits I've made. In the absence of merging, a simple fix for this would just be to have the ability to suppress overwriting of existing cards. This may not necessarily be the standard behaviour of other imports but I think it's very useful to have in a collaborative context.

I'm aware this can be (sort of) already be solved using git diff. And if my impression is correct I think you guys are already working on merging stuff; I think that having a merge dialogue pop up in Anki (similar to how Unison will call your preferred merge program) would be much more convenient (and would likely present a far lower entry barrier for the non-tech people using this add-on!).

newageoflight avatar Jan 13 '21 07:01 newageoflight

Agreed, this would be a useful toggle in the Import menu. Though you should be able to do this, in part, with Personal Fields 👍 if you only made changes on some specific fields then you can toggle that as "Personal" and keep your own values while importing the rest. I get it would be good to do on a card by card basis (perhaps by tag?), but that's the best CA can currently do.

Good idea 🚀

ohare93 avatar Jan 13 '21 12:01 ohare93

By tag or by deck preferably - I'd rather not have to specify it by type as CA is currently offering. The way my team's workflow works at the moment is basically that I can accept changes in some (sub)decks but not in others.

Though this might just come down to me being insufficiently informed about the addon's usage as well, so just for the record: if I mark all the fields for a specific card type as "Personal Fields", will it essentially skip over all the cards in the JSON that already exist in my collection, thereby only adding the new ones?

newageoflight avatar Jan 13 '21 13:01 newageoflight

Though this might just come down to me being insufficiently informed about the addon's usage as well, so just for the record: if I mark all the fields for a specific card type as "Personal Fields", will it essentially skip over all the cards in the JSON that already exist in my collection, thereby only adding the new ones?

Yes! 👍 There are 3 states for personal fields:

New cards: Always added Existing card with filled in existing field: never added Existing card with blank field: Added

By tag or by deck preferably - I'd rather not have to specify it by type as CA is currently offering. The way my team's workflow works at the moment is basically that I can accept changes in some (sub)decks but not in others.

Personal tag/deck would be quite easy to implement, I believe 👍 Will add it to the backlog 😁

ohare93 avatar Jan 13 '21 14:01 ohare93

Thanks heaps for that! And just to be sure, outside of using git diff or other similar external merging tools, am I right to guess that CrowdAnki doesn't curently have any existing merge capabilities (like the stuff I am proposing) in-built somewhere that I'm missing? i.e. for the existing card with filled in existing field case, I might want to merge changes from another contributor while I am still working on the deck without having to export to a new commit.

newageoflight avatar Jan 14 '21 01:01 newageoflight

You are correct, no such functionality currently exists. Though it would be sweet!

ohare93 avatar Jan 14 '21 09:01 ohare93