Catman...BibTeX(3pm)
π Catman...BibTeX β the tea β
ok so bestie, you found the manual page for Catmandu::Exporter::BibTeX (that's the Catman...BibTeX(3pm) one, yep yep), and honestly? it's giving "export your data as BibTeX and look cute doing it." no cap. let's get into it π
β¨ NAME β¨
Catmandu::Exporter::BibTeX β a BibTeX exporter. that's it, that's the name, she's an exporter and she's iconic for it π
πΈ SYNOPSIS πΈ
ok so here's the vibe, literally copy-paste coded:
use Catmandu::Exporter::BibTeX;
my $exporter = Catmandu::Exporter::BibTeX->new(fix => 'myfix.txt');
$exporter->add_many($arrayref);
$exporter->add_many($iterator);
$exporter->add_many(sub { });
$exporter->add($hashref);
$exporter->add({
type => 'book',
_citekey => '389-ajk0-1',
title => 'the Zen of {CSS} design',
author => ['Dave Shea','Molley E. Holzschlag'],
isbn => '0-321-30347-4'
});
printf "exported %d objects\n" , $exporter->count;
like, you make one, you feed her $arrayrefs or $iterators or even a sub { } (main character energy), you add a $hashref, and then you flex your count with a printf. periodt. π₯
π¦ DESCRIPTION π¦
ngl, the BibTeX Catmandu::Exporter wants one thing from you: a Perl hash (or a fix, if that's your thing) packed with BibTeX fields and values β and those values can be a string or an array reference. that's the whole assignment bestie π«Ά
π SUPPORTED FIELDS π
Two special fields can be set in the Perl hash, and they're the ones running the show:
"type"or"_type"β this describes the document type (article,book, ...). and if you don't say anything? it's set to'misc'by default. she's got a fallback, she's prepared π"_citekey"or"_id"β this describes the citation key. if you don't hand one over, the next counter value (starting from1) is used by default. so like, she'll number them for you, no stress π
and now the moment you've all been waiting for β the following BibTeX fields are supported. every other field? ignored. sorry not sorry π
abstract
address
author
booktitle
chapter
day
edition
editor
eprint
howpublished
institution
isbn
issn
journal
keywords
language
location
month
note
number
organization
pages
publisher
school
series
title
type
url
doi
volume
year
that's the whole list, don't skip a single one, she notices β¨
π SEE ALSO π
wanna expand a date field with year, month, and day into the corresponding BibTeX fields? use Catmandu::Fix::expand_date. it's the glow-up your dates deserve π
ok that's the whole page bestie, you're officially a BibTeX exporter expert, go forth and slay π§
and a lil sign-off for the credits stans: this page is from perl v5.36.0, dated 2023-02-02, and it lives in the Catman...BibTeX(3pm) section of the User Contributed Perl Documentation. iykyk π
π¦ where this page comes from
- debian bookworm: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-bibtex-perl 0.21-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-bibtex-perl 0.21-2 Β· 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