Dr Fragen in the operating room

Text and Quote Wrapping

·

If any of you find yourself using webmail you’ll know what I’m talking about. If you’re at all like me, you like to be able to follow the replies in an email thread. Using webmail the quoting and wrapping get screwed up quite easily.
I was looking for a simple way to rewrap, unwrap, increase the quote level, and decrease the quote level of any selection of text. I found that there were several good shareware programs that did this, and many other things. But I was really looking for a simple one-trick pony of sorts. So in the usual fashion I decided to roll my own. What I did was create a single shell script that when passed a parameter will do what you want to whatever is in the clipboard. It then replaces the clipboard with the changed text.
I call the package quote_changes. Go get it.
After you unzip it, put it in ~/Library/Scripts/. Activate your system-wide script menu from the AppleScript Utility.app.
The scripts are all meant to be in the same folder. The scripts that does all the work is change_quote.sh. The usage of the script is as follows:
$ change_quote.sh increase — will rewrap the text on the clipboard and increase the level of quoting (>). The additional scripts in the package are simply calls with the appropriate parameters. The full usage is
$ change_quote.sh (increase|decrease|rewrap|unwrap)
If anyone has any problems let me know. I hope others find this useful. Enjoy.

Comments

One response to “Text and Quote Wrapping”

  1. Josh Avatar

    I’m not sure what ‘Applescript Utility.app’

    This sort of script is mostly useful to me when I’m in Outlook 2011. In order to use the script menu, create a new script called ‘Quote Clipbard.scpt’ in “~/Documents/Microsoft User Data/Outlook Script Menu Items”, and place the following command in it:

    do shell script “~/Library/Scripts/quotechanges/changequote.sh increase”

    This can be done via ‘Applescript Editor.app’, or just text editor. When you are in Outlook, select and copy what you want to quote, hit the script icon on the menu bar, select Quote Clipboard, and then paste the quoted text where you like. Works like a charm!