On Wednesday, January 23, 2013, Adam Engst <[email protected]> wrote:
> So the question becomes, how would such a perl script or AppleScript need
> to be written to work from within a text _factory_?
Here's a quick excerpt from the manual:
When you use the Run AppleScript Filter operation, your script
should be written with an entry point named “ApplyTextTransform”.
The input parameter to this entry point is a Unicode string
containing the file’s contents. This entry point should return the
file’s contents as a Unicode string (or something which can be
directly coerced to one):
on ApplyTextTransform (fileData)
-- do something to fileData
return fileData -- or some reasonable facsimile thereof
end
• Unix filters run from text factories get their input on STDIN, and
should write any content they want passed to the next filter stage
to STDOUT. (Unlike Unix filters run from the Shebang menu, text
factories do not pass a temp file in argv[1].)
Enjoy,
R.
--
Rich Siegel Bare Bones Software, Inc.
<[email protected]> <http://www.barebones.com/>
Someday I'll look back on all this and laugh... until they sedate me.
--
--
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>