XML::A...romOWL(3pm)

πŸ“¦
version 0.102 Β· 4 versions
, in debian bookworm, ubuntu noble

✨ NAME ✨

XML::Atom::FromOWL β€” bestie, this is the module that takes your RDF data and turns it into Atom. Exporting, slaying, the whole thing πŸ’…


πŸ¦‹ SYNOPSIS πŸ¦‹

okay so here's the vibe, literally copy-paste core:

use LWP::UserAgent;
use XML::Atom::OWL;
use XML::Atom::FromOWL;

my $ua       = LWP::UserAgent->new;
my $r        = $ua->get('http://intertwingly.net/blog/index.atom');
my $atomowl  = XML::Atom::OWL->new($r->decoded_content, $r->base);
my $model    = $atomowl->consume->graph;  ## an RDF::Trine::Model

my $exporter = XML::Atom::FromOWL->new;
print $_->as_xml
       foreach $exporter->export_feeds($model);

like. that's it. that's the whole flex 🌸


πŸ’– DESCRIPTION πŸ’–

This module reads RDF and writes Atom feeds. It's the reverse of XML::Atom::OWL, no cap β€” that one goes Atom ➑️ RDF, this one goes RDF ➑️ Atom. Iconic behaviour, honestly.

πŸŽ€ Constructor πŸŽ€

  • new(%options) β€” hands you back a shiny new XML::Atom::FromOWL object.

Real talk though: there are no valid options at the moment β€” the hash is just sitting there, reserved for future use. It's giving "placeholder main character" energy. πŸ™ˆ

🌈 Methods 🌈

  • export_feeds($input, %options) β€” returns a list of feeds found in the input, in no particular order (so don't come for me about ordering, bestie).

The $input can be a URI, a file name, an RDF::Trine::Model, or literally anything else that the parse function of RDF::TrineX::Functions can handle. It's flexible like that πŸ’…

Every item in the list you get back is an XML::Atom::Feed.

  • export_feed($input, $subject, %options) β€” same as export_feeds but it exports just a single feed. One (1) feed. Minimalist queen.

The $subject you pass in has to be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type awol:Feed. No random subjects, we're being picky ✨

  • export_entries($input, %options) β€” returns a list of entries found in the input, again in no particular order.

The $input may be a URI, a file name, an RDF::Trine::Model, or anything else the parse function of RDF::TrineX::Functions handles.

Each item in the list returned is an XML::Atom::Entry.

  • export_entry($input, $subject, %options) β€” as per export_entry but exports just a single entry. (yes, the original says export_entry there, I'm not gonna gaslight you β€” I'm keeping it exactly how it was written 🫢)

The $subject provided must be an RDF::Trine::Node::Blank or RDF::Trine::Node::Resource of type awol:Entry.

🧚 RDF Input 🧚

Input is expected to use AtomOwl β€” <http://bblfish.net/work/atom-owl/2006-06-06/#>. That's the lore, that's the source. πŸ“œ

πŸ“ Feed Output πŸ“

ngl, this module doesn't attempt to enforce many of OWL's semantic constraints β€” like, for example, it does not enforce that an entry has only one title. It just trusts XML::Atom::Feed and XML::Atom::Entry to handle that sort of thing. So if your input is sensible, that shouldn't be a problem. If your input is chaos... that's between you and your data, bestie 😭


πŸ‘‘ SEE ALSO πŸ‘‘

XML::Atom::OWL, HTML::Microformats, RDF::TrineX::Functions, XML::Atom::Feed, XML::Atom::Entry.

<http://bblfish.net/work/atom-owl/2006-06-06/>.

<http://www.perlrdf.org/>.

go read those, iykyk πŸ’œ


🌟 AUTHOR 🌟

Toby Inkster <tobyink@cpan.org>. Legend behaviour, honestly.


This software is copyright (c) 2011-2012 by Toby Inkster.

This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself. so like. go off πŸŽ€


⭐ DISCLAIMER OF WARRANTIES ⭐

THIS PACKAGE IS PROVIDED "AS IS" AND WITHOUT ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.

translation: no promises, no take-backs, no warranty. it is what it is πŸ’…


and that's the whole page, bestie 🫢 this was perl v5.34.0, dated 2022-06-28, for XML::Atom::FromOWL(3pm) β€” mwah, go export something pretty πŸ’–βœ¨πŸŒΈ

πŸ“¦ where this page comes from