There is a newer version of the record available.

Published October 27, 2026 | Version v0.1.0

openalexPro/openalexConvert: openalexConvert 0.1.0

Authors/Creators

  • 1. Swiss Institute of Bioinformatics

Description

Export a corpus to Zotero, and get your Zotero tags back. Full detail in NEWS.md.

Minor bump because csljson_to_zotero_upload() is removed (breaking).

Zotero export rewritten

csljson_to_zotero_upload() POSTed CSL JSON to the Zotero Web API, which only accepts Zotero item JSON, so real uploads could not succeed. It is replaced by:

  • csljson_to_zotero(files, method = c("local", "web")): imports CSL JSON into the running Zotero desktop app (Zotero 10) through its connector, so Zotero's own importer does the mapping. method = "web" errors "not implemented yet".
  • corpus_to_zotero(project_dir): corpus → temporary CSL JSON → Zotero in one call.
  • OpenAlex ID in Extra: corpus_to_csljson() now writes OpenAlex: W… as the first line of note, which Zotero imports into Extra. All four forms in use are read back (ours, Zotero's translator URL form, two community plugins).
  • Re-exports: existing = c("skip", "update", "overwrite"). update writes new metadata and keeps fields it lacks; overwrite replaces all fields. Both keep the item key, notes, attachments, tags and collections.
  • Collections: collection = c("project", "corpus") exports into a nested collection, created if missing and reused on re-export. Works already in the library join it too. corpus_to_zotero() uses <project> › <corpus> by default, so an accidental export is easy to find and delete.
  • Tags: tags = writes tags by OpenAlex ID (e.g. from zotero_tags.parquet). New items get theirs; existing items follow existing (skip / add / replace).
  • Speed: measured import times are in the help page. Zotero slows as the library grows (17.5 works/s at 440 items, 6.1 at 4,440), so 100,000 works take hours.

Tags back from Zotero

zotero_tags(project_dir) reads the tags of every item with an OpenAlex ID in the selected Zotero library into <project_dir>/zotero_tags.parquet (OpenAlex ID, tag, type, library, item key). Re-running replaces that library's rows and keeps other libraries'.

Fix: DuckDB lambda syntax

Current DuckDB rejects x -> … lambdas ("Deprecated lambda arrow (->) detected"), which broke corpus_to_csljson() and CI. It now uses lambda x: ….

Install

install.packages(
  "openalexConvert",
  repos = c("https://openalexpro.r-universe.dev", "https://cloud.r-project.org")
)

Files

openalexPro/openalexConvert-v0.1.0.zip

Files (1.7 MB)

Name Size
md5:c465d9c58a92571827e157c32c5e9907
1.7 MB Preview Download

Additional details

Related works