smoothbrain-ai / smoothbrain-anki

SmoothBrain is an Anki plugin that fetches Readwise highlights and makes flashcards using OpenAI GPT.
39 stars 6 forks source link

Use JsonSchema to parse config.json to give better error messages #26

Open alexbowe opened 1 year ago

alexbowe commented 1 year ago

This should probably apply whenever the config changes (before allowing the change)

abdnh commented 1 year ago

Anki provides that via a config.schema.json file. The config is validated when the user modifies the config from the config screen at least: https://github.com/ankitects/anki/blob/82caffecbcdabc52f07fe98a6d429ede96bf8eb1/qt/aqt/addons.py#L1604