Closed edzillion closed 9 months ago
I'm not too familiar with FSRS (a lack that I'd very much like to fix at some point!), but if I understand correctly* fsrsWeights
are part of the per-user scheduling information (each user should have their own, which is not saved in the JSON, but is kept in the Anki database.
* fsrsWeights
is something that is/can be recalculated based on your own review history (good/bad answers etc.)?
Sorry for the confusion!
If it makes things clearer, the JSON only contains information that is meant to be shared among many users (the contents of the notes, the styling/arrangement of the cards, tagging of notes, subdivision into sub-decks etc.).
Scheduling information always remains in the Anki database, since it shouldn't be shared among users (user A does not want user B's scheduling).
What #192 means is that if you re-import (via CrowdAnki) a deck that you already have in Anki, then your progress on existing cards should not be reset (i.e. your future scheduling should be as if it would have been had you not re-imported), only the contents of the cards should be updated (e.g. typo-fixes) and/or new cards added.
I hope this makes sense!
(Depending on what you're trying to achieve, you could probably tweak CrowdAnki to also export scheduling info, but it's not really a design goal here.)
Thanks for the quick and comprehensive reply :)
- fsrsWeights is something that is/can be recalculated based on your own review history (good/bad answers etc.)?
Yes. The calculation of weights is a manual step. If you have enough review history it can calculate them upfront, otherwise picking the default weights. Then you are advised to recalc them once a month. FAQ Q12
Sorry for the confusion!
Not at all! I see the disctinction, thanks for the explanation.
I went and had a look to see whether I could find the info in the DB, and using the browser in Anki I confirmed that the extra FSRS fields are added to the notes view (stability, difficulty etc.) but when I try to export the DB (whether a downloaded one like Ultimate Geography or one I have created myself) as an .apkg
, when I view the contents of the DB there is only one note and the flds column contains the message Please update to the latest Anki version, then import the .colpkg/.apkg file again.
Not sure what's happening there. I reinstalled anki and then disabled all plugins and tried again. Same thing :/
In any case, can you point to where in CrowdAnki I would have to tweak to include the weights (and the stability, difficulty parameters) in the output? I had a quick look at the codebase thinking if I searched for sqlite3 I might find where the db was being converted but I couldn't find anything much.
In any case, can you point to where in CrowdAnki I would have to tweak to include the weights (and the stability, difficulty parameters) in the output? I had a quick look at the codebase thinking if I searched for sqlite3 I might find where the db was being converted but I couldn't find anything much.
On a casual look, it probably wouldn't be that small a tweak (I initially thought it might just be a case of not excluding some fields — but this isn't one of the fields that we exclude; it's in a different table, so we don't need to). We (mostly?) don't directly read from the db, since it's arguably more fragile in terms of version compatibility.
You'd need to find the Anki python functions that read/write the fsrs-related properties (or just read/write from the db yourself, for that part) and probably make a serialisation wrapper like deck.py
or deck_config.py
.
(For instance, the deck-related info is via mw.col.decks
and its methods.)
It might (or not :)) be easier for you to write your own database-dumper from scratch.
when I view the contents of the DB there is only one note and the flds column contains the message Please update to the latest Anki version, then import the .colpkg/.apkg file again.
That's weird :(
https://github.com/Stvad/CrowdAnki/issues/192 seems to imply that the weights are saved but I do not see them in the JSON output and I presume that the field
fsrsWeights
are where they should be saved.I want to make a separate client that has it's own scheduler but I need the weights to calculate schedules.
Win 10 v 22H2 Anki desktop Version 23.12.1 (1a1d4d54) CrowdAnki v0.9.5