Exemple #1
0
    def register_markdown(self, markdown_filepath):
        markdown_filepath = pkg_resources.resource_filename(
            self._plugin.package, markdown_filepath)

        callable = MethodCallable.from_markdown(markdown_filepath,
                                                self._package)

        with open(markdown_filepath) as fh:
            metadata, source = frontmatter.parse(fh.read())

        self._register_callable(callable, metadata['name'],
                                metadata['description'], source)
Exemple #2
0
    def register_markdown(self, markdown_filepath):
        markdown_filepath = pkg_resources.resource_filename(
            self._plugin.package, markdown_filepath)

        callable = MethodCallable.from_markdown(markdown_filepath,
                                                self._package)

        with open(markdown_filepath) as fh:
            metadata, source = frontmatter.parse(fh.read())

        self._register_callable(callable, metadata['name'],
                                metadata['description'], source)