views:

76

answers:

2

I need to add some code to the of several html contained in a folder on my desktop. How can i do that?

I am using a prototyping tool (Axure) on Mac and I want to add some html meta tags to the generated pages. These pages can be overwritten every time I generate the prototype. What I need is a sort of script that I can launch after re-generating the prototype, to reinsert the code. There is something for windows but it doesn't work on Mac: http://joshuamorse.com/2009/01/14/axure-protonotes-an-alternative-to-protoshare/

thanks

A: 

This is a very simple problem to solve using a shell script.

If you are not familiar with scripting, then check out the Automator program built-in to OS X. This provides a "visual" way of building automation workflows.

This is the basic steps that your workflow will need to perform.

Find the files that need updating.

For each file

Open the file using TextEdit

Tell TextEdit to Find the Head element and replace with the new Head Element that includes the script

Save the file.

Repeat

falconcreek
A: 

How about a simple find/replace in multiple files using something like this: http://search-and-replace.en.softonic.com/mac

If you are able to create some sort of 'dummy' tag in Axure, you could use that as the 'find' that you could replace with your meta tags.

That seems to be a simple way to do what you want.

George Sisco