> On 4 Dec 2014, at 4:16 AM, Martin Post <[email protected]> wrote: > > I am often using Text Factories (usually just 5-10 GREP replacements) to > convert files from one format to another. These Text Factories work as they > should. However, this will modify the respective documents (in memory) and > then (optionally) save them to disk, _replacing_ the original files. Now > let's assume I have 40 XML files that I converted into HTML. After running > the Text Factory, I have to go to the Finder, change the file extension to > ".html", and then I can validate my files. Now if something went wrong, I > need to create another copy of the original XML file and start again. I am > testing rather complex text factories here, which I sometimes need to modify > on the fly. It would just be nice if I could tweak a text factory, have it > process the files in folder A and write the converted files to folder B, > without having to copy or rename files manually.
You may not realize it, but what you really want is a set of shell scripts (sh, perl, python, whatever). You can run them remotely from your cheap laptop via ssh. But that’s not really your question. Text Factories cannot, themselves, duplicate files, they can only act on files. So you’ll need an automated way to do that. Applescript is certainly capable of this, but you’re probably better off learning how to make a shell script at that point. But there’s always Automator. BBEdit has Automator action, which you can download here <http://www.barebones.com/support/bbedit/automator.html>. You can’t run a Text Factory directly from Automator, but you might be able to re-construct your text-filter using the actions. And if you can do that, then you can use all the other system functions in Automator to duplicate and move files. You can even set it to watch folder and act on files automatically. Luckily, you can also run automator actions via the shell, so you can do all this remotely. -- This is the BBEdit Talk public discussion group. 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> --- You received this message because you are subscribed to the Google Groups "BBEdit Talk" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected].
