Re: Problem: dublication of cards

195 views
Skip to first unread message

Tim

unread,
Feb 20, 2013, 5:21:33 PM2/20/13
to anki-a...@googlegroups.com, fbvh...@aol.de
It's very unlikely that the size of your deck is related to this problem. Did this problem only recently start happening after upgrading to AnkiDroid version 2?
If so, please tell us exactly how you went through the upgrade process, and if you don't mind sharing could you please zip your collection.anki2 file and post it here?

On Wednesday, February 20, 2013 10:44:36 PM UTC+9, fbvh...@aol.de wrote:
Hello,
I'm using the German version of Ankidroid for over a year now (updated it several times, too) to learn a foreign language, and never had any problems.
My desk is constantly growing, at the moment I have more than 6000 cards (forward and reverse;= 3000 facts). Now when using it, I notice that some cards are presented as new, but which I already learned months ago. When I controlled the list of cards, I saw that these cards have duplicated - instead of one forward and one reverse card I suddenly have two forward and two reverse cards. I deleted the duplicates, but next time there are again other cards that have duplicated.
What can I do now? Is my desk too big?
Thank you for any help
Max

Tim

unread,
Feb 28, 2013, 5:41:22 AM2/28/13
to anki-a...@googlegroups.com, fbvh...@aol.de, mra...@gmail.com
AnkiDroid doesn't currently have an add-on architecture yet, but Anki Desktop does (it's written in Python). 
I don't have time to write an add-on for you at the moment, it shouldn't be too hard though if you just want to delete one of the duplicates without caring too much about which one you delete.
I'd suggest thoroughly reading the link above and modifying testFunction() to remove all of the cards except for the first in case of duplicates. Just be sure to backup your collection before you start messing with it!

Good luck, and feel free to ask a few questions here if you get completely stumped!

On Thursday, February 28, 2013 12:39:08 PM UTC+9, mra...@gmail.com wrote:
Hi,

I posted in a related topic as well: (https://groups.google.com/forum/?fromgroups=#!searchin/anki-android/duplicate/anki-android/uJtInfX7_ZA/mxF8FG4gW_wJ).

I had the same problem with cards duplicating, although I didn't notice it at first and I've gone on the last month or so with everything duplicated. At this point I think it would be more work to go back and redo the last month of cards than to go through and delete every other card one by one in the card browser. At 60,000 cards, this would take 4-8 hours. Does anyone know of a quicker solution? Maybe an add-on? If you don't want to write the add-on, would you mind telling me what language add-ons are written in and maybe some sample code? I'm not sure it would take me less than 8 hours to figure it out but it would be less tedious anyway.

It won't let me attach my collection but here's a link: https://docs.google.com/file/d/0B2OEQ6kGTYhXRk9XWWVaelN5LVk/edit?usp=sharing. My eternal gratitude, in advance, to anyone who helps.

DK

Tim

unread,
Mar 4, 2013, 8:32:29 AM3/4/13
to anki-a...@googlegroups.com, fbvh...@aol.de, mra...@gmail.com
nice work! thanks for sharing

On Monday, March 4, 2013 2:20:39 PM UTC+9, mra...@gmail.com wrote:
Whew, took the better part of the day, but it works!

Thank you for your comments. They were helpful in writing my code. I ended up modifying an existing function to make a list of all duplicated note IDs, and then use another existing function to remove the corresponding notes. The add-on should be available for download here: https://ankiweb.net/shared/info/939384459?ok=1. It's called Remove Duplicates.
Reply all
Reply to author
Forward
0 new messages