openalexPro/openalexConvert: openalexConvert 0.1.0
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 writesOpenAlex: W…as the first line ofnote, 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").updatewrites new metadata and keeps fields it lacks;overwritereplaces 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. fromzotero_tags.parquet). New items get theirs; existing items followexisting(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
Additional details
Related works
- Is supplement to
- Software: https://github.com/openalexPro/openalexConvert/tree/v0.1.0 (URL)
Software
- Repository URL
- https://github.com/openalexPro/openalexConvert