It is not often that I get very excited about a piece of software but this week I unearthed an amazing bit of code.
For the past few months I have been working on a complicated project that included a superb team of designers in New Zealand with the past two weeks becoming very intensive for me. I received a zip file of the entire site - well over 200 pages – and a pre-agreed directory structure and file naming convention. We pre built the framework for these pages into our content management system but the inter links between the pages needed a long complicated extra string on the end of each url and some additions to the root of the url. We had a spread sheet of the file names and their new urls and diligently using Find and Replace in Dreamweaver input each url and its replacement then searched the whole site changing and replacing each one in one go per link. That’s over 200 times, one for each page. It took about five hours between us and was soul-destroying work.
A couple of days later we received 17 updated pages which meant that we had to either go through the whole 200+ replacement process again for these 17 files or go into each file and find each url and replace it. I opened the first file and there were 34 links to replace. I looked each one up on the spreadsheet and replaced it. I then estimated that it would take between four and five hours to do all 17 files. I had to find a solution.
After a half hour searching on the web I found Text Pipe and downloaded the trial software for Text Pipe Web as that seemed appropriate. The find and replace capabilities are awesome. It allows you to create 'filters' - things to search for and what to replace them with - but you can have multiple filters in one search. I entered all 200+ links and their replacements into Text Pipe and saved the filter for future use. I then ran it on the site files and output the changed files to a separate directory. And it worked! - although only on 5 files as that’s all the evaluation version will allow. I immediately went on-line and purchased Text Pipe pro and although I had a little problem getting the unlock key and link to the full version a quick phone call and chat with the very amiable Simon Carter the CEO DataMystic, sorted everything out.
I downloaded the full version, opened my previously saved filter and ran it on the site files. It took 50 seconds to do what it took two of us 5 hours to accomplish earlier in the week. I was stunned and somewhat happy. Over the next few hours I tweaked the filter so that it was perfect and added four other filters to replace things like headers and footers in the code we did not need and some object code in certain files that used flash. I could have done this with Dreamweaver but the advantage with the filters is that they are saved for re-use.
The last full version of the site we received from the New Zealand Design company was at 7:10am on Friday morning and without Text Pipe we would never have met the 10am deadline to get the pages into the site before launch. I must add that the late running deadline had nothing to do with the design team who in my opinion did a superb and very difficult job to extreme deadlines and I hope to work with them again in the future.
Fantastic product and gets my full endorsement even though I have only just touched the surface on its capabilities!
Posted by Simon Cox at May 31, 2003 12:27 PM