E-Mailing Washington Post Articles
The Washington Post allows you to e-mail full text copies of articles to people. I will often send myself articles to my gmail account so I can have a searchable archive of articles that I've read, or at least wanted to read. Well, this became a tedious process and what do Mac users use for automation? That's right, AppleScript.
tell application "Safari"
set theUrl to the URL of document 1
set theArticle to do shell script "wapo.pl " & theUrl
end tell
That's it! Oh...except for that little perl script. What does it do? Everything.
First, put wapo.pl in you path. It takes a URL from the AppleScript, which needs to be a Washington Post article, grabs the article ID from the URL and then posts all the right info to the Post's mailto cgi. So what's the big deal? Well, WaPo is a registration only site...so the perl script has to talk to it and be you. How does it do that? It uses your browsers cookies. As long as you use a cookie file from a browser that you've already authenticated with, it should work just fine.
If you try and use it and run into problems, you're probably better off not contacting me. This is crappy code, but like all good code it works for me.
