How to use the aqt.mw.addonManager.getConfig function in aqt

To help you get started, we’ve selected a few aqt examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github kuklinistvan / docker-anki-sync-server / Addon for AnkiDesktop / SyncRedirector / __init__.py View on Github external
from aqt import mw
from .SyncRedirector import SyncRedirector

config = mw.addonManager.getConfig(__name__)

sync_redirector = SyncRedirector(config["syncUrl"], config["msyncUrl"])

SyncRedirector.print_introduction()
sync_redirector.print_config()
SyncRedirector.print_restart_warning()

sync_redirector.reconfigure_anki_syncing()
github ayuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuuu / pangu.anki / pangu_anki / config.py View on Github external
import locale

from aqt import mw
from aqt.utils import showInfo

__all__ = ["get_auto_space_flag", "get_auto_space_name", "get_plugin_menu_name",
           "get_space_name", "get_auto_space_shortcut", "get_space_shortcut",
           "set_auto_space", "mw"]

config = mw.addonManager.getConfig(__name__)
lang = mw.pm.meta.get("defaultLang", "en")


def get_plugin_name():
    plugin_name = config["plugin_name"]
    return plugin_name


def get_plugin_menu():
    plugin_menu = config["plugin_menu"]
    return plugin_menu


def get_plugin_menu_name():
    plugin_menu = get_plugin_menu()
    plugin_menu_name = plugin_menu["name"]
github ssricardo / anki-plugins / words-shuffler / src / controller.py View on Github external
def _ankiConfigRead(key):
    return mw.addonManager.getConfig(__name__)[key]