Content Migration: Creative solution of the day
The task: Import HTML content from old site into new site from a CSV and ensure integrity of HTML image elements. The constraint: Only HTTP access to the old site. The solution: Jquery + wget. I loaded the CSV into an HTML file and viewed the HTML file in my browser. Then I ran a single line of jquery: $('img').each(function() { console.log($(this).attr('src'); }); Next, I copied the log into a text file, prepended "wget " to each line, and pasted the whole thing into a terminal. Voila, I now have all the remote images in a single local directory. This was only so simple because all the old images existed in the same remote directory. If they had not, I would have had to be use wget more cleverly to mimic the remote directory structure.



