Auto Generating Blog Posts with RapidMiner

Lately I’ve been fooling around with the new Blot.Im blogging engine and decided to see if I could use RapidMiner and some Javascript to auto generate a blog post with a stock chart. Since blot can parse txt, markdown, and HTML files, I decided to see if I can get this to work with an HTML. [While Markdown has the ability to parse HTML tags, it can’t parse Javascript correctly]1. After some pain, I got it to work with Blot, but you can extend this to any type of blogging system that parses HTML.

I designed a RapidMiner process that downloads the historical stock data using three macros: symbol, start_date, and end_date. These macros are help set the parameters in the Yahoo Stock Data operator but were also used to pass thru to the actual Javascript code.

For the stock chart I used the library and passed the %{symbol} macro and %{end_date} to the script. For the sake of syncing up the saved CSV file, I had to careful that it was appended with those macros.

While this works really great, it does have one snag. If you want to display multiple stockcharts, you’d have to figure out a way to update the location of the chart relative to where your blog post is.

This is important if you show more than one post per page. When I generated two posts with two different stockcharts, the HTML made them relative to the top of the page. In other words, the one chart was on top of the other one. I’m sure this is an easy fix but something I’m not going to bother with for this tutorial!

  1. Nope, got it to work in Markdown with the help of

Source: Blot NMT Feed