Example #1
0
    def read_template(self, filename):
        if filename.startswith('/'):
            path = filename
        else:
            path = self.template_abspath

        return slurp(path)
Example #2
0
    def read_template(self, filename):
        if filename.startswith('/'):
            path = filename
        else:
            path = join(TEMPLATES, '{}.{}'.format(filename, DEFAULT_TEMPLATE_EXT))

        return slurp(path)
Example #3
0
    def read_template(self, filename):
        if filename.startswith('/'):
            path = filename
        else:
            path = join(TEMPLATES, '{}.{}'.format(filename,
                                                  DEFAULT_TEMPLATE_EXT))

        return slurp(path)
Example #4
0
 def corpus_loadfile(self):
     # TODO stream this, don't slurp it.
     text = slurp(self.args.path)
     return process_text(text, self.args.path, self.db)
Example #5
0
 def corpus_loadfile(self):
     # TODO stream this, don't slurp it.
     text = slurp(self.args.path)
     return process_text(text, self.args.path, self.db)