Skip to content

Add Zotpress citation conversion via Better BibTeX#111

Open
adaptiman wants to merge 2 commits into
devbean:mainfrom
adaptiman:feature/zotpress-citation-workflow
Open

Add Zotpress citation conversion via Better BibTeX#111
adaptiman wants to merge 2 commits into
devbean:mainfrom
adaptiman:feature/zotpress-citation-workflow

Conversation

@adaptiman

@adaptiman adaptiman commented Jun 24, 2026

Copy link
Copy Markdown

Summary

  • Adds pandoc-style citation conversion during publish, from [[@citekey]] to Zotpress shortcodes.
  • Resolves citekeys to Zotero item references using Better BibTeX JSON-RPC.
  • Supports both single and multiple inline citation output:
    • Single: [zotpressInText item="{libraryId:itemKey}"]
    • Multiple: [zotpressInText item="{libraryId:itemKey},{libraryId:itemKey}"]
  • Appends bibliography block (HR + H1 + shortcode) when needed:
    • Bibliography

    • [zotpressInTextBib]
  • Adds plugin settings and i18n strings for Zotpress and Better BibTeX configuration.
  • Updates README with setup requirements, behavior, and configuration guidance.

Requirements

  • WordPress Zotpress plugin installed and active.
  • Zotero desktop running locally.
  • Better BibTeX for Zotero installed and enabled.
  • Reachable Better BibTeX JSON-RPC endpoint (default: http://localhost:23119/better-bibtex/json-rpc).

Behavior and Fallback

  • If lookup succeeds, citekeys are converted to Zotpress tuples.
  • If some citekeys cannot be resolved, unresolved citations are left unchanged.
  • If Better BibTeX is unreachable, publish continues and warning notices are shown.

Validation

  • npm run build
  • Manual test: single citation conversion
  • Manual test: multiple citation conversion
  • Manual test: bibliography append block

Reviewer Checklist

  • Single citation shortcode format is correct.
  • Multiple citation shortcode format is correct.
  • Bibliography block appends only when appropriate.
  • Better BibTeX lookup failures do not block publish.
  • README setup instructions are accurate.

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