Browse Source

WIP Makes the plugins folder an modifiable if needed

plugins
Zykino 3 years ago
parent
commit
c1e6a6e62d
1 changed files with 6 additions and 4 deletions
  1. +6
    -4
      prismedia/core.py

+ 6
- 4
prismedia/core.py View File

@ -33,10 +33,9 @@ import logging
VERSION = "prismedia v1.0.0"
def loadPlugins():
def loadPlugins(basePluginsPath):
manager = PluginManagerSingleton.get()
manager.setPluginPlaces([os.path.dirname(os.path.abspath(__file__)) + "/plugins"])
print(manager.getPluginLocator().plugins_places)
manager.setPluginPlaces(basePluginsPath)
# Define the various categories corresponding to the different
# kinds of plugins you have defined
@ -51,6 +50,8 @@ def loadPlugins():
def listPlugins():
manager = PluginManagerSingleton.get()
print("The plugins are stored in the following folders:", manager.getPluginLocator().plugins_places)
print("Category: Interface")
for plugin in manager.getPluginsOfCategory("Interface"):
print(plugin.name)
@ -64,7 +65,8 @@ def listPlugins():
print(plugin.name)
def main():
manager = loadPlugins()
basePluginsPath = [os.path.dirname(os.path.abspath(__file__)) + "/plugins"]
manager = loadPlugins(basePluginsPath)
options = docopt(__doc__, version=VERSION)
print(options)

Loading…
Cancel
Save