MH’s dev efforts

February 10, 2008

Sphinx – official Python documentation tool

Filed under: Python, programming — Tags: , , , , — mhordecki @ 1:45 pm

EDIT: Sphinx’s gone public: http://sphinx.pocoo.org/

While searching for an ideal documentation tool for build.py, i’ve checked pydoc, epydoc and many many more. Two days ago, I’ve landed on Python development version documentation site (http://docs.python.org/dev). Engine has been totally reworked (besides, new look n’ feel is simply beautiful). Now, it sits on Sphinx, which is boosted reStructuredText engine with syntax highlighting, Table of Contents generation and a bunch of another useful gadgets.

I saw it nearly perfect for my purposes, as I don’t like docstrings and I’ve had some good experiences with text markup syntax (Markdown, particularly). The only problem is, Sphinx isn’t available as a standalone package – it’s bundled with main Python branch. Hence, there’s a solution how to incorporate Sphinx into your projects.

(more…)

February 7, 2008

Scaffolding module for Kohana PHP

Filed under: Kohana, programming — Tags: , , , , , — mhordecki @ 9:48 am

Edit: New version – check http://mhordecki.wordpress.com/2008/03/22/scaffolding-module-v2/

At the moment, build.py is undergoing some serious refactoring. In a meanwhile, I was (and I still am) engaged in small web application project. First started off with Django to code things quickly. Despite it’s beauty, running python scripts on Dreamhost is pain in the ass.

Therefore I switched to PHP. For a long time my beloved framework was CodeIgniter. And, guess what?, it got forked by community. The fork is called Kohana PHP. It benefits from PHP5 power and, comparing to CI, it’s completely community-driven.

It’s fast and tiny, almost perfect for my goals. I don’t want to learn big ones like Symphony or cakePHP. Kohana’s got as fast learning curve as Django. However, it’s stil new piece of software, it lacks then a few useful things. My first impression was: where’s that damn admin panel? Everyone who’s working with Django knows what I’m saying. Django’s got special admin module, which generates CRUD interface for every Model in an application. It’s simply blessing, cause I suppose no one likes doing this by himself.

There’s no such a feature in Kohana, so I decided to write it by myself. My Scaffolding Module uses Kohana extendability, reads metadata from database and loads every Model in existence under CRUD panel. It’s also easy to incorporate CRUD for single Models in your own admin panels (mere one-liner to type)

Scaffolding Module is only a draft of real software. It’s got basic functionality, basic manual covering it’s features, but it’s documented badly, probably got many bugs and so on. I will update it if I need additional features for my project. Nevertheless, I will be grateful to all usage feedbacks, feature requests and so on.

Installation: Unpack it straight into modules/ dir in your Kohana application.

Because of WordPress.com restrictions, I can’t upload it here. There are two ways to get it:

Blog at WordPress.com.