Catman...Inspire(3pm)

πŸ’– NAME πŸ’–

Catmandu::Importer::Inspire β€” okay bestie, it's the package that imports Inspire data from http://inspirehep.net/. That's it, that's the whole job, and she does it flawlessly πŸ’…


✨ SYNOPSIS ✨

Here's the vibe, copy it exactly, no cap:

use Catmandu::Importer::Inspire;

my %attrs = (
  id => '1203476',
  fmt => 'endnote',
);

my $importer = Catmandu::Importer::Inspire->new(%attrs);

my $n = $importer->each(sub {
  my $hashref = $_[0];
  # ...
});

Like… you make the importer, you hand her some %attrs, and then you each your way through every record like the main character you are πŸ¦‹


πŸŽ€ CONFIGURATION πŸŽ€

These are the attributes you can pass in, and they all eat, honestly:

  • id β€” grab a record by its Inspire ID. Drop the ID, get the record. Simple as πŸ“
  • doi β€” grab a record by its DOI, straight out of the Inspire database. Different key, same slay.
  • query β€” go feral and get results by an arbitrary query. You're the boss of this one πŸ’œ
  • fmt β€” the format she delivers in. Default is 'endnote'. The other formats are 'nlm', 'marc' and 'dc'. Choose wisely, they're all iconic in their own way ✨
  • limit β€” the maximum number of records. Default is 25. So if you don't say anything, you're getting 25 and that's the whole story 🫢
ngl bestie, limit defaults to 25, so if you wanted everything, you gotta say so out loud. She's not a mind reader πŸ’€

🌈 SEE ALSO 🌈

Go be nosy, these are all worth a peek:

  • Catmandu::Iterable
  • Catmandu::ArXiv
  • Catmandu::CrossRef

And that's the page, periodt πŸ’… This lil' beauty is Catman...Inspire(3pm) from the User Contributed Perl Documentation, running on perl v5.36.0 and dated 2023-02-04. Go forth and import, queen πŸ‘‘βœ¨

πŸ“¦ where this page comes from