c-okelly / anki-remote-decks

Addon for Anki - Creating remote decks in Google Docs
https://ankiweb.net/shared/info/911568091
MIT License
71 stars 15 forks source link

Changes on Doc doesn't reflect on deck after syncing #84

Open trevonio opened 3 years ago

trevonio commented 3 years ago

Hi,

I have a deck with 473 cards. I edited the doc to 1) add new cards and 2) fix some typos and add indentations that I was missing to split two questions that were showing in the same screen so it became two questions as originally intended.

Then I synced again my desktop anki to download the changes. I can see the new cards added but I don't see the edits on old cards. Is there any process that I'm missing?

And related to my first question, If a question is modified Anki "knows" that it is the same question as before and keeps the schedule for asking or is it resetting the schedule as it was a new card?

Thanks!

c-okelly commented 3 years ago

Hey,

So your edits should come through. If you make and edit to a card two different would things would happen:

  1. If you edit the Answer of a card then the card should keep it's existing history and be updated
  2. If you edit the Question section of a card then it is considered to be deleted and re-added. In this case the history of the card is lost and a new card is created. Unfortunately this is a fundamental limitation in the way in which cards are mapped from sheets and then stored in Anki. I believe at some point in 2.1.x version there was a new way in which cards were uniquely identified but this is not currently supported.

Is there any specific edits you are not seeing or possibly could you share the deck even privately and I can have a look!

trevonio commented 3 years ago

Hi! Thanks for the answer.

So if I understood the card is mapped by the words used in the question and the order which appears in the doc is not important. Is that right?

Sure, please take a look to my deck: https://docs.google.com/document/d/1jkOVZBZTH6ruhzbAntlqGWDj6rJgsNY56QMRqiCV7Yo/edit?usp=sharing

If you need to be admin let me know and I will send it privately.

Thanks!

trevonio commented 3 years ago

I'm adding some extra details about the info that is not updating in my deck

I made a capture of one of the changes that I cannot see reflected after syncing.

https://imgur.com/a/GUNHF8g

The first image is after the change and the second before. So as you can see, there was a mistake where I forgot to write a bullet point and two questions were showing as one. Anyway I think this problem is not affecting just this kind of edit as I've seen other minor edits not reflected in my deck.

Please let me know if I can provide any other info.

Regards,

Carlos

trevonio commented 3 years ago

I think I found one possible reason why this happens.

After creating for the first time the deck in my anki at some point I modified the title of the google doc and the Deck as well. From that moment on I started having problems with syncing. Today I edited both titles to match the original ones and it all seems to work fine now.

I thought the only thing that mattered was the url of the google doc since it is the only data the addon requires but it seems to me that the different titles (google doc and deck) play some role in the process.

Regards,

Carlos

c-okelly commented 3 years ago

Changing the deck name would def create an issue of some kind. The add-on can't really handle changes to the name of the deck. If you had card in the old deck there is a good chance any edits to them would be ignored.

The add-on would try and remove the card from a deck where it does not exist and then would not be able to add it to a new deck as there would be a clash related to the "question" section of the card already existing.

I unfortunately won't get any time this weekend to look at it but will have a proper look at it next week!

Thanks for sharing the deck anyway I'm sure I won't need any elevated privileges

trevonio commented 3 years ago

I'm still having some issues updating decks with other decks that haven't had any name changes so I'm guessing that is not the reason.

Thanks for your help again.