HTML::...::hAtom(3pm)
β¨ HTML::Microformats::Format::hAtom β the hAtom microformat β¨
okay bestie, listen up β this is the HTML::...::hAtom(3pm) page from the User Contributed Perl Documentation, and it's all about pulling hAtom out of your HTML like the main character you are. π
πΈ SYNOPSIS πΈ
Here's the vibe, copy-paste and go:
use Data::Dumper;
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hAtom;
my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @feeds = HTML::Microformats::Format::hAtom->extract_all(
$dom->documentElement, $context);
foreach my $feed (@feeds)
{
foreach my $entry ($feed->get_entry)
{
print $entry->get_link . "\n";
}
}
no cap, that's the whole thing. π
π¦ DESCRIPTION π¦
HTML::Microformats::Format::hAtom inherits from HTML::Microformats::Format. So if you're wondering about the property getter/setter methods, the constructors, all that good stuff β go read the base class definition, bestie, it's all described over there. π«Ά
π Additional Method π
to_atomβ this method exports the data as an XML file containing an Atom<feed>. It needsXML::Atom::FromOWLto work, and it will throw an error at run-time if it's not available. So like, don't be surprised. π
π MICROFORMAT π
HTML::Microformats::Format::hAtom supports hAtom exactly as described at http://microformats.org/wiki/hatom, plus these extra lil additions:
- Embedded rel-enclosure microformat β hAtom entries may use rel-enclosure to specify entry enclosures. π
- Threading support β the group-chat energy is built in, fr fr:
- An entry may use
rel="in-reply-to"to indicate another entry or a document that this entry is considered a reply to. π¬ - An entry may use
class="replies hfeed"to provide an hAtom feed of responses to it. π
- An entry may use
π RDF OUTPUT π
Data is returned using Henry Story's AtomOWL vocabulary (http://bblfish.net/work/atom-owl/2006-06-06/#), Toby Inkster's AtomOWL extensions (http://buzzword.org.uk/rdf/atomix#) and the IANA registered relationship URIs (http://www.iana.org/assignments/relation/). iconic trio honestly β
π BUGS π
Please report any bugs to http://rt.cpan.org/. not me asking you to snitch on the bugs but yes, exactly that π
π SEE ALSO π
HTML::Microformats::FormatHTML::MicroformatsHTML::Microformats::Format::hEntryHTML::Microformats::Format::hNews
the whole friend group, love that for them π
π§ AUTHOR π§
Toby Inkster <tobyink@cpan.org>. king behavior π
π COPYRIGHT AND LICENCE π
Copyright 2008-2012 Toby Inkster
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
π₯ 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.
read it and weep, bestie β no promises were made. π
and that's a wrap! π This lil gem shipped with perl v5.32.1, dated 2021-09-12, and it lives its best life as HTML::...::hAtom(3pm). slay, go extract some feeds β¨π¦π
π¦ where this page comes from
- debian bookworm: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu jammy: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libhtml-microformats-perl 0.105-6 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms