HTTrack editing with Notepad++


Sorry ... this cryptic text presumes you are very familiar with the HTTrack mirror process and the use of Notepad++ and the way the site Flash containers are organised:

Audio - live site version: s1.addParam('flashvars','file=');

Audio - HTTrack version: s1.addParam('flashvars','file%3dhttp_/');

Audio - desired corrected HTTrack version: s1.addParam('flashvars','file=multimedia/LenBickford_DVT_B008__extract_01_.mp3');

Video changes: CHANGEfile%3dhttp_/ CHANGE%26image%3dTO&image= CHANGE.html');TO.jpg');

Audio Changes: CHANGEfile%3dhttp_/ CHANGE.html');TO.mp3');

Composite changes: CHANGEfile%3dhttp_/ CHANGE%26image%3dTO&image= CHANGE.html');TO.mp3');

If we just do the composite change then there is a problem in that any images associated with flv videos will be wrongly renamed as mp3 instead of jpg and there is no way out other than re-edit the mirror by hand in the wrongly changed places. However as there are very few flv files here is a simple permanent solution:

1. Reload all images associated with an flv video by adding to them the qualifier -01flvjpg (viz bob.jpg is reloaded as bob-01flvjpg.jpg). Then the HTTrack qualified string flvjpg.html'); is first searched and replaced with flvjpg.jpg');

The 01 in front of the qualifier is to cater for multiple uploads of the image. If this is not changed for a new upload then the site will insert new version numbers between the two jpg strings (eg a second bob-01flvjpg.jpg will be named bob-01flvjpg1.jpg by the site) and thus muck up the search/replacement procedure. But if any new upload is incremented, eg bob-02flvjpg.jpg for version 2, then the new file will be unique and all will be OK with the ending.

2. Then after this replacement all the remaining unqualified strings .html'); can be safely replaced by .mp3'); without conflict

So, to summarise:

1. Reload all flv associated still images on the site with renamed flvideo suffixed replacements. If any new flv associated jpg images are added to the site then name them appropriately (whateverflvideo.jpg). Its probably not such a good idea to use hyphens or any other special characters in file names as HTTrack can muck them up and cause us other correction problems. 

2. Then do the following Notepad++ block changes on the HTTrack mirrors: CHANGEfile%3dhttp_/ CHANGE%26image%3dimagesTO&image=images CHANGEflvideo.html');TOflvideo.jpg'); CHANGE.html');TO.mp3');

This page was added by Bob Stephen on 03/05/2013.
Add a comment about this page

If you're already a registered user of this site, please login using the form on the left-hand side of this page.