+ These "core" plugins provide essential administrative commands
+ (playlist handling, etc.).
+ """
+ pass
+
+
+# Plugin utility functions
+
+def argument_to_setting(section_name, argument):
+ """Convert an :class:`~hooke.command.Argument` to a
+ `~hooke.conf.Setting`.
+
+ This is useful if, for example, you want to define arguments with
+ configurable default values.
+
+ Conversion is lossy transition, because
+ :class:`~hooke.command.Argument`\s store more information than
+ `~hooke.conf.Setting`\s.
+ """
+ return Setting(section_name, option=argument.name, value=argument.default,
+ type=argument.type, count=argument.count,
+ help=argument._help)
+
+
+# Construct plugin dependency graph and load plugin instances.
+
+PLUGIN_GRAPH = construct_graph(
+ this_modname=__name__,
+ submodnames=[name for name,include in PLUGIN_MODULES] + BUILTIN_MODULES,
+ class_selector=IsSubclass(Plugin, blacklist=[Plugin, Builtin]))
+"""Topologically sorted list of all possible :class:`Plugin`\s and
+:class:`Builtin`\s.