Arthur-Milchior / anki-copy-note

An add-on to copy anki's note
GNU General Public License v3.0
23 stars 9 forks source link

copy log = review history? #21

Closed galantra closed 3 years ago

galantra commented 4 years ago

Comprehension question: When the option "copy log" = true, is the add-on expected to copy the review history? For example, this:

2020-09-20 @ 10:28 Review 3 ⁨3.9⁩ years 2024-07-31 500% ⁨16.73⁩ seconds 2019-12-15 @ 07:29 Review 3 ⁨9.3⁩ months 2020-09-20 265% ⁨10.93⁩ seconds 2019-09-02 @ 09:00 Review 3 ⁨3.4⁩ months 2019-12-14 265% ⁨8.1⁩ seconds 2019-07-24 @ 10:27 Review 3 ⁨1.3⁩ months 2019-09-02 250% ⁨26.85⁩ seconds 2019-07-07 @ 21:06 Review 3 ⁨17⁩ days 2019-07-24 250% ⁨1⁩ minute 2019-06-28 @ 20:08 Review 3 ⁨8⁩ days 2019-07-06 250% ⁨12.31⁩ seconds 2019-06-23 @ 21:43 Review 3 ⁨2⁩ days 2019-06-25 250% ⁨4.77⁩ seconds 2019-06-22 @ 22:35 Learn 3 ⁨1⁩ day 2019-06-23 250% ⁨11.41⁩ seconds 2019-06-22 @ 21:29 Learn 3 ⁨10⁩ minutes na 250% ⁨9.96⁩ seconds 2019-05-10 @ 23:09 Review 3 ⁨23⁩ days 2019-06-02 130% ⁨3.91⁩ seconds 2019-04-23 @ 21:09 Review 3 ⁨16⁩ days 2019-05-09 130% ⁨9.7⁩ seconds 2019-04-11 @ 19:08 Review 3 ⁨12⁩ days 2019-04-23 130% ⁨7.53⁩ seconds 2019-04-03 @ 20:36 Review 3 ⁨8⁩ days 2019-04-11 130% ⁨12.51⁩ seconds 2019-03-26 @ 19:47 Review 3 ⁨6⁩ days 2019-04-01 130% ⁨31.18⁩ seconds 2019-03-23 @ 20:06 Relearn 3 ⁨3⁩ days 2019-03-26 130% ⁨1⁩ minute 2019-03-23 @ 19:54 Review 1 ⁨10⁩ minutes na 130% ⁨1.3⁩ seconds 2019-02-13 @ 19:00 Review 3 ⁨1.2⁩ months 2019-03-22 130% ⁨18.88⁩ seconds 2019-01-15 @ 20:50 Review 2 ⁨28⁩ days 2019-02-12 130% ⁨22.49⁩ seconds 2018-12-23 @ 16:38 Review 3 ⁨23⁩ days 2019-01-15 130% ⁨8.75⁩ seconds 2018-12-06 @ 11:30 Review 3 ⁨17⁩ days 2018-12-23 130% ⁨9.96⁩ seconds 2018-11-20 @ 15:03 Review 3 ⁨16⁩ days 2018-12-06 130% ⁨5.96⁩ seconds 2018-11-09 @ 14:26 Review 3 ⁨11⁩ days 2018-11-20 130% ⁨16.68⁩ seconds 2018-11-01 @ 13:47 Review 3 ⁨8⁩ days 2018-11-09 130% ⁨7.28⁩ seconds 2018-10-25 @ 13:19 Review 3 ⁨7⁩ days 2018-11-01 130% ⁨10.35⁩ seconds 2018-10-19 @ 10:28 Review 3 ⁨5⁩ days 2018-10-24 130% ⁨27.31⁩ seconds 2018-10-16 @ 14:41 Review 3 ⁨3⁩ days 2018-10-19 130% ⁨17.36⁩ seconds 2018-10-15 @ 12:26 Relearn 3 ⁨1⁩ day 2018-10-16 130% ⁨10.97⁩ seconds 2018-10-15 @ 12:13 Review 1 ⁨10⁩ minutes na 130% ⁨12.43⁩ seconds 2018-10-11 @ 12:10 Review 3 ⁨4⁩ days 2018-10-15 130% ⁨9.08⁩ seconds 2018-10-09 @ 19:07 Relearn 3 ⁨2⁩ days 2018-10-11 130% ⁨2.73⁩ seconds 2018-10-09 @ 18:52 Review 1 ⁨10⁩ minutes na 130% ⁨34.89⁩ seconds 2018-09-07 @ 16:31 Review 3 ⁨28⁩ days 2018-10-05 150% ⁨24.77⁩ seconds 2018-08-21 @ 23:39 Review 2 ⁨17⁩ days 2018-09-07 150% ⁨12.62⁩ seconds 2018-08-07 @ 14:00 Review 3 ⁨14⁩ days 2018-08-21 165% ⁨29.94⁩ seconds 2018-07-28 @ 22:48 Review 2 ⁨10⁩ days 2018-08-07 165% ⁨24.98⁩ seconds 2018-07-16 @ 17:06 Review 3 ⁨6⁩ days 2018-07-22 180% ⁨6.72⁩ seconds 2018-07-12 @ 16:45 Review 3 ⁨4⁩ days 2018-07-16 180% ⁨12.57⁩ seconds 2018-07-11 @ 14:01 Relearn 3 ⁨1⁩ day 2018-07-12 180% ⁨3.54⁩ seconds 2018-07-11 @ 13:52 Review 1 ⁨10⁩ minutes na 180% ⁨22.26⁩ seconds 2018-06-29 @ 07:31 Review 3 ⁨12⁩ days 2018-07-11 200% ⁨1⁩ minute 2018-06-23 @ 10:32 Review 3 ⁨6⁩ days 2018-06-29 200% ⁨4.66⁩ seconds 2018-06-19 @ 21:09 Review 2 ⁨4⁩ days 2018-06-23 200% ⁨1⁩ minute 2018-06-17 @ 10:53 Review 3 ⁨2⁩ days 2018-06-19 215% ⁨14.35⁩ seconds 2018-06-16 @ 08:23 Relearn 3 ⁨1⁩ day 2018-06-17 215% ⁨10.01⁩ seconds 2018-06-16 @ 08:13 Review 1 ⁨10⁩ minutes na 215% ⁨1⁩ minute 2018-06-13 @ 08:30 Review 2 ⁨3⁩ days 2018-06-16 235% ⁨12.07⁩ seconds 2018-06-04 @ 11:57 Learn 3 ⁨1⁩ day 2018-06-05 250% ⁨9.33⁩ seconds 2018-06-04 @ 11:34 Learn 3 ⁨10⁩ minutes na ⁨9.84⁩ seconds 2018-06-04 @ 11:33 Learn 1 ⁨1⁩ minute na ⁨8.52⁩ seconds 2018-06-04 @ 11:21 Learn 3 ⁨10⁩ minutes na ⁨7.81⁩ seconds

Arthur-Milchior commented 4 years ago

Yeah. Sorry if it.s it clear. It's called log internally and I never gave it a second thought

galantra commented 4 years ago

Thank you! It was not too unclear.

The reason why it appeared strange to me is that my review logs were never copied, even though the option was set to true. Maybe it is because I'm on Anki 2.1.22. I wondered if I had understood "Copy notes" wrongly, and that's why I opened the issue here.

Anyway, the whole thing has never bothered me too much. I remembered it when I came across the add-on Transfer scheduling data from one card to another. With it I'm now able to transfer the review log.
That's quite cool because I began using Auto Ease Factor some time ago, which uses the review log to set the ease.

Arthur-Milchior commented 3 years ago

Please reopen is needed, I think it's not the case

ventoteso commented 3 years ago

The issue still occurs in version 2.1.44. It would be useful to have this feature. The other add-on referred by galantra does not copy the review history, but transfer it (it is removed from the original card). I am not familiar with this site... Can anyone reopen this issue or should I open a new one?

galantra commented 3 years ago

The other add-on referred by galantra does not copy the review history, but transfer it (it is removed from the original card).

Are you sure? Have you tried it? Or did you infer that from its name?

ventoteso commented 3 years ago

I have used it and it does transfer the data as the name suggests. The review history is removed from the original card. At least, it is what happens in my versions of anki (2.1.44) and add-on (installed yesterday).

ijgnd commented 3 years ago

The review history (log) is not copied. It's also not moved - according to my test and my understanding of the source code.

If you change one line in the source code of the add-on the log should be copied, see https://github.com/ijgnd/anki-copy-note-1/commit/923530798c47a593c15c73fa7a9842773e574bf1

galantra commented 3 years ago

I have used it and it does transfer the data as the name suggests. The review history is removed from the original card. At least, it is what happens in my versions of anki (2.1.44) and add-on (installed yesterday).

Sorry for my incredulity. I guess I never checked the old card, because I never needed it. It works how you described even in the demonstration video on ankiweb.

If you change one line in the source code of the add-on the log should be copied, see ijgnd@9235307

Thank you! This really copies the log.

In my Anki, the add-on now creates a note with duplicate cards. E.g. two items for each cloze. Both have the card type "Cloze X" where X is the cloze's number. One of them is a complete copy, the other is a new card. This is solved by checking the database – it deleted the "new" card(s).

ijgnd commented 3 years ago

@galantra: thanks for letting me know. I don't have this problem of duplicated cards that only get cleaned up with a database check. But I didn't really test your setup. I only tested this change with my other changes to the add-on I made to make it work with .45+ in Anki 2.1.47. My new code is at https://github.com/ijgnd/anki-copy-note-1 .

General warning: When it comes to database manipulations you should be careful. This new code is not well tested and should not be used with a regular collection right now. Someone needs to test it and try out if sync works with a throw away collection.

If you are interested in helping with this any reports at https://github.com/ijgnd/anki-copy-note-1/issues/2 are very welcome. I've already opened a pull request so that Arthur sees my ideas but it would be better if a third party could tell if my ideas work or not.

I suggest that we stop discussing my changes in this thread to avoid confusion.