Blackbirdpy is a set of scripts and styles for quickly embedding "live" tweets in blog posts or other web articles. All links within the tweet, including URLS, screen names, and hashtags are fully clickable. It accesses the Twitter API, but does no user tracking, cookie planting, or other sketchy business.
There are three parts to blackbirdpy:
- A Python script that takes a tweet's URL as its command-line argument and returns a chunk of HTML for embedding. The HTML puts the tweet in a
<blockquote>structure and is intended to look decent in an RSS reader.
- A CSS file that styles the elements of the embedded tweet.
- An AppleScript that gets the URL of the frontmost Safari window and passes it to the Python script, returning the HTML chunk. I use this in a TextExpander snippet, so I can simply type
;tweetin my text editor and insert the HTML chunk into the article I'm writing.
The idea is to provide an embedded tweet that looks like a tweet (without the follow, favorite, retweet, etc. buttons) and which degrades to a simple quotation when viewed in RSS.
Here's an example, which sort of matches what you'd see in an RSS reader:
Embedded tweets don’t have to be fragile or track cookies: leancrew.com/all-this/2012/…
— Dr. Drang (@drdrang) Thu Jul 12 2012 11:34 PM CDT
If you follow the link in the tweet, you'll see several tweets.