1
0
Fork 0
mirror of synced 2024-06-16 14:11:08 -04:00
dotbot/dotbot/executor/meta.py
Chris Sivanich 18e84711ee Add task metadata
Metadata is supported in the config file on a per-task basis. It is to be put
in the 'meta' key's value json.

Currently 'title' and 'description' keys are supported. See the example below.

```
[
    {
        "meta" : {
            "title" : "This is the title",
            "description" : "This is a longer description, not shown with -Q"
        }
    }
]
```
2014-04-23 21:07:03 -05:00

17 lines
387 B
Python

from . import Executor
class Meta(Executor):
'''
Dummy handler for metadata support
'''
_directive = 'meta'
def can_handle(self, directive):
return directive == self._directive
def handle(self, directive, data):
if directive != self._directive:
raise ValueError('Header cannot handle directive %s' % directive)
return True