
For those who visit my website proper (not the RSS feed), you’ll probably have noticed that I’ve been adding new movies that I’ve been watching to the front page, just below my first post. This was a feature of the new Movie Rating WP Plugin that I was using, which is awesome.
Problem that I had was that I had 6 years of old movies that I wanted to bring in to this new DB which was about 700 movies. To copy and paste all that information in to this new plugin was time consuming and error prone (I did about 100) until I stumbled upon an easier way to do it.
I had already taken all the information from my yearly movie reviews and put it into a massive csv file that looked like this:

I found an addon (iMacros) for Firefox that you can do scripting/macro’s with and after a little bit of learning I was able to make a script that would read my csv file, copy and paste that information into my Movie Rating screen, save it and go to the next one. Here’s what that script looked like:
VERSION BUILD=6210326 RECORDER=FX
CMDLINE !DATASOURCE movies9.csv
‘Number of columns in the CSV file:
SET !DATASOURCE_COLUMNS 4
‘Increase the current position in the file
SET !DATASOURCE_LINE {{!LOOP}}
URL GOTO=http://matthew.mennoboy.com/wp-admin/tools.php?page=wp_movie_ratings_management
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:url CONTENT={{!COL1}}
TAG POS=1 TYPE=SELECT FORM=NAME:NoFormName ATTR=ID:rating CONTENT={{!COL2}}
TAG POS=1 TYPE=TEXTAREA FORM=NAME:NoFormName ATTR=ID:review CONTENT={{!COL3}}
TAG POS=1 TYPE=INPUT:TEXT FORM=NAME:NoFormName ATTR=ID:watched_on CONTENT={{!COL4}}12:34:56
WAIT SECONDS=1
TAG POS=1 TYPE=INPUT:SUBMIT FORM=NAME:NoFormName ATTR=NAME:action&&VALUE:Addanewmovieratingยป
WAIT SECONDS=1
I could have probably left out the WAIT lines as it automatically waited for the page to save before going on to the next entry but I was happy to wait the few extra seconds for some reassurance that all the info would be there in time. The URL line is probably also unnecessary as it reloaded the page every time to put in a new entry but I left it in there. You need to make sure that the date is formatted correctly or else it won’t go in and I also found that the movie rating has to be one number higher than you want it to be (easy enough to set up in Excel).
With the macro in place, it was now able to loop through my csv file and start adding reviews right into Firefox; it took about an hour to put my remaining movies in without any user interaction from me (the best part!).
Now, my Movie Review page has all the movies and lots of the the TV shows that I’ve watched since I started keeping track on June 18, 2002 (almost 7 years ago). Here are some stats about my movie ratings since I’ve been rating…

You can now even sort by rating to see which movies I liked the most (there are 9 movies at 10 stars) and the least (only 2 movies have 1 star).
Hope you like the new Movie Rating System!