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.

Related posts:

  1. Quick Links AppleScript Last week, in response to a plea from Steve; he...
  2. VoodooPad Pro Blogging Please note that VoodooPad Pro has been renamed to VoodooPad....

Related posts brought to you by Yet Another Related Posts Plugin.

This entry was posted in code, mac-osx and tagged . Bookmark the permalink.

One Response to Text and Quote Wrapping

  1. Josh says:

    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!

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Notify me of followup comments via e-mail. You can also subscribe without commenting.