Create an alternative to yaki using Repoze technologies.
- 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
-
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
$ 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