12.31.05
Happy New Year!
I wish you all a wonderful 2006! May it bring you everything you wish for. Feel free to add your own wishes.
A weblog about TextMate, the Universe, and Everything
I wish you all a wonderful 2006! May it bring you everything you wish for. Feel free to add your own wishes.
The time has finally come for me to jump on the Rails-wagon and learn Ruby on Rails. I will document here my efforts to port the fabulous Gregarius feed aggregator to Ruby. I admit this is not a tutorial for the complete novices, and definitely of no use to a seasoned Rails developer, unless they enjoy a good laugh. In particular, I am assuming that you have glanced at the standard tutorials here and here, as well as Amy Hoy’s wonderful list of articles on her site. I am sure there are other worthwhile tutorials out there, and you can probably find them documented at the wiki.
So to recap, I am assuming that you have Ruby and Rails installed and you have two terminal windows open, as well as your favorite editor ready to work on any file in the directory we are about to create, and of course your favorite browser open, so that we can view our results. Also keep in mind that whatever is presented here is my view on things, and it might very well be incomplete/inaccurate. Please feel free to correct me. This might also be an opportune moment to have a look at the Gregarius source code, to have some idea what we are trying to replicate. Of course for now we’ll only do some small bits of the overall monster.
Ready? Alright then, on with the show!
Read the rest of this entry »
I am starting to really like Ruby! I was working on my plugin, for Gregarius, and I found myself having to often have the php code spit out javascript code using echo. So something like:
function myinsert(node) {
var ob = document.getElementById("maindiv");
ob.setAttribute('style','display:none');
}
would be converted to:
Read the rest of this entry »
Gregarius is coming along nicely! They have just created a nice setup for plugins to save user options on the database, and this prompted me to write my second plugin. It’s called Auto highlighter, and what it does is that you select a keyword, and a color, and it highlights that keyword anywhere in the feed items it appears. It was one of the plugins on the todo list, not sure whose idea it was originally, but it wasn’t mine. It might have originated here. You can find it through the plugins page, or directly here. It looks great. Let me know what additions you would like to see in it.
By the way, if you are an expert regexp user, then you can put a regexp instead of a keyword. If you are not an expert regexp user, I recommend you become one.
Edited to add: The second version of the plugin is now ready, and it’s bigger, better, not faster, but more! It now allows you a variable number of keywords, with different colors each, and it hosts a very sexy config screen, if I may say so myself (ok, sexy with my standards, don’t expect too much
). You can see its results on my gregarius installation, where the words apple, drm and mac are highlighted with three different colors. Let me know what you think, and as usual what other features you would like to see.
Edited again to add: Third version, slicker, using associative arrays to make everything easier for me. Unfortunately, it is not compatible with the previous version, so whatever custom keyword-color pairs you have there will be lost.
Later
I just finished converting my cv to html format, using Tim Bray’s template, which I must say I find wonderful. As he so eloquently puts it, “Why would anyone want a word processor any more?”
It am very pleased with the result. Have a look and tell me what you think, and if you have a job for me, let me know! You can find other relevant documents here, though that page is under heavy construction.
Later