Skip to content

Instantly share code, notes, and snippets.

@btbytes
Created April 9, 2009 15:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save btbytes/92521 to your computer and use it in GitHub Desktop.
Save btbytes/92521 to your computer and use it in GitHub Desktop.

Tabbycat

Create an alternative to yaki using Repoze technologies.

Features

  • All the features supported by Yaki
  • Explore the possibility of using available RFC2822 parsers. One possible advantage is having multiline/complex metadata than one supported right now.

Repoze already has a lot of the components required.

  • chameleon - templating
  • repoze.catalog - searching and tagging
  • repoze.folders - folders
  • repoze.xmlrpc - remote editing of files
  • Use mercurial for automatic file versioning
  • Use paste.reloader for watching file changes

Data flow

  • file watcher calls file parser

  • file parser reads the text files and generates the header and meta information. Populates the folder and catalog.

  • repoze.bfg has graph traversal, which is more appropriate than Routing for arbitrarily deep tree structures.

  • Allow editing of content through XML-RPC.

  • write back data to filesystem on save and call hg commit.

Serve static content through nginx.

$ virtualenv /Users/pradeep/tabbycat
$ cd tabbycat
$ bin/easy_install zc.buildout
$ bin/buildout init
$ wget http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py
$ vim .gitignore

add these lines to .gitignore

.installed.cfg
parts
develop-eggs
bin
eggs
downloads
lib
build
dist

$ bin/easy_install -i http://dist.repoze.org/lemonade/dev/simple repoze.bfg
$ bin/paster create -t bfg_starter

enter projectname. In this case, it was tabbycat.

Create a simple buildout script. I used the one from http://rhodesmill.org/brandon/buildout/

[config]
mypkgs = tabbycat

[buildout]
develop = .
parts = python scripts test

[python]
recipe = zc.recipe.egg
interpreter = python
eggs = ${config:mypkgs}

[scripts]
recipe = zc.recipe.egg:scripts
eggs = ${config:mypkgs}

[test]
recipe = zc.recipe.testrunner
eggs = ${config:mypkgs}

run the buildout script to install all the dependencies

$ bin/buildout

2009-04-18

$ mkdir -p tabbydev/src/tabbycat
$ cd tabbydev
$ cp ~/Docuemnts/BSD_LICENSE LICENSE
$ touch README
$ wget http://svn.zope.org/*checkout*/zc.buildout/trunk/bootstrap/bootstrap.py
$ cat - > buildout.cfg
[buildout]
parts =
^D
$ touch setup.py
$ touch src/shorturls/__init__.py

$ source ~/bfgdev/bin/activate
$ python bootstrap.py
$ ./bin/buildout
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment