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 needs XML::Atom::FromOWL to 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. πŸ”

πŸ‘‘ 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::Format
  • HTML::Microformats
  • HTML::Microformats::Format::hEntry
  • HTML::Microformats::Format::hNews

the whole friend group, love that for them πŸ’–


🧚 AUTHOR 🧚

Toby Inkster <tobyink@cpan.org>. king behavior πŸ‘‘


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