First the solution:
Now the problem it solves:
I created a website with WordPress for a small business. My goal was for the non-technical managers of the business to be able to run the content side of the website themselves. Everything was working great until they decided that they wanted to put up some tables of data on the website. Now WordPress doesn’t have a table creation feature in its minimal WYSIWYG editor so we tried the following unsuccessful methods of getting a table into WordPress:
- First they started making the tables in Word and pasting them in, but it generated HTML with lots of styling cruft which created a lot of strange problems.
- Finally I considered having them use a desktop HTML editor such as NVU and copy its HTML into the WordPress window, but I went through the steps and even NVU wouldn’t quite make a plain vanilla table with no styling. And I’m not comfortable telling someone to go into NVU, select the HTML tab, copy from where it says table but not before, be sure to include the brackets… and so on. That’s just too much.
So at that point TableGen was born. Check out the results.
Now that they are pasting plain vanilla HTML tables onto the site, I can set up a stylesheet that can make the tables pretty.
It was created in pure Python in 3 hours. It should have been 1 hour but I forgot some HTML basics and a few Python CGI basics. It worked out to be about 200 LOC which did seem a bit wordy for such a simple concept in a high level langauge.
Please try it out and provide some feedback if you’d like. I’m willing to add a few more features such as width but if you want much more than that then this tool isn’t for you. It targets the Just-Give-Me-A-Frikin-Table market.