anki/designer
Damien Elmes 737a8d934e persistent add-on configuration
- add-ons can ship default config in a config.json file
- users can edit the config in the add-ons dialog, easily syntax-check
the json, and restore it to the defaults
- an optional config.md contains instructions to the user in markdown
format
- config will be preserved when add-on is updated, instead of being
overwritten as is the case when users are required to edit the source
files

A simple example: in config.json:

{"myvar": 5}

In your add-on's code:

from aqt import mw
config = mw.addonManager.getConfig(__name__)
print("var is", config['myvar'])

Add-ons that manage options in their own GUI can have that GUI
displayed when the config button is clicked:

mw.addonManager.setConfigAction(__name__, myOptionsFunc)
2017-08-28 20:51:43 +10:00
..
icons switch to svg images for better hidpi rendering 2017-08-15 13:54:58 +10:00
.gitignore merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
about.ui port majority of code to qt5.5+ 2016-05-31 18:51:40 +10:00
addcards.ui remove images and move away from qt resources 2017-08-11 20:59:43 +10:00
addfield.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
addmodel.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
addonconf.ui persistent add-on configuration 2017-08-28 20:51:43 +10:00
addons.ui persistent add-on configuration 2017-08-28 20:51:43 +10:00
browser.ui restore marking support 2017-08-16 20:30:29 +10:00
browserdisp.ui allow browser override font to be unset 2017-07-29 16:09:00 +10:00
browseropts.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
changemap.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
changemodel.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
clayout_top.ui tidy up card name list 2017-08-11 21:44:05 +10:00
customstudy.ui merge 'limit to tags' and 'cram' custom study optionts (#584) 2013-05-27 13:50:01 +09:00
dconf.ui remove images and move away from qt resources 2017-08-11 20:59:43 +10:00
debug.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
dyndconf.ui increase filtered deck size limit to 99999 2014-01-14 15:12:45 +09:00
editaddon.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
editcurrent.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
edithtml.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
exporting.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
fields.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
finddupes.ui port majority of code to qt5.5+ 2016-05-31 18:51:40 +10:00
findreplace.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
getaddons.ui tweaks to add-on downloading 2017-02-15 15:55:31 +10:00
icons.qrc switch to svg images for better hidpi rendering 2017-08-15 13:54:58 +10:00
importing.ui Changed location of import button (#1018). 2014-02-22 21:30:32 +11:00
main.ui new add-on handling 2017-08-26 15:14:20 +10:00
modelopts.ui turn latex svg into a note type option 2017-07-28 18:38:31 +10:00
models.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
preferences.ui revamp profile manager 2017-08-16 19:45:39 +10:00
preview.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
profiles.ui revamp profile manager 2017-08-16 19:45:39 +10:00
reposition.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
reschedule.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
setgroup.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
setlang.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
stats.ui port majority of code to qt5.5+ 2016-05-31 18:51:40 +10:00
studydeck.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
taglimit.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00
template.ui merged libanki and ankiqt into single distro 2012-12-21 16:51:59 +09:00