On Tuesday, November 6, 2001, at 12:58 am, Chris Bidmead wrote:
> Cracked it, :-)
Ah, but there's an even better way.
No disrespect to Christian Grunenberg, who's done a lovely job with
WordService, and tells me he'll be adding Date+Time as a single timestamp
to a future version -- but I've come across something that can deliver
that here and now, and has huge flexibility (eg your own format for the
Date+Time stamp, and much, much more).
Those who remember the Developer extensions in the old NeXTStep Edit.app
will recall the ability to add user definable UNIX pipes as a menu
extension. If we had that in MacOS X's TextEdit, of course, all this
stuff I've been banging on about here would be a no brainer. Running:
echo [`date`]
... from the command line produces something like:
[Wed Nov 7 19:08:24 GMT 2001]
...so Edit.app with the Developer extensions switched on gave you the
ability to whack that string straight into the text. Instant datestamping.
Well, the good news is that whacking user-definable UNIX pipes into the
GUI is back. With a vengeance. Check out Mike Ferris's TextExtras 1.6,
freely downloadable from StepWise. Installing it is a simple matter of
dropping Mike's stuff into a couple of Library directories. Then you'll
need to spend an amusing 30 seconds doing some plist editing (which I've
noticed since my last posting here you can do in plain ASCII, so you don't
need PropertyListEditor from the Dev Kit). Mike's UNIX piping is hand
tailored using a file called .TEUserPipes.plist in the home directory. He
supplies a sample version of this file, which shows how the configuration
goes and demos some routines for simple sorting of the selected area.
Here's my 2c's worth as an addition to that file for adding the Date+Time
stamping as discussed above, attached to Cmd-Shift-T.
<dict>
<key>Command</key>
<string>echo [`date`]</string>
<key>InputSource</key>
<string>0</string>
<key>KeyEquivalent</key>
<string>T</string>
<key>OutputDestination</key>
<string>1</string>
</dict>
The Really Good News is that any features you add using TextExtras is by
default made available to _all_ Cocoa apps. You can switch it off
globally or for any individual apps as you please.
--
el bid
|