I have a project that I'd like to get working on my Mac. I have always resorted to manual search and replace, multi-file, using TextWrangler. This can take a lot of time and would be much better if it could be scripted. I am no scripting guru, but maybe I could figure it out with some advice or snipits that work with BBEdit or TextWrangler.
I basically have a template website designed and have standard strings for images (IMG001, IMG002…) The photographer, however, provides me with a bunch of photos that are non-sequential and named differently (DSC_0022, DSC_0033, DSC_101, NNMT_23…) I am thinking that I could have one or two files that would let me use BBEdit to map from one string to the new string, with a global multi-file search and replace (I could always put the files in the same place, to make this easier, with standard names.) It sounds easy, but I'm not sure the best way to go about it in BBEdit. Something like, Read Line (oldstring, newstring) Replace all instances of oldstring with newstring Loop until EOF The work would then be reduced to pasting the list of his filenames into a txt file or CSV. Not manually doing 300 search and replace queries with the GUI. Well, any suggestions are welcome. I am not in a rush, but would like to be prepared for next time. I do this a few times a year and each time it takes a few hours of monotonous activity that can be better spent! Thanks, John -- You received this message because you are subscribed to the "BBEdit Talk" discussion group on Google Groups. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at <http://groups.google.com/group/bbedit?hl=en> If you have a feature request or would like to report a problem, please email "[email protected]" rather than posting to the group. Follow @bbedit on Twitter: <http://www.twitter.com/bbedit>
