RDFNS(1p)

πŸ“¦
this version Β· 4 versions
, in debian trixie, ubuntu noble, ubuntu questing

πŸ’– RDFNS(1p) β€” the people's namespace looker-upper πŸ’–

okay bestie, so you know how namespaces are like... everywhere and lowkey a nightmare to remember? yeah. this is the tool that fixes that. it's rdfns, a lil Perl script from the User Contributed Perl Documentation corner of the manual-verse, and it's literally here to find namespaces for you in, like, every format ever invented. ✨


🌈 SYNOPSIS 🌈

she does a lot. here's the whole vibe menu, no cap:

# look up namespaces in several formats
$ rdfns foaf.xmlns foaf.n3 dbpedia.sparql foaf.json

# look up a prefixed URI
$ rdfns rdfs:seeAlso

# look up multiple URIs at a given version
$ rdfns 20111102 foaf,owl.ttl

# lookup preferred prefix
$ rdfns http://www.w3.org/2003/01/geo/wgs84_pos#

# create short name of an URL
$ rdfns http://purl.org/dc/elements/1.1/title

# map prefix to preferred prefix
$ rdfns wgs.prefix

# show all options and some examples
$ rdfns --help

# show version
$ rdfns --version

# list available dates
$ rdfns --dates

the way she just does all of that πŸ’… periodt.


πŸŽ€ FORMATS πŸŽ€

okay so this is the part where it gets iconic. you tell her the file extension and she speaks that language back to you. every single one, here we go:

  • ttl, n3, notation3 β€” RDF/Turtle or Notation3 syntax, the classic:
@prefix foaf: <http://xmlns.com/foaf/0.1/> .
  • sparql β€” SPARQL syntax, for when you're feeling query-ful:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
  • txt β€” Tabulator-separated, plain and simple:
foaf http://xmlns.com/foaf/0.1/
  • xmlns β€” XML namespace declaration, for the XML girlies:
xmlns:foaf="http://xmlns.com/foaf/0.1/"
  • json β€” JSON key-values, for instance for JSON-LD. Multiple entries are comma-separated, bestie, don't forget:
"foaf": "http://xmlns.com/foaf/0.1/"
  • beacon β€” BEACON format syntax:
#PREFIX: http://xmlns.com/foaf/0.1/
  • prefix β€” Maps a prefix to its preferred form, this is the shortest and first in alphabetical order. For instance rdfns wgs84.prefix returns prefix geo. she's picking the main character prefix for you 🫢

πŸ‘‘ SEE ALSO πŸ‘‘

This script is internally implemented in App::rdfns, based on RDF::NS. so like, if you wanna go deeper than the script itself, that's where the lore lives. iykyk. πŸ’œ


that's the whole page, bestie!! go look up some namespaces and slay πŸ’–βœ¨πŸŒΈ

with love from perl v5.38.2, dated 2024-01-21 β€” yeah she's been around a minute and she still ate πŸŽ€

πŸ“¦ where this page comes from