def GET(self, key): self._config = TesseraConfig(path.join(Tessera._tesserae, "config")) i = web.input(key=None) gt = GitTessera(self._config) tessera = gt.get(i.key) if not tessera: return "not found" render = web.template.render('%s/web' % path.dirname(path.realpath(__file__))) tessera.markdown = markdown.markdown(tessera.content) return render.detail(tessera)
def GET(self): self._config = TesseraConfig(path.join(Tessera._tesserae, "config")) gt = GitTessera(self._config) tesserae = gt.ls() return render.index(tesserae)
def __init__(self): git_directory = "." self.git = MyGit(git_directory) Tessera._tesserae = os.path.relpath( os.path.join(git_directory, ".tesserae")) self._config = TesseraConfig(os.path.join(Tessera._tesserae, "config"))