View WordPerfect for Windows files in Terminal
Aug 28, '06 07:30:01AM
Contributed by: deef
I have hundreds of WordPerfect for Windows files with contents that I don't need to edit, but often view. They can be opened with NeoOffice or AbiWord, but both of these are fairly slow when I just want to quickly view a file's contents. So I created a contextual menu item which (in the blink of an eye) opens a Terminal window containing the text of the file. Here's what you need to make it work:
- OnMyCommand
- wpd2text. Note that they used to have Mac binaries here, but it looks like you will need to compile it yourself now (you'll need the Developer Tools to do that).
- Add this to your .bashrc file: function settitle() { echo -ne "\e]2;$@\a\e]1;$@\a"; } (taken from this hint).
Once that's all done, add this command to your OnMyCommand command list. If you want, you can pipe the output to less -- I had done this, but I didn't like the way smart quotes, etc. showed up as highlighted hex codes.
Control-click on a WordPerfect file, go to the OnMyCommand contextual menu, select Preview text of WordPerfect file -- bingo, a quick-and-dirty Terminal window appears with the filename in the title and the text displayed.
[robg adds: I haven't tested this one.]
Comments (7)
Mac OS X Hints
http://hints.macworld.com/article.php?story=20060825092314853