HTML::...species(3pm)
π HTML::Microformats::Format::species β the species microformat π
okay bestie, sit down, hydrate, because we're talking about HTML::Microformats::Format::species β a Perl module from the HTML::Microformats family (it lives in the 3pm man pages, if you were wondering where to find it). It does exactly one job and it does it slayfully: it pulls the species microformat out of your HTML. biology girlies, this one's for you π¦πΈ
β¨ SYNOPSIS β¨
here's the vibe, copy-paste ready:
use HTML::Microformats::DocumentContext;
use HTML::Microformats::Format::hCard;
my $context = HTML::Microformats::DocumentContext->new($dom, $uri);
my @objects = HTML::Microformats::Format::species->extract_all(
$dom->documentElement, $context);
foreach my $species (@objects)
{
print $species->get_binomial . "\n";
}
like. you build a context, you extract_all off the $dom->documentElement, and then for each lil species object you go grab get_binomial and print it. chef's kiss, no notes π
π DESCRIPTION π
HTML::Microformats::Format::species is a child class of HTML::Microformats::Format β it inherits everything from its parent, periodt. So if you're wondering about the property getter/setter methods, the constructors, all of that β¨ infrastructure β¨ β go read the base class definition, because it's all described there. this module is not gonna re-explain its mom's whole thing.
π§ MICROFORMAT π§
so, real talk: the species documentation over at <http://microformats.org/wiki/species> is very sketchy (that's a direct quote, bestie, we're not exaggerating). so this module is aiming to be roughly compatible with two things:
- the way the
speciesimplementation works in the Operator extension for Firefox - data published by the BBC and Wikipedia
and here are some brief notes on how it's been implemented:
- The root class name is
'biota'. π± - The important properties are
'vernacular'β which has the aliases'common-name','cname'and'fn'β plus'binomial','trinomial'and'authority'. - Also recognised:
'class','division','family','genus','kingdom','order','phylum','species'and various other ranks. (the whole taxonomy tree said hi π) - Because some of those property names are pretty generic (looking at you,
class), you can alternatively use them in a prefixed form:'taxo-class','taxo-division', etc. handy when the plain name would clash with something else. - If an element with class
'biota'has no recognised properties within it, then the entire contents of the element get taken as a binomial name. which is how you get extremely simple markup like this:
<i class="biota">Homo sapiens</i>
- The meaning of some terminology differs between botanists and zoologists π so you can add the class
'botany'or'zoology'to the root element to clarify which usage you mean. e.g.
<i class="biota zoology">Homo sapiens</i>
and here's a full example, look at her go:
<span class="biota zoology">
<i class="binomial">
<span class="genus">Homo</span>
<span class="species">sapiens</span>
<span class="subspecies">sapiens</span>
</i>
(<span class="authority">Linnaeus, 1758</span>)
a.k.a. <span class="vernacular">Humans</span>
</span>
genus, species, subspecies, authority, vernacular β all nested up in there. it's giving taxonomy Pinterest board. πΈ
π₯ RDF OUTPUT π₯
RDF output uses the Biological Taxonomy Vocabulary 0.2, which lives at <http://purl.org/NET/biol/ns#>. that's the namespace, bestie, write it down. π
π BUGS π
found a bug? please report any bugs to <http://rt.cpan.org/>. do it for the culture π«Ά
π SEE ALSO π
HTML::Microformats::FormatHTML::Microformats
go read the family, iykyk.
π AUTHOR π
Toby Inkster <tobyink@cpan.org>. iconic behavior, honestly.
β 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.
like, no promises, no cap. if it breaks, it breaks. π
and that's the whole page, bestie β this one came from perl v5.32.1 and the page itself is dated 2021-09-12. mwah π
β¨
π¦ 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