Skip to content

Add data-raw/regenerate_bib.R helper for vignettes/references.bib #69

@NewGraphEnvironment

Description

@NewGraphEnvironment

Problem

After v0.2.6, vignettes/references.bib is regenerated by hand
(rbbt::bbt_update_bib(...)) whenever [@key] markers change in
either regional vignette. Easy to forget. Render failures from
unresolved cites show up later than they should.

Scope

Add a small helper to formalize the regen recipe — option 1 of the
three discussed (the conservative one; doesn't break CI):

  • New data-raw/regenerate_bib.R — single command that reads both
    regional vignettes, detects the union of [@key] markers, and
    writes vignettes/references.bib via rbbt::bbt_bib(). Documents
    the prerequisites (Zotero running, BBT 9.x for Z8/9) inline.
  • HTML comment block at the top of each regional vignette pointing
    to the helper ("after editing cites, run Rscript data-raw/regenerate_bib.R"). HTML comments don't render.
  • One-line note in CLAUDE.md (Vignettes section) referencing the
    helper.

Out of scope

  • Embedding the rbbt call in YAML at render time (option 2 from the
    discussion) — would break CI which has no Zotero/BBT.
  • Pre-commit hook (option 3) — more involved; deferred.

Done when

  • data-raw/regenerate_bib.R exists, documented, runnable
  • Both vignettes have a top-of-file comment pointing to it
  • CLAUDE.md notes the helper
  • Running the helper on current main produces no diff (we're at
    18-key parity post-v0.2.6)
  • PR + release v0.2.7 (patch — tooling)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions