Dear Log,
A major bit of happiness, years ago, was when I discovered MacPerl and how to manipulate the clipboard (in a text-only form, alas) from Perl. And on MSWin, there is Win32::Clipboard, for doing just that. I've recently been talking with that module's author, Aldo Calpini, about making it easier to read and write to the non-plaintext parts of the clipboard. Notably, when I'm in MSWord or whatever, and select and copy some text, it gets put in the clipboard in several different formats. Some are in an internal format specific to MSWord (or whatever application), some are just versions of plaintext, but there's also several styled text formats, which preserve font name and size, formatting features like italics and bold, etc..
Apparently the de-facto "standard" format for expressing styled text on the MSWin clipboard is Rich Text Format, RTF. That pleases me!
With the next version of Win32::Clipboard, I should be able to read the RTF from Perl, alter it, and put the altered version back on the clipboard. Whee!
RTF, word processing, and Perl
wickline on 2003-07-23T20:02:40
You might also have an interest in the
latest version of nisus which now supports Perl filters/macros. According to
the PDF manual (pp 111,112), you can opt to have a macros work with RTF rather than plain text. The script will get RTF input and the script's output will be interpreted as RTF.
I used to use Nisus back when I was a phil student at UCSD. It's a great word processor (my favorite of the many I've used on various platforms over two decades). Now that I'm not writting papers every day, I no longer bother to purchase nice word processing apps and just use free applications for my limited word processing needs. This feature almost makes me wish I had some daily word processing to do so I could monkey about with Nisus+Perl. As it is, I don't think I can justify the time/money. One can't play with all the cool toys out there...
Instead, I drop this note in your lap with the weak hope that you'll play with Nisus and I'll live vicariously through your fun
;) -matt