scistag.addons.addon_manager.AddonManager¶
- class AddonManager[source]¶
Bases:
objectManages the optional SciStag addons and their installation from the web.
Methods
Fills helper variables such as the all_addons list for easier enumeration
Returns the addon dictionary
Returns if an addon with given name is installed and it's data file healthy
Returns if an addon with given name is installed
Returns the addon paths for FileStag for all addons matching given filter_mask, e.g.
Returns a list of all addon packages and their respective unique identifier.
Returns a dictionary containing all groups (and their elements) :rtype:
Dict:return: The addon dictionary cleared from (future) features.Returns a list of all installed addon packages and their respective unique identifier.
Returns the local path of a feature
Installs given feature
Removes given addons, removes all associated files and unregisters in the shared archive registry.
Attributes
__annotations____dict____doc____module____weakref__list of weak references to the object (if defined)
Data access lock
The addon main dictionary
A sorted dictionary of all addons
- classmethod build_helper_data()[source]¶
Fills helper variables such as the all_addons list for easier enumeration
- Return type
- classmethod get_addon_healthy(feature_name)[source]¶
Returns if an addon with given name is installed and it’s data file healthy
- classmethod get_addon_installed(feature_name)[source]¶
Returns if an addon with given name is installed
- Parameters
feature_name – The addon’s name, see get_all_addons()
- Return type
- Returns
True if the addon exists.
- classmethod get_addons_paths(filter_mask)[source]¶
Returns the addon paths for FileStag for all addons matching given filter_mask, e.g. emoji.*
- classmethod get_all_addons()[source]¶
Returns a list of all addon packages and their respective unique identifier. This identifier can then be used by install_addon and remove_addon to install or remove a feature.
- Returns
A dictionary containing all installable addons
- classmethod get_groups()[source]¶
Returns a dictionary containing all groups (and their elements) :rtype:
Dict:return: The addon dictionary cleared from (future) features.A single element has the structure: ```javascript
- “groupName”: {
“elements”
}
- classmethod get_installed_addons()[source]¶
Returns a list of all installed addon packages and their respective unique identifier. This identifier can then be used by install_addon and remove_addon to install or remove a feature.
- Returns
A dictionary containing all installable addons
- classmethod get_local_path(feature_name)[source]¶
Returns the local path of a feature
- Parameters
feature_name – The feature’s name
- Returns
The feature’s path. Empty string if invalid
- classmethod install_addon(feature_name, verbose_if_installed=True)[source]¶
Installs given feature
- Parameters
feature_name – The feature’s key. As defined in
verbose_if_installed – Defines if no message shall be printed if the addon is already installed
- Return type
- Returns
- classmethod remove_addon(feature_name)[source]¶
Removes given addons, removes all associated files and unregisters in the shared archive registry.
- Parameters
feature_name – The feature’s key. As defined in
- Return type
- Returns
True if the addon existed and could successfully be removed
- access_lock = <unlocked _thread.RLock object owner=0 count=0>¶
Data access lock