def run(self): """run the plugin""" files = fshelpers.filelist(self.content_directory, self.extension) # for every file: read, create ContentObject, parse yaml, store for current in files: raw = fshelpers.read(self.content_directory, current) co = ContentObject() (co.meta, co.content) = self.parse_yaml(raw) prepare(co, self.site) self.site.content.append(co)
def __init__(self, path): self.path = fshelpers.ensure_separator(path) self.config = yaml.load(fshelpers.read(path, "config.yaml"))