Skip to contents

Convert an OpenAlex parquet corpus (produced by openalexPro) into bibliography formats via Pandoc: CSL JSON, BibTeX, BibLaTeX, Markdown, LaTeX, HTML, or PDF, and into Zotero.

Installation

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

Pandoc must be installed and on your PATH (or installed via install.packages("rmarkdown") which bundles Pandoc on most platforms).

Quick start

library(openalexConvert)

# 1. Convert an openalexPro parquet corpus to CSL JSON
corpus_to_csljson(
  corpus = "path/to/parquet",
  output = "path/to/csljson"
)

# 2. Convert CSL JSON directory to BibTeX
csljson_convert_pandoc(
  input  = "path/to/csljson",
  output = "path/to/bibliography.bib",
  to     = "bibtex"
)

Zotero

With the Zotero desktop app (Zotero 10) running, select the target library or collection in Zotero, then:

# 3. Import the CSL JSON into Zotero; the OpenAlex ID goes into Extra
csljson_to_zotero("path/to/csljson")
# or both steps in one, into the collection <project> > <corpus>:
corpus_to_zotero("path/to/project")

# 4. After tagging in Zotero: read the tags back, by OpenAlex ID
zotero_tags("path/to/project")  # writes path/to/project/zotero_tags.parquet

Documentation

Full documentation and vignettes: https://openalexpro.github.io/openalexConvert/