Formats, Microformats, and Exporting, Oh My!

The other day, I came across this Microformat Bookmarklet, designed to extract hCard and hCalendar markup from a website and into a format that people can use. ‘Hey’, I though, ‘that’s pretty cool, why don’t I use those in places’.

It was the motivator that finally got me to fix a long open feature request for TigerEvents. Now, the event view has hCalendar markup for those who care.

Once that was done, I thought, since I had already done hCal, why not figure out iCal export? Easier than I would have thought, thanks to the iCalendar gem and the send_data method. Now people can grab iCalender export by individual event, group, or category. People should even be able to subscribe to iCal files and have events automatically shown in their calendar app (if said app has this feature). Only future events are shown, however, in order to cut down on file size.

Finally, while I was working on the above, a friend stopped by, saw what I was doing and commented, ‘you know… it would be awesome if I could click on a link and have the event loaded into my google calendar’. So, quickly scouring the web came up with Google Calendar event publishing guide and after a few minutes, I managed to add that functionality as well.

Now for RSS feeds…

Back At It

Some people might have noticed that the my.dsu.ca site has gotten a makeover. This visual overhaul was performed by the talented Andrew Shouldice. This overhaul has garnered a lot of positive feedback so far, and it is my hope that prettier site = more visited site.

Besides some obvious visual enhancements, some long standing backend items have made their way into the release. Notably, tags have replaced categories, meaning that individuals no longer have to scroll through a multitude of categories to select the one wanted. Additionally, there are a few more options for finding events, notably searching, and browsing by group.

There are still a few things that could be done better, notably with how categories are browsed (alphabetical as opposed to by order perhaps), how items are displayed on the front page (a month’s worth of events is hard to scroll through, though that is a sign that it is being used more).

All in all, this transition has made me want to do even more work on it a bit more often. As always, any comments and criticizms are more than welcome.

Testing….. Testing…..

Update: Apparently, despite my usage of FeedBurner, Planet.cs.dal.ca chokes on my site being back up. Apologies to everyone this effects.

So…… a while back, I switched my friend Jon over to Typo, on a new server I am splitting with some friends. It was always my intention to switch my own instance over at some point, but it usually came down to “If it ain’t broke, don’t fix it”.

Well, it turns out that I recently DID break things, since Typo trunk is labeled ‘unstable’ and I didn’t pay attention to this fact when updating it. Ooops. So, I finally had the incentive to move things over and accomplish a number of goals.

  1. Renumbering entries so I could properly redirect my old WordPress URLs to the new Typo entries (I had to hack away at the Typo => WordPress script to not change the IDs)
  2. Write the actual mod_rewrite rule to properly do the above1
  3. Set up proxying using Apache and Mongrel, as opposed to Lighttpd and FastCGI (I haven’t had any complaints so far).

Everything seems ok so far. I might have lost a few comments, and a few other things I have done (I remember trimming down the categories at some point), but hey, those are small items in the grand scheme of things that I can fix up at my leisure.

The rewrite condition, for those interested is:
RewriteCond %{QUERY_STRING} p=([^&;]+)

RewriteRule ^/$ http://yourdomainhere/articles/read/%1? [R=301,L]

Sneaking Ruby Into The System

Many of you may know of my love for the Ruby language. Used for most of my own projects and quick scripts, but have never been able to use it in any of my paid work. Until now.

It started a few weeks ago with a script I wanted to write. As I am the ‘translator guy’ at work, from time to time I need to convert the XML files that store the English text to something that a non-technical translator can easily read (I thought the XML was readable, but apparently I need to hand over Excel spreadsheets). As Ruby has nice XML library included, I just quickly whipped something up, and away I went. Never intending this to be anything more than a tool for myself and knowing my boss wouldn’t care as long as it got done without me having to spend a few hours, it seemed like the thing to do at the time.

Fast forward another two weeks. I overheard a few of my coworkers talking about how they can’t manipulate XML files in Auto-it, which they were using to cover some deficiencies in another build tool we were using called FinalBuilder. They started talking about either writing their own XML parser, or using yet another tool/language to do what they wanted.A few of my coworks obviously didn’t like either idea. I mean, sure it was a solution, but it wasn’t an ideal solution. None of us liked the thought of debugging build/test/release scripts cobbled together from 3 different programs/languages. Some of us thought that if we were going to take the time to do something like write our own XML parser, we might as well spend the time to do something even smarter, like rewrite all our scripts in a single language. This would have several advantages, including things being uniform (1 language vs 3 helps there) and making it easy to track changes in svn (FinalBuilder has binary files, which caused problems when multiple people made enhancements).

So a number of suggestions were made, including batch files (ugh) and php. I obviously suggested Ruby, pointing out its portability (as opposed to Windows only solutions), readability, and the existence of desired functionality (eg. XML Parsing). The individual who was going to write the scripts had never used Ruby before, and so wanted to know more before making a decision. Coincidentally, I had a copy of Enterprise Integration With Ruby sitting on my desk,and was able to toss it over so he could take a look at the syntax (bonus points for its section on XML parsing). I also pointed out the ruby-doc site and pointed out rake.

Now, we have all of our build scripts written in rake format, and I reworked my translation scripts slightly to be rake tasks as well. At the moment we are working out some kinks in another series of scripts a coworker has written for creating packages for our clients, and we won’t have to waste time making small tweaks to packages manually.

The Maltese Invasion

Over the last week or so, I was entertaining family. Not only did my mom and sister fly from Ontario for a visit, but so did one of my aunts, and two grandparents (apparently a birthday present for my grandfather who recently turned 80).

The family did the tourist stuff by day while I worked and I took them to some of the good places to eat in the city and hung out with them in the evening. Went to PEI for the weekend, which was a nice change of pace.

Things were a little weird with 3 generations of family together though. This resulted in my ‘borrowing’ my little sister from time to time to do more interesting things, like introducing her to Freak Lunchbox and showing her some of the local pubs and meeting my friends (the pubs were her request).

In PEI, we basically did out own thing for the day. Rather than go and do the Anne of Green Gables stuff, which didn’t interest us that much, we instead hit up the Ripley’s Believe it or Not Museum, the Wax Museum, and mini-golf.

It was a decent visit overall, despite a few technical difficulties. New stuff was seen, fun was had, and new jokes (which I am apparently not allowed to post here) were made.

Good times.

Railsday 2006

So yesterday was RailsDay2006. The objective: Write an entire web app of your choosing (with some restrictions) in a span of 24 hours.

Oliver and I decided to participate together. I came up with a bunch of ideas, but we ended up doing something Oliver had in mind. The goal: a deli.cio.us clone that we called Tasti.er. We wanted a simple interface, where everything happens on one screen. We put it together in under 18 hours (with the final commit happening just as the competition closed).

Check out our performance log or Oliver’s RailsDay Post.