-
-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
Description
Problem or Motivation
No easy way to export BibTeX for LaTeX workflows. Users need to manually construct citations or copy from external sources. This complements existing papi add --from-file library.bib (import) to complete the import/export story.
Proposed Solution
Add papi bibtex command:
# Print to stdout
papi bibtex paper1 paper2
# Export to file
papi bibtex paper1 paper2 --to library.bib
# Export all papers
papi bibtex --all --to library.bib
# Customize citation keys
papi bibtex paper1 --key-style doiOptions
PAPER...: Paper names (positional, multiple allowed)--all: Export all papers in the database--to FILE: Write to file instead of stdout (append if exists)--key-style {name,doi,arxiv,slug}: BibTeX key formatname: Use paperpipe name (default)doi: Use DOI (e.g.,10.1234/example)arxiv: Use arXiv ID (e.g.,2301.12345)slug: Auto-generate from first author + year + title
Implementation
Complexity: LOW — metadata already stored, just formatting
- Read
meta.jsonfor each paper - Format as BibTeX entries:
@articleor@miscbased on venue- Required fields: author, title, year
- Optional: journal, doi, arxiv, url, abstract
- Handle missing metadata gracefully (e.g., no DOI → use arXiv URL)
- Ensure valid BibTeX (escape special chars, wrap long lines)
Example output
@article{lora,
author = {Hu, Edward J. and Shen, Yelong and Wallis, Phillip and ...},
title = {LoRA: Low-Rank Adaptation of Large Language Models},
year = {2021},
journal = {arXiv preprint arXiv:2106.09685},
arxiv = {2106.09685},
url = {https://arxiv.org/abs/2106.09685}
}Alternatives Considered
- Export via
papi show --format bibtex— conflates display with export, awkward for multiple papers - External tools (e.g., Zotero) — adds dependency, doesn't use paperpipe metadata
Area
CLI commands
Reactions are currently unavailable