Archive for the ‘Python’ Category

RabbitEdit

Saturday, October 4th, 2008

RabbitEdit is a nifty tool that allows easier Rabbit development and saves you quite some time and effort.
Its purpose is to automatically do particular common things for you, like writing pieces of code, creating parent directories for your new source files, and add the newly created files (and directories) into the SVN repository.
It can be found in rabbit/etc/rabbitedit/ and its installation is as simple as:

# make install 

You can uninstall it similarly, running:

# make uninstall 

Its configuration file can be found at /etc/rabbitedit/rabbitedit.conf and follows the common configuration rules used by the most programs.
You can see how it works, by issuing:

$ rabbitedit --help

A simple example of its usage, could be the following:

$ rabbitedit --parents --svn libs/customer/settings.php

Let’s assume you are in the root directory of your rabbit project. By running the above, RabbitEdit creates libs/customer/ if it does not exist (this is indicated by the “–parents” option), adds that directory into the SVN repository (indicated by “–svn”) as well as libs/customer/settings.php, and if settings.php did not exist before, it creates it and writes a standard piece of code in it (having the information that the file is a lib, and is about the settings of customers). If the file existed before, it leaves it as it was. Then, it opens the file with the source code editor of your choice.

RabbitEdit is written in Python, and is designed with the hope it fastens up the development of Rabbit projects and gives developers the chance to avoid drudgery, and focus on really important things, like actually coding.