Biblio...::Utils(3pm)
π Biblio::Citation::Parser::Utils β bestie edition π
okay so real talk, this is the page for Biblio::Citation::Parser::Utils from the User Contributed Perl Documentation, and it's a 3pm manual, which is just fancy speak for "perl module docs". it lives in the Biblio...::Utils(3pm) slot in the manual lineup. and honestly? it's giving library science but make it cute. let's get into it π¦
β¨ NAME β¨
Biblio::Citation::Parser::Utils β OpenURL utility functions π
like. it's the lil helper toolbox for OpenURL stuff. that's the whole vibe.
πΈ DESCRIPTION πΈ
so this module is where the reference-metadata-to-OpenURL pipeline lives. it's got all the methods you need to take reference metadata and parse it into OpenURLs π
the tea though: they tried to make it 1.0 compliant, and like, they really did try, but there might still be errors in there. please let us know if there are! π bestie they're literally asking. don't be shy.
π METHODS π
π§Ό $openurl_hash = Biblio::Citation::Parser::Utils::trim_openurl($openurl)
you hand it a hash of metadata, it hands you back a hash containing only the valid OpenURL fields. that's it. it's the Marie Kondo of hashes β does this field spark OpenURL validity? no? then it's not staying. β¨
π§ $openurl_hash = Biblio::Citation::Parser::Utils::decompose_openurl($openurl)
okay this one is the main character fr fr. it's here to enrich an OpenURL metadata hash by throwing a whole bunch of parsing techniques at the fields. specifically:
- it decomposes dates into years, months, and days β if possible (no promises, it's doing its best π)
- it fills in the appropriate fields if SICIs are present
- it makes sure URLs, ISBNs, etc, are valid
and what do you get back? a pointer to a hash with the modified metadata, plus an array of errors (if any). so like, the receipts AND the drama. π«Ά
π $openurl = Biblio::Citation::Parser::create_openurl($metadata)
this one creates and returns an OpenURL from a metadata hash. slay. BUT β and this is important β no base URLs are prepended to this, so you gotta do that yourself before you go using it as a link. don't skip that step bestie, it's not optional.
also, heads up: URI::OpenURL should be used to generate OpenURLs in place of this function. so this one's more of a legacy icon than a go-to. iconic, but retired energy π
π $valid_isbn = Biblio::Citation::Parser::Utils::isbn_check(@isbn_chars)
simple lil function, no notes. you give it an array of ISBN characters, it returns true if it's a valid ISBN. that's the whole thing. clean, straightforward, we love her. π
ποΈ $sici_hash = Biblio::Citation::Parser::Utils::parse_sici($sici)
feed it a SICI string, and it returns a hash of information parsed out of it β including date information, issn numbers, etc. so much goodness extracted from one lil string, honestly obsessed. π
π§ $bici_hash = Biblio::Citation::Parser::Utils::parse_bici($bici)
not yet implemented!! π
so like, this is the placeholder. eventually it's gonna be the BICI alternative for parse_sici, but right now? it's a vibe and a dream. do not come for her, she's not ready. π
π $escaped_url = ParaTools::Utils::url_escape($string)
simple function to convert a string into an encoded URL (so like, spaces become %20, etc). takes the unencoded URL as a parameter, and returns the encoded version. tiny, useful, does exactly what it says on the tin. β
(note: yes, this one's namespaced under ParaTools::Utils, not Biblio::... β that's just how it is, don't @ me. π
)
π AUTHOR π
Mike Jewell <moj@ecs.soton.ac.uk> β thank you for your service king π«‘
and that's the whole page bestie!! this one's from perl v5.36.0, dated 2022-11-19, filed under Biblio...::Utils(3pm). go parse some references, stay valid, and remember: if you find a bug, tell them, they literally asked. bye pookie πβ¨ππ¦πΈ
π¦ where this page comes from
- debian bookworm: libbiblio-citation-parser-perl 1.10+dfsg-4 Β· GPL-2.0-or-later
- debian trixie: libbiblio-citation-parser-perl 1.10+dfsg-4 Β· GPL-2.0-or-later
- ubuntu noble: libbiblio-citation-parser-perl 1.10+dfsg-4 Β· GPL-2.0-or-later
- ubuntu resolute: libbiblio-citation-parser-perl 1.10+dfsg-4 Β· GPL-2.0-or-later
- ubuntu stonking: libbiblio-citation-parser-perl 1.10+dfsg-4 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms