geek ramblings

Jabber FOAF Utilities

Two Great Tastes....

Jabber Powered

Jabber and FOAF have both been toy interests of mine for a while. Both projects kindle that hacker spirit in me, and give me the urge to want to tinker with them. Unforunately, my code-tinkering time is pretty limited, being mostly tied up by kid-tinkering with my son and daughter. It's a fair trade -- kid-tinkering is just as frustrating and just as fun as code-tinkering :) But, I finally squeezed in some time here and there and realized an idea that had been floating around in my head for a while.

JabFoaf currently consists of two pieces: Roster2Foaf and JID2Foaf. Both tools are based on the same idea -- retrieving vCard information about Jabber users and returning FOAF entries.

Roster2Foaf

Roster2Foaf will allow you to login to your existing Jabber account, retrieve your entire roster, and convert the whole thing into a FOAF file for you. If you already have a Jabber account, but are just getting started with FOAF, this could be a great starting point.

JID2Foaf

JID2Foaf will retrieve information about a single jid (Jabber ID) and convert it into a simple <foaf:Person> element.

Limitations and Other Notes

The vCard format generally does not contain many pieces of information which are common in FOAF. For example, it does not provide a way to specify a URL for your workplace, or any way to indicate projects and interests.

Since not all Jabber users fill out their vCard info, there can be entries without an email address, which is what FOAF uses as the unique identifier for a person. In these cases, I take the liberty of substituting the jid and using jid: instead of mailto:. So, instead of

<foaf:mbox rdf:resource="mailto:user@example.com"/>

you might see

<foaf:mbox rdf:resource="jid:user@jabber.example.com"/>

The Roster2Foaf utility requires you to enter your Jabber account password, in order to log in as you and fetch your roster information. This site is not secure! If you are paranoid about your Jabber password being sent across the internet in plaintext, consider this your warning. The information entered is not logged anywhere. Well, sortof. Actually, it does sent a subscription packet to "jabfoaf@jabber.org", just for experiemental purposes. I promise not to use the collected jids for anything nefarious. In case you didn't already know, I hate spam.

Feedback

Feel free to email me, IM me, or add me to your FOAF and/or your Jabber roster.

Email
dougal@gunters.org
Jabber
dougal@gunters.org
ICQ UIN
1223172
Yahoo! Messenger
EMCampbell3

Code and License

I currently consider the JabFoaf utilities to be of beta quality. The source is available from the JabFoaf Project Page at JabberStudio. I also have a couple of additional features that I'm considering, such as an XML-RPC interface to the utilities.

Related Links

Class.Jabber.PHP

The JabFoaf utilities make use of the incredibly useful ClassJabberPHP, written by Carlo "Gossip" Zottmann.

FOAF-a-matic

Another excellent starting point for those who are new to FOAF. Just fill out fields in a web form, and Leigh Dodds' FOAF-a-matic will turn it into FOAF! Coming soon -- FOAFaMaticMark2!

msn2foaf

Same concept as Roster2Foaf, but specifically for MSN Messenger. Perl script.

foafnaut

The foafnaut project is an amazingly cool SVG application which will graphically show the connections between FOAF users. It simply has to been seen to be appreciated.

FOAF Explorer

Morten Frederiksen's FOAF Explorer will read a FOAF file and turn it into a summary in web page form. An excellent way to explore FOAFspace and find good examples of FOAF files.

FOAF: Web View

Another web-based FOAF parser/explorer.

Jabber Client List

Two of the strengths of Jabber are that it is Open Source and platform-independent. There are a variety of different client programs available. For Win32, I can recommend Exodus, Psi, and Skabber.

FOAF Bulletin Board

Once you've created a FOAF file and put it on your web server, add your name to the FOAF Bulletin Board so that others can find you. And don't forget to tell your friends about FOAF.

The Semantic Web: 1-2-3

A good collection of information about this whole 'semantic web' idea. Tons of good links from here.

Most Popular Friends of Friends

A cool FOAF parser written in PHP (source available).

XML::FOAF

A FOAF parsing perl module based on RDF::Core.