
Extending Custom Cleaners with Automator Workflows
TextSoap Deluxe comes with two new Automator actions that allow workflows to augment Custom Cleaner functionality, allowing you to augment TextSoap's text processing with AppleScript, Perl, Python, schell scripts or other Automator actions.
Known Limitation: Automator actions can currently only process plain text and not rich text.
Creating an automator workflow is straightforward.
- Create a new workflow.
- Insert the "Get TextSoap Engine Text" action at the beginning of the workflow, the result of which is text that you can work with.
- Add any additional actions to process the text.
- Finally, add "Set TextSoap Engine Text" action at the end of the workflow. This returns the text to TextSoap.
Setting up Workflows to work with TextSoap
TextSoap will only recognize workflows placed in the specified folder. To place the workflow file in the correct folder, just drag it to the TextSoap application icon (or open it). TextSoap will prompt you to copy it to the correct location. You can also manually copy it to ~/Library/Applications Support/TextSoap/Workflows/.
New Custom Cleaner Action
A new "Run Automator Workflow" action is available when creating custom cleaners. Add this action into your custom cleaner to run the specified workflow while processing text.
No Touchbacks
Workflows used by the TextSoap Engine cannot call back into the TextSoap Engine (using the "Apply Cleaner" action). This creates a race condition where the TextSoap Engine is waiting for the workflow and in turn the workflow is waiting for the TextSoap Engine. To prevent this, "Apply Cleaner" actions are ignored when the workflow is run from the TextSoap Engine.