My HQ at GitHub

P r o j e c t s

  • couchdb-wxpython : GUI cross-platform python python program which uses couchdb couchdb for content storage.
  • blogcdb : blog engine made with turbogears 2 turbogears which uses couchdb couchdb for content storage.
  • objectlistview-mirror : mirror of svn project with some modifications to make it work in Mac Os X.
  • scalaris-mirror : mirror of a key value storage engine made in Erlang.
  • batok.github.com : where the contents you are looking now are placed.

Some Snippets

couchdb-wxpython : from couchdbgui.py:

class Screenshot(object):
        def __init__(self, filename = "snap.png"):
                self.filename = filename
                try:
                        p = wx.GetDisplaySize()
                        self.p = p
                        bitmap = wx.EmptyBitmap( p.x, p.y)
                        dc = wx.ScreenDC()
                        memdc = wx.MemoryDC()
                        memdc.SelectObject(bitmap)
                        memdc.Blit(0,0, p.x, p.y, dc, 0,0)
                        memdc.SelectObject(wx.NullBitmap)
                        bitmap.SaveFile(filename, wx.BITMAP_TYPE_PNG )

                except:
                        self.filename = ""


class Post( schema.Document):
        author = schema.TextField()
        subject = schema.TextField()
        content = schema.TextField()
        tags = schema.ListField( schema.TextField() )
        comments = schema.ListField( schema.DictField(schema.Schema.build(
        comment_author = schema.TextField(),
        comment = schema.TextField(),
        comment_date = schema.DateTimeField()
        )))
        date = schema.DateTimeField()

class Design( schema.Document):
        by_author = schema.View("all", map_func_by_author)
        by_date = schema.View("all", map_func_by_date)
        all = schema.View("all", map_func_all)
        tags = schema.View("all", map_func_tags, reduce_func_tags)

Table Of Contents

Quick search

Enter search terms or a module, class or function name.