def GET(self, key):
     i = web.input(key=None)
     gt = GitTessera()
     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)
示例#2
0
 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)
示例#3
0
 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 cmd_show(self, args):
        if len(args) != 1:
            raise ArgumentError("git tessera show takes identifier as argument")

        gt = GitTessera(self._config)
        t = gt.get(args[0])
        if not t:
            return False

        short = t.summary()
        length = len(short)
        print "=" * length
        print short
        print "=" * length
        print t.content
        return True
示例#5
0
    def cmd_show(self, args):
        if len(args) != 1:
            raise ArgumentError(
                "git tessera show takes identifier as argument")

        gt = GitTessera(self._config)
        t = gt.get(args[0])
        if not t:
            return False

        short = t.summary()
        length = len(short)
        print "=" * length
        print short
        print "=" * length
        print t.content
        return True
示例#6
0
    def cmd_show(self, args):
        if len(args) != 1:
            stderr.write("git tessera show takes identifier as argument\n")
            return False

        gt = GitTessera()
        t = gt.get(args[0])
        if not t:
            return False

        short = t.summary()
        length = len(short)
        print "=" * length
        print short
        print "=" * length
        print t.content
        return True