Double release

Today I’m releasing two of my projects one was sleeping on my hard drive for some time now. So I guess if this can be of some use for someone else, cause it was for me, so there it is…

The first is an asp code documenter, implemented has a NAnt task. It browses you asp pages and gather all XML comments (same format as .NET XML comments) and extract them to a XML file. I’ve also included a XSL file to format the document to a HTML page. So you could easily twiq this to generate the doc and post it to your web site, which is what I did for some asp project.

Here’s the binaries : ASPCommenter-1.0.0-bin.zip

And here’s the sources : ASPCommenter-1.0.0-src.zip

To compile run :

> nant build.debug

My other project is my first intro to python, it’s a code generator largely inspired by Ruby on Rails generators

generator.zip

To run it type in the base directory:

> python generate.py

This one should be even easier to twiq. To add a generator of your own, go to the base directory and type:

> python generate.py generator mygenerator

Then go to the directory /mygenerator that was created. The file mygenerator_generator.py is the main class that act has the generator, check other directories for sample usage. The directory templates contains all the templates used to generate the output. Here’s a sample generator to explain this a little:

class SampleGenerator(Generator):
def run(self, argv):
# Each time you define a new class variable,
# it will be accessible from the templates
# generated from here.
self.name = argv[0]

# This is pretty explicit…
self.mkdir(self.name)

# This parse a file while replacing all
# python template variables (starting
# with a $) with class variable (self.)
# and outputing to readme.txt in the
# directory previously created.
self.process(“readme.txt”, self.name)

Leave a comment

Filed under Misc

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s