Catman...Zotero(3pm)

πŸ¦‹ NAME πŸ¦‹

Catmandu::Importer::Zotero β€” bestie, it imports records straight from Zotero web. That's the whole job. It's a Perl module, so we're living in Catman...Zotero(3pm) territory. πŸ’…


✨ SYNOPSIS ✨

Okay so here's how you actually use it, two ways. First from the command line (yes, the comment is in there twice, that's canon, don't @ me):

# From the command line
# From the command line
$ catmandu convert Zotero --userID <userID> to JSON
$ catmandu convert Zotero --groupID <groupID> to JSON

And then from Perl, if you're feeling ✨programmer✨:

# From Perl
use Catmandu;

my $importer = Catmandu->importer('Zotero', userID => '...');

$importer->each(sub {
   my $item = shift;
   print "%s %s\n", $item->{_id} , $item->{title}->[0];
});

πŸŽ€ CONFIGURATION πŸŽ€

Every knob you can turn, no gatekeeping:

  • userID β€” your user identifier, which you go grab at <https://www.zotero.org/settings/keys>. It's required unless groupID is set, so pick one bestie, you can't have neither.
  • groupID β€” the group identifier. It's the numeric part of the RSS library feed of a group.
  • collectionID β€” the collection key, which is an alphanumeric identifier.
  • apiKey β€” your Zotero API key, for when you want authenticated access. πŸ‘‘
  • sort β€” sort by "dateAdded", "dateModified" (that's the default, lowkey the fav), "title", "creator", "type", "date", "publisher", "publicationTitle", "journalAbbreviation", "language", "accessDate", "libraryCatalog", "callNumber", "rights", "addedBy", or "numItems".
  • direction β€” either "asc" or "desc". Which way we vibing.
  • itemKey β€” a comma-separated list of item keys. Heads up: it's valid only for item requests, and you can specify up to 50 items in a single request. Fifty. That's the cap. 🫢
  • itemType β€” item type search. The boolean search syntax lives over at <https://www.zotero.org/support/dev/web_api/v3/basics#search_syntax>, go read it iykyk.
  • q β€” quick search! It searches titles and individual creator fields, or literally all fields if qmode is set to "everything".
  • qmode β€” "titleCreatorYear" (the default) or "everything".
  • since β€” only returns objects modified after the specified library version. Fresh stuff only. ✨
  • tag β€” tag search. Supports Boolean search just like item type search does.

πŸ’œ DESCRIPTION πŸ’œ

This Catmandu::Importer imports bibliographic data from Zotero <https://www.zotero.org>, the reference management service. It's giving citation girlboss. πŸ“š


🌈 SEE ALSO 🌈

Go peek at these too, they're the friend group:

  • WWW::Zotero
  • Catmandu::Importer
  • Catmandu::Iterable

That's the whole page, bestie β€” written up for perl v5.36.0 and dated 2023-02-05. Go import something iconic. πŸ’–βœ¨

πŸ“¦ where this page comes from