Created
August 29, 2008 21:39
-
-
Save sr/8062 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix : <http://purl.org/net/sr/card#> . | |
@prefix esca: <http://purl.org/net/escalope#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix dc: <http://purl.org/dc/elements/1.1/> . | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> . | |
@prefix bio: <http://purl.org/vocab/bio/0.1/> . | |
@prefix rel: <http://purl.org/vocab/relationship/> . | |
<http://purl.org/net/sr/card> a foaf:PersonalProfileDocument; | |
dc:description "Informations about Simon Rozet"@en; | |
foaf:maker :sr; | |
foaf:primaryTopic :sr . | |
:me a foaf:Person; | |
rdfs:label "Simon Rozet"; | |
foaf:name "Simon Rozet"; | |
foaf:nick "sr", "srt"; | |
foaf:gender "make"; | |
foaf:birthday "07-04"; | |
bio:event [ | |
a bio:Birth; | |
bio:date "2007-07-04"; | |
bio:place "Brussels, Belgium"; | |
]; | |
foaf:based_near [ | |
a geo:Point; | |
geo:lat "50.833"; | |
geo:long "4.333" | |
]; | |
foaf:member esca:escalope; | |
foaf:jabberID <xmpp:[email protected]>; | |
foaf:mbox <mailto:[email protected]>; | |
foaf:mbox_sha1sum "41fe8930f135d27b9117e8c724c705a47c4a5962"; | |
foaf:openid <http://simon.rozet.name>, <http://srt.pip.verisignlabs.com>; | |
foaf:homepage <http://simon.rozet.name>, <http://atonie.org>; | |
foaf:weblog <http://omnifaria.com>, <http://atonie.org/journal>, <http://atonie.org/notes>; | |
foaf:interest | |
<http://dbpedia.org/page/Ruby_on_Rails>, | |
<http://dbpedia.org/page/Ruby_%28programming_language%29>, | |
<http://dbpedia.org/page/Semantic_Web>, | |
<http://dbpedia.org/page/Philosophy>, | |
<http://dbpedia.org/page/Middle-Ages>, | |
<http://dbpedia.org/page/Getting_Things_Done>, | |
<http://dbpedia.org/page/RDFa>, | |
<http://dbpedia.org/page/Microformat>, | |
<http://getsemantic.com>; | |
foaf:holdsAccount [ | |
a foaf:OnlineAccount, | |
foaf:OnlineChatAccount; | |
foaf:accountName "sr"; | |
foaf:accountServiceHomepage <http://www.freenode.net/irc_servers.shtml> | |
]; | |
foaf:holdsAccount [ | |
a foaf:OnlineAccount; | |
foaf:accountName "simonrozet"; | |
foaf:accountServiceHomepage <http://del.icio.us> | |
]; | |
foaf:holdsAccount [ | |
a foaf:OnlineAccount; | |
foaf:accountName "srt"; | |
foaf:accountServiceHomepage <http://twitter.com> | |
]; | |
foaf:holdsAccount [ | |
a foaf:OnlineAccount; | |
foaf:accountName "srzt"; | |
foaf:accountServiceHomepage <http://last.fm> | |
] . | |
esca:sunny a foaf:Person; | |
foaf:name "Sunny Ripert"; | |
foaf:homepage <http://sunfox.org>; | |
is foaf:knows of :me; | |
rel:hasMet :me . | |
esca:hima a foaf:Person; | |
foaf:name "Audrey"; | |
foaf:homepage <http://adylk.net>; | |
is foaf:knows of :me; | |
rel:hasMet :me . | |
esca:naps a foaf:Person; | |
foaf:name "Antoine Milet"; | |
foaf:homepage <http://inaps.org>; | |
is foaf:knows of :me; | |
rel:hasMet :me . | |
esca:webs a foaf:Person; | |
foaf:name "Jordan Bracco"; | |
foaf:homepage <http://lifeisdead.net>; | |
foaf:nick "webs"; | |
is foaf:knows of :me; | |
rel:hasMet :me . | |
:david a foaf:Person; | |
foaf:name "David Larlet"; | |
foaf:homepage <http://larlet.fr>; | |
foaf:homepage <http://wwww.biologeek.com>; | |
foaf:weblog <http://www.biologeek.com/journal>; | |
is foaf:knows of :me . | |
:greg a foaf:Person; | |
foaf:name "Gregory Brown"; | |
foaf:mbox <mailto:[email protected]>; | |
foaf:homepage <http://www.oreillynet.com/pub/au/2593>; | |
is foaf:knows of :me; | |
is rel:apprenticeTo of :me; | |
rel:mentorOf :me . | |
<http://simon.rozet.name> dc:title "Homepage of Simon Rozet" . | |
esca:us dc:title "Escalope Group"; | |
dc:description "We are in ur meadow stealing ur grass" . | |
<http://getsemantic.com> dc:title "Get Semantic.com"; | |
dc:lang "en"; | |
dc:description """GetSemantic has three main purposes: | |
* providing great documentation about Semantic Web technologies | |
* engage in advocacy - help people advocate for Semantic Web technologies and respond to misconceptions | |
* provide a community of people to help develop unofficial standards and solutions"""@en . | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@prefix : <#> . | |
@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> . | |
@prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#> . | |
@prefix log: <http://www.w3.org/2000/10/swap/log#> . | |
@prefix string: <http://www.w3.org/2000/10/swap/string#> . | |
@prefix dc: <http://purl.org/dc/elements/1.1/> . | |
@prefix foaf: <http://xmlns.com/foaf/0.1/> . | |
@prefix home: <http://infomesh.net/2001/home#> . | |
@prefix bio: <http://purl.org/vocab/bio/0.1/> . | |
@prefix card: <http://purl.org/net/sr#> . | |
<> dc:description """Converts a FOAF file into HTML using a bit of CWM magic. | |
To run it, use: | |
cwm.py home.n3 hometoxhtml.n3 --think --strings > home.html | |
"""@en; | |
rdf:seeAlso <http://infomesh.net/sbp/home.n3>; | |
rdf:seeAlso <http://infomesh.net/sbp/home2xhtml.n3> . | |
{ ?x a :TargetDocument; log:semantics ?sema } => { ?sema a :Target } . | |
# or, scrape the semantics into the current document (seems to exclude rules):- | |
{ ?x a :TargetDocument; log:semantics ?sema . ?sema log:includes { :s :p :o } } | |
=> { :s :p :o } . | |
## who I am | |
{ card:me foaf:name ?name . | |
("""<h1>""" "Homepage of " ?name """</h1>""") string:concatenation ?o . | |
} | |
=> { :o1 log:outputString ?o } . | |
## Date and place of birth | |
{ | |
card:me bio:event ?e . | |
?e a bio:Birth; | |
bio:place ?place; | |
bio:date ?date . | |
("""\n<p>Born in """ ?place " on " ?date """</p>""") string:concatenation ?o . | |
} | |
=> { :o2 log:outputString ?o } . | |
## Contact | |
## @@ how to remove uri-schema from an uri? | |
{ card:me foaf:mbox ?email . | |
card:me foaf:jabberID ?jabber . | |
( | |
"<h2>How to get in touch</h2>" | |
"<ul>" | |
"<li>Email: " | |
"""<a href=\"""" ?email "\">" "[email protected]" "</a>" | |
"</li>" | |
"<li>Jabber: " | |
"""<a href=\"""" ?jabber "\">" "[email protected]" "</a>" | |
"</li>" | |
"<li>Idling on " | |
"<a href=\"irc://irc.freenode.net/escalope\">#escalope @ freenode</a> as <strong>sr</strong>" | |
"</li>" | |
"</ul>" | |
) string:concatenation ?o . | |
} | |
=> { :o3 log:outputString ?o } . | |
# People I know | |
:o4 log:outputString "<h2>People I know</h2><ul>" . | |
{ ?person is foaf:knows of card:me . | |
( | |
"<li>" | |
"<a href=\"""" [ is log:uri of ?person.foaf:homepage ] """\">""" | |
?person.foaf:name | |
"</a>" | |
"</li>" | |
) string:concatenation ?o . | |
} | |
=> { :o5 log:outputString ?o } . | |
:o6 log:outputString "</ul>" . | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
all: rdf html | |
rdf: card.n3 | |
cwm.py card.n3 --rdf > card.rdf | |
html: head.html foot.html card.n3 foaf2html.n3 | |
cat head.html > index.html | |
cwm.py card.n3 foaf2html.n3 --think --strings >> index.html | |
cat foot.html >> index.html | |
clean: | |
rm -f card.rdf | |
rm -f index.html |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment