Skip to content

Replace JabRef publication export with a deterministic Python tool #15

Description

@memming

Problem

Publication pages (publications.html, publications_apa.html) are generated from bib_export/catniplab.bib via bib_export/p.sh, which drives the JabRef desktop app in CLI mode. This is fragile:

  • CLI -o export hangs when no JabRef GUI instance is running (blocks on the single-instance remote handshake; 0% CPU), and silently writes nothing when a GUI instance is running (job handed to the running instance, which does not export). Observed JabRef 5.15 / macOS, 2026-08-08.
  • Depends on GUI-registered custom export formats (CATNIP / CATNIP-APA) stored in the un-versioned Java prefs backend — lost on upgrade/machine change.

JabRef here is only a templating engine over BibTeX. Replace it with a small, deterministic, testable Python tool (no GUI).

Deliverable

A Python tool (run via uv) that reads catniplab.bib and writes publications.html (CATNIP searchable/sortable table) + publications_apa.html (APA hanging-indent list, year-desc). Then point p.sh at it.

Spec + golden testcase (already on the branch)

Branch: feat/python-pub-export

  • bib_export/PUBLICATION_EXPORT_SPEC.md — full reverse-engineered rendering contract (author formatting table vs APA, \begin{field} conditionals, HTMLChars -> named entities, eprint archivePrefix mapping, page dashes, ordering, suggested deps, CLI, acceptance test).
  • bib_export/spec_testcase/ — matched input.bib -> expected/*.html pair extracted from the last clean co-generation (commit c3994a0), plus a layouts/ snapshot and README.

Acceptance criteria

  • Generate from spec_testcase/input.bib (footer date pinned to 05/06/2026) and match spec_testcase/expected/*.html — byte-exact ideally, else whitespace-normalized structural + text equality.
  • Hard cases pass: accented authors (Sagodi/Sokol/Gallego/de Polavieja), arXiv vs bioRxiv eprint links, DOI links, @inproceedings/@inbook/@misc, volume+number+pages, url-only entries.
  • Resolve the 1-entry discrepancy (171 rendered of 172; identify which entry JabRef drops — match or fix, and document).
  • Deterministic (freeze footer date); idempotent; runs offline via uv.
  • p.sh calls the Python tool; drop the JabRef launch/wait logic.

Guardrails

Publishing rules unchanged: regenerate -> test (docker.sh) -> explicit user confirmation -> commit + push to master (public site).

🤖 Generated with Claude Code

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions