- instead of maintaining a list of model versions on the model which could get
lost in a sync, we simply increment mid by one until we find a compatible
schema or empty slot
- same approach for guids, so that reimports of divergent material won't cause
extra duplicates
- base the 2.0 model id on the 1.2 one so we don't get new models each time we
reimport the file
- when determining if we can reuse an existing note, it must have the same
model id, and the model must have the same schema
- make sure we check templates when determining schema
- if schema has diverged, note needs new guid
When a user has learning steps that extend past the daily cutoff, we end up
counting them all instead of only the ones that would be done today. In order
to avoid this without expensive calculations or db schema changes, we
calculate the number of steps until the daily cutoff and pack it into the left
column, as totalLeft + leftToday*1000.
In preparation for cramming:
- add odid for storing old deck on a per-card basis
- rename edue to odue
- at the moment note.did still exists, but in the future we may ignore it and
use model.did instead
While writing the documentation I realized that the default templates were
somewhat overwhelming. So I've moved the default settings into the card css,
and moved the css into a separate attribute which gets combined with the
question and answer templates.
Also:
- Detect cloze references directly rather than the conditional wrapper
- Add the cloze css to the template
Because JSON doesn't support 64 bit numbers, we need to either convert the 64
bit numbers to a string during transport, or store the ids as a string. At
base 91 a 64 bit number only takes an extra two bytes, and it means we can
dump DB results directly into JSON without having to apply any transformation.