Re: [foaf-dev] [foaf-protocols] WebFinger
Toby A Inkster <
tai@...>
2009-08-15 17:44:15 GMT
On 15 Aug 2009, at 12:37, Toby A Inkster wrote:
> rel="http://xmlns.com/foaf/0.1/fingerpoint"
I've changed this to <http://ontologi.es/sparql#fingerpoint> to avoid
minting URIs on danbri's domain name!
> I've just implemented this for my own domain experimentally. Given
> that I already had a SPARQL endpoint, it took roughly 30 seconds to
> implement.
Attached is a quick implementation of the client side in Perl. It
uses the standard Digest::SHA1, JSON, LWP::UserAgent and URI modules
from CPAN, plus an HTTP::Link::Parser module that I threw together
out of old bits of parsing code I had lying around, and is bundled
into the file so you don't need to download it separately.
Excluding the HTTP::Link::Parser module, the script is about 50 lines
of code.
It can be run from the command line like this:
perl SemWebFinger.pl mail@...
And returns my WebID, easy-peasy
It's reasonably well-commented so it should just take a little SPARQL
knowledge to hack it into to returning other data about me, like my
name, my weblog URL, etc.
And as I said earlier, all the server needs to do is include this
HTTP header in requests for "/":
Link: </SPARQL_ENDPOINT>; rel="http://ontologi.es/sparql#fingerpoint"
--
--
Toby A Inkster
<mailto:mail@...>
<http://tobyinkster.co.uk>
_______________________________________________
foaf-dev mailing list
foaf-dev@...
http://lists.foaf-project.org/mailman/listinfo/foaf-dev