OpenGuides::RDF(3pm)
π¦ OpenGuides::RDF π
okay bestie, so this is OpenGuides::RDF β a Perl module from the User Contributed Perl Documentation corner of the world, and she's here to make RDF/XML happen for OpenGuides. let's get into it, no cap.
β¨ NAME β¨
OpenGuides::RDF β an OpenGuides plugin that outputs RDF/XML. that's the whole vibe. π
πΈ DESCRIPTION πΈ
She does all the RDF stuff for OpenGuides, periodt. She's distributed and installed as part of the OpenGuides project, so likeβ¦ she is not meant for independent installation. she's not a solo artist, she's in the band. π
real talk: this documentation is probably only useful to OpenGuides developers. if that's not you, that's okay, you can still read it for fun, i'm not gonna stop you π«Ά
β¨ SYNOPSIS β¨
use Wiki::Toolkit;
use OpenGuides::Config;
use OpenGuides::RDF;
my $wiki = Wiki::Toolkit->new( ... );
my $config = OpenGuides::Config->new( file => "wiki.conf" );
my $rdf_writer = OpenGuides::RDF->new( wiki => $wiki,
config => $config );
# RDF version of a node.
print "Content-Type: application/rdf+xml\n\n";
print $rdf_writer->emit_rdfxml( node => "Masala Zone, N1 0NU" );
look at her go. iconic. π₯
π METHODS π
new
my $rdf_writer = OpenGuides::RDF->new( wiki => $wiki,
config => $config );
wiki must be a Wiki::Toolkit object, and config must be an OpenGuides::Config object. Both arguments are mandatory β no skipping, bestie, she will not accept vibes in place of arguments. π
emit_rdfxml
$wiki->write_node( "Masala Zone, N1 0NU",
"Quick and tasty Indian food",
$checksum,
{ comment => "New page",
username => "Kake",
locale => "Islington" }
);
print "Content-Type: application/rdf+xml\n\n";
print $rdf_writer->emit_rdfxml( node => "Masala Zone, N1 0NU" );
okay so note: some of the fields emitted by the RDF/XML generator are pulled straight from the node metadata. The form of this metadata is not mandated by Wiki::Toolkit. Your wiki application should make sure to store some or all of the following metadata when calling write_node:
postcodeβ the postcode or zip code of the place discussed by the node. Defaults to the empty string.cityβ the name of the city that the node is in. If not supplied, then the value ofdefault_cityin the config object supplied tonew, if available, otherwise the empty string.countryβ the name of the country that the node is in. If not supplied, then the value ofdefault_countryin the config object supplied tonewwill be used, if available, otherwise the empty string.usernameβ an identifier for the person who made the latest edit to the node. This person will be listed as a contributor (Dublin Core). Defaults to empty string.localeβ the value of this can be a scalar or an arrayref, since some places have a plausible claim to being in more than one locale. Each of these is put in as aNeighbourhoodattribute.phoneβ only one number supported at the moment. No validation.websiteβ no validation.opening_hours_textβ a freeform text field.
lowkey important: locale really can be a scalar or an arrayref. don't @ me, that's just what she does. π
π SEE ALSO π
Wiki::Toolkit- <http://openguides.org/>
- <http://chefmoz.org/>
π AUTHOR π
The OpenGuides Project (openguides-dev@lists.openguides.org)
π COPYRIGHT π
Copyright (C) 2003-2013 The OpenGuides Project. All Rights Reserved.
This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. π
β CREDITS β
Code in this module written by Kake Pugh and Earle Martin. Dan Brickley, Matt Biddulph and other inhabitants of #swig on irc.freenode.net gave useful feedback and advice. π«Ά
and that's the whole page, bestie!! she's from perl v5.32.0, dated 2021-01-30, and she ate. π β¨ mwah.
π¦ where this page comes from
- debian bookworm: openguides 0.84-1
- ubuntu jammy: openguides 0.84-1
- ubuntu noble: openguides 0.84-1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms