Topic: AutoMod

I really hate writing the mod readme files. I have no problem hacking up the punbb code, but when it comes time to create the mod file, it just feels antagonizing. This is often why little mods I create never see the light of day. In an effort to combat my laziness, I've come up with a little tool that helps. It's not perfect, and doesn't do everything, but hopefully with time the kinks can be worked out and it can become more robust.

So how does it work? First, you have to setup two punbb directories: a virgin installation with unedited files and a second with your mod you've developed installed. After you're content with your mod working in the second directory, you throw things off to this script. In short, it runs a recursive diff on the two directories and discovers the changes. Where it can, it will automatically handle things, or it might have to prompt you for a few things. After it's finished you should have a dummy readme file with the bulk of the work done. Some minor things might be wrong or off, but if you let me know what errors occurred, I can try to make the script better.

Now for the caveats... You have to be running *nix to use it (Mac OS X, BSD, Linux, etc). It depends on the Ruby and the diff command line tool. Error checking is nearly non-existant. If you give it bad input or anything else, don't be surprised if it explodes. This is my first little project in Ruby, so don't harass me too badly if the code is horrible, I'm learning. And, um, other stuff. Just ye be warned, this is an early version that seems to mostly work for me. I'm tired of looking at it, so I'm releasing it.

Grab it here: AutoMod
How to use: Setup the two punbb directories, one clean, one with the mod you want to create the readme for. Then from the command line:

ruby automod.rb clean_directory modified_directory output_file

I just remembered that as of right now, it will also wildly overwrite anything existing in the output file you hand it, so ye be warned.

Hard work may not kill you, but why take chances?

Re: AutoMod

Very nice, just 2 issues for me smile

I had to change the diff command from -ru5 to -rU5 and it isn't telling me any filenames, maybe I am using a different version of diff to you.

diff (GNU diffutils) 2.8.1
ruby 1.8.2 (2004-12-25) [i386-linux]


Re: AutoMod

Ah, thanks, both of your issues should now be fixed.

Hard work may not kill you, but why take chances?

Re: AutoMod

Perfect smile

Re: AutoMod

Very, very cool!

"Programming is like sex: one mistake and you have to support it for the rest of your life."