Help me create dozens of web pages automatically
March 3, 2011 8:45 AM   Subscribe

I need a simple way of creating dozens -- even hundreds -- of very simple HTML pages.

For work I have to create several several dozen product pages for our website. Because of various constraints with our current (and crappy) CMS, I am unable to run any server-side applications that might solve my problem, so whatever I do will have to be created on my desktop and uploaded to the site server.

The pages themselves are very simple. Each needs to be its own HTML file (that will later be pipped into the header and navigation frame through an HTML import in the crappy CMS). They each consist of a 250x250px image, a headline, a few optional short lines of description, and a few optional links. To create each page, I currently open my template, save it to the appropriate file name (e.g. "Product Name_top.htm"), input the page title, the image file name, the headline copy, the description copy, and the optional URLs (which are either links to the manufacturer web site, or a PDF of a spec sheet). All file names, titles, image file names, descriptions and links need to be unique for each and every page.

My templates are built and working well. It's just a very manual process for creating a new page for each product, of which I have hundreds. It seems that there should be an easy way for automating these processes once I have the copy, images and links. If there is not a reasonably-priced program available, I'd even be willing to attempt writing a few scripts or macros, if that will get the job done, although I've never done anything like that before. I'm envisioning something like a spreadsheet that can be fed into a converter that uses my simple template and spits out a unique page.

I'm tech savvy, but not skilled. I've taught myself HTML and CSS over the past two months, and while comfortable I'm still very much a novice. I have a reasonable array of tools, including Office 2011, Adobe CS3 with a copy of Dreamweaver CS 5, Text Wrangler and a few others, and a budget of $200 or so if I need to buy something. I'm running OSX 10.6 but have access to Windows machines.
posted by slogger to Computers & Internet (7 answers total) 1 user marked this as a favorite
 
Put all your data in an excel spreadsheet, then use MS Word Mail Merge (template with html, etc.) to create the documents. Save the output as TXT to avoid the Word "html". You used to be able merge to separate documents; don't remember if you can still do that. Otherwise, you have to figure out a way to save each document individually.
posted by elle.jeezy at 8:56 AM on March 3, 2011


Use a CMS on some test server and then use a webscraper to make plain html pages out of the CMS content.
posted by any portmanteau in a storm at 9:13 AM on March 3, 2011


Response by poster: Yeah elle.jeezy, I'm trying to Merge in Word, but it's giving me everything in one doc, not separate docs, like you mention. Getting that into separate docs is giving me issues without turning it into a huge cut+paste+save exercise.
posted by slogger at 9:16 AM on March 3, 2011


Best answer: Look! http://www.gmayor.com/individual_merge_letters.htm

Haven't used it; seems to be free.
posted by elle.jeezy at 9:21 AM on March 3, 2011


If it were me doing it, I would write a quick python or php script to run on my desktop (or another server) to either read a comma-delimited spreadsheet and create the html, or to work from a prompt or html form to do it.

If you have no programming chops this would be a several-hour project at least. It might still be faster than doing hundreds of them by hand. And it could be re-used as more products come in.
posted by contrarian at 10:12 AM on March 3, 2011


Perl's Template::Toolkit will pretty much do this for you quite easily.

http://search.cpan.org/~abw/Template-Toolkit-2.22/lib/Template/Tutorial/Web.pod
posted by jenkinsEar at 11:05 AM on March 3, 2011


Response by poster: It took forever to get the thing working right, but the Mail Merge with the individual merge add-on above looks like it's going to do the trick. A little clunky, but better than what I was doing before.
posted by slogger at 1:47 PM on March 3, 2011


« Older /k/, /c/, /t/ and /q/   |   What should we charge to teach a class? Newer »
This thread is closed to new comments.