Open a mailing list Mail message on gmane.org

Nov 29, '06 07:30:00AM

Contributed by: Anonymous

I like to bookmark interesting or useful threads on mailing lists I subscribe to in the web archive of the HTTP - NNTP - mailing list gateway gmane.org, so I wrote this simple Apple script to extract the Message-ID of the selected email and open it in gmane.org in my default browser:

tell application "Mail"
  set selectionMessage to selection
  set theMessage to item 1 of selectionMessage
  set messageId to content of header "Message-ID" of ¬
   theMessage as string
end tell

set messageId to ¬
  do shell script "echo '" & messageId & ¬
   "' | sed 's/^.*<//' | sed 's/>$//'"

open location ("http://mid.gmane.org/" & messageId)
This script doesn't check to see if the list you're interested in is archived on gmane.org (not all are), or if the selected email was even sent to a mailing list.

[robg adds: To use the script, save it to your user's Library -> Scripts -> Applications -> Mail folder (create the sub-folders as necessary). Then just select a message in Mail, and then choose that script from the Scripts menu.]

Comments (0)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20061125073602973