Skip to content

feat(ojs-underlay): export JOTE articles from OJS to Underlay records - #155

Draft
tefkah wants to merge 3 commits into
site-and-gatewayfrom
ojs-underlay
Draft

tefkah wants to merge 3 commits into
site-and-gatewayfrom
ojs-underlay

Conversation

@tefkah

@tefkah tefkah commented Nov 25, 2026

Copy link
Copy Markdown
Member

A first version of an exporter from OJS to Underlay, for publishing JOTE from OJS instead of PubPub. It writes the records the site already reads (Pub, Release, PubAttribution, Collection), so the site doesn't need to know where they came from.

apps/ojs-underlay, a Node CLI with no dependencies. Details in its README.

What it does

  • Reads published and scheduled submissions from the OJS REST API (written against 3.5, tolerant of 3.3). JOTE never publishes in OJS: accepted articles stay scheduled, so scheduled ones are exported too.
  • Maps them to records in PubPub's shape, with UUIDv5 ids from OJS ids and metadata.ojsSubmissionId. Sections become type tags, issues become issue collections, galleys become release downloads (PDF, LaTeX, BibTeX), an HTML galley becomes contentFile. abstractHtml and keywords are new on Release.
  • Matches every article to PubPub's export by DOI, so matched articles keep their PubPub id and slug. Two OJS submissions carry another article's DOI, so a DOI match whose titles share almost nothing falls back to a title match and keeps PubPub's DOI.
  • Writes the records, a summary and a report of where OJS and PubPub disagree (the list for backfilling OJS from PubPub).
  • --dry-run writes only. --push owner/slug pushes with Underlay's delta protocol, but only to a scratch collection: jote, jrn and blog are refused, so is any collection another app pushed to, and new ones are created private.

Run against a local OJS 3.5

74 scheduled articles (one test submission left out), all 74 matched to PubPub (2 of them by title). 99 galley files. Differences found, articles affected: title 13, authors missing or extra 7, author names 11, ORCID 19 (33 missing in OJS), affiliation 44, publication date 66 (63 have none in OJS), type 23, issue 21, DOI 2. 22 articles the site shows are on PubPub only, mostly the 2020 ones and their peer reviews.

Not pushed: the only Underlay key available is read-only. The push is tested against a fake Underlay.

Checks

tsc, vitest (28 tests), oxlint and oxfmt --check pass for the app. Record hashing reproduces all 724 record hashes of jote v2.2.0.

A CLI that reads published and scheduled submissions from the OJS REST
API and maps them to the Pub, Release, PubAttribution and Collection
records PubPub writes to Underlay. Articles, issues and type tags that
are already on PubPub keep their ids and slugs (matched by DOI, or by
title where OJS has another article's DOI). Writes the records, a
summary and an OJS against PubPub difference report, and can push to a
scratch collection with Underlay's delta protocol.
The scratch push could not run against Underlay (no write key), so a
test checks the session flow: private collection creation, asset
uploads, changed records only, deletes only with --prune, and the
refusals for live, public and foreign collections.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant