Supermemo to Evernote Conversion - including images

I recently decided to copy my notes from SuperMemo to Evernote. Later, I'd like to do the opposite, but for now, below are the working instructions. This program will include all of your images, retain formatting (underlining, font size, italics, colors, etc.), and can run on your entire Supermemo collection.

1. Right-click a sub-collection in Supermemo (e.g. German) and select Export -> HTML (this creates the Q,A, and includes the images, apparently the only SuperMemo option that does.

2. Copy the resulting folder to a folder called _delme on a computer running PHP (see the free WAMP stacks if you run Windows)

3. Run my PHP code found here

4. Open Evernote -> Tools -> Import Folders -> (SELECT A FOLDER) -- don't include the subfolders option

5. Copy the resulting HTML files and "out" folder from #3 into the folder in #4

Done!

This procedure chops up the long Supermemo HTML files into small HTML files that include images for Evernote's import. Voila!