Tech Twitterings via jQuery & Twitter

Several weeks ago, I decided to start a weekly blog entry compiling a list of my technical tweets from Twitter. After the second week, I noticed that it was taking me much too long to compile the list, so I decided to create a tool to make it easier.

My current solution involves several Firefox add-ons, jQuery, and Twitter. Eventually, it would probably be much easier if I used the Twitter APIs directly, but for now I have found this solution to be a fun learning exercise :)

Steps to Create the Tech Twitterings Entry<ol><li>Search for my technical (#tech) tweets from Twitter</li> <li>Use the Firefox AutoPager add-on to automatically load the next several pages to capture all the tweets from the last week.</li> <li>Use the Firefox Greasemonkey add-on and run the Load jQuery Library script to load the jQuery library onto the Twitter search page</li></ol>Load jQuery Library<pre>
// ==UserScript==
// @name Load jQuery Library
// @namespace
// @include
// ==/UserScript==

//Code taken from
var GM_JQ = document.createElement(‘script’);
GM_JQ.src = ‘’;
GM_JQ.type = ‘text/javascript’;

function GM_wait() {
if (typeof unsafeWindow.jQuery == ‘undefined’) {
} else {
$ = unsafeWindow.jQuery; letsJQuery();

function letsJQuery() {
unsafeWindow.console.log(‘The jQuery Library has been loaded’);
</pre><ol start="4"><li>Use the Firefox Firebug add-on and use it’s console (F12) to run the jQuery Twitter Script</li></ol>jQuery Twitter Script<pre>
$(‘li.result .msg .msgtxt .expand’).remove();
var categories = new Array();
var categoryKeys = new Array();
$(‘li.result .msg .msgtxt’).each(function(i,tweet) {
var tweetText = $(tweet).text();
var regularExpression = new RegExp(‘.
#tech.(#\w+).’, ‘gi’);
var matches = regularExpression.exec(tweetText);
if (matches != null) {
var match = matches[1];
if (categories[match] == null ) {
categories[match] = new Array();
for (var i = 0; i var categoryKey = categoryKeys[i];
console.log(‘<h3>’ + categoryKey + ‘</h3><ul>’);
var category = categories[categoryKey];
for (var j = 0; j console.log(‘<li>’ + category[j] + ‘</li>’);
</pre><ol start="5"><li>Copy & Paste the contents from the console into Blogger</li> <li>Surround the auto-generated HTML content in a div and prepend the JavaScript to convert Text to Hyperlinks.</li></ol>Text to Hyperlink JavaScript<pre>