+ """
+ First non-empty line of the docstring is used as description
+ Rest of the docstring at your convenience.
+
+ The plugin Name MUST be the same as the module (file name), case
+ insensitive: for instance plugin.py → Plugin
+ It eases plugins discovery and simplifies the code to handle them,
+ IMHO, it's a fair trade-off.
+ """
+
+ @classmethod
+ def info(cls):
+ """self documenting class method
+ """
+ doc = 'Undocumented plugin! Fill "{}" docstring'.format(cls.__name__)
+ if cls.__doc__:
+ doc = cls.__doc__.strip(' \n').splitlines()[0]
+ return {'name': cls.__name__,
+ 'doc': doc,
+ }
+