Catman...er::RIS(3pm)
π NAME π
okay so bestie, <rainbow>Catmandu::Importer::RIS</rainbow> is literally the RIS importer β it's the glow-up your .ris files have been waiting for. This page lives in the User Contributed Perl Documentation, section 3pm (yep, it's a Perl module manual, iykyk). π
β¨ SYNOPSIS β¨
π₯οΈ Command line interface, bestie
catmandu convert RIS < input.txt
# Use the --human option to translate RIS tags into human readable strings
catmandu convert RIS --human 1 < input.txt
# Provide a comma separated mapping file to translate RIS tags
catmandu convert RIS --human mappings/my_tags.txt < input.txt
πͺ In Perl code, no cap
use Catmandu::Importer::RIS;
my $importer = Catmandu::Importer::RIS->new(file => "/foo/bar.txt");
my $n = $importer->each(sub {
my $hashref = $_[0];
# ...
});
like, look at that. $n is right there doing the work and everything π
πΈ CONFIGURATION πΈ
sep_charβ bestie, this one sets a field separator. That's it, that's the whole job. Set it, slay. π¦humanβ okay this one's giving main character energy. If you set it to1, then RIS tries to translate tags into human readable strings. But if you set it to a file name instead? Then RIS will read that file as a comma delimited list of tag/string translations. Obsessed. For example:
catmandu convert RIS --human mappings/my_tags.txt < input.txt
where mappings/my_tags.txt looks like:
A2,Secondary-Author
A3,Tertiary-Author
A4,Subsidiary-Author
AB,Abstract
AD,Author-Address
AF,Notes
.
.
.
(yes the dots are literally in the example, she's being a little mysterious about it and honestly? iconic.) β
π METHODS π
π«Ά new(file => $filename, fh => $fh , fix => [...])
Create a new RIS importer for $filename. And if you don't give it a filename? It just uses STDIN, no big deal, it's flexible like that. π
The constructor inherits the fix parameter from Catmandu::Fixable. So when you pass it, then any fix or fix script will be applied to imported items. Very demure, very mindful, very Catmandu::Fixable. β¨
π₯ count
π₯ each(&callback)
π₯ ...
Every Catmandu::Importer is a Catmandu::Iterable and literally all its methods are inherited. So all of those? Yours. Free. Periodt. π
π SEE ALSO π
Catmandu::Iterableβ go say hi, she's family π¦
okay that's the whole page bestie, you ate π stay hydrated, read your docs, and remember: RIS tags fear you. πβ¨
mwah π β this manual came from perl v5.36.0, dated 2023-02-04, and it's the Catman...er::RIS(3pm) page, aka Catmandu::Importer::RIS(3pm). bye bestie! π«ΆπΈ
π¦ where this page comes from
- debian bookworm: libcatmandu-ris-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- debian trixie: libcatmandu-ris-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu noble: libcatmandu-ris-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu resolute: libcatmandu-ris-perl 0.13-2 Β· Artistic-1.0-Perl OR GPL-1.0-or-later
- ubuntu stonking: libcatmandu-ris-perl 0.13-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