| name | import-papers |
| description | Process PDFs in research/dump/, extract metadata, generate bibtex entries, and move files to research/papers/. Use when importing research papers or managing a paper bibliography. Only applies inside a checkout that has research/dump/ and research/papers.bib, and requires the pdftotext CLI (poppler-utils) — skip on hosts without them. |
Import Papers Skill
Process all PDFs in research/dump/, create bibtex entries, and move them to research/papers/.
Instructions
For each PDF in research/dump/:
-
Extract metadata using pdftotext (first 30 lines only to avoid context overload):
pdftotext "filename.pdf" - 2>&1 | head -30
-
Identify:
- Title (full, not truncated)
- Authors (first few primary authors)
- Year (infer from content or use the current year for recent papers)
- Venue (if clearly stated: conference/journal)
-
Generate citation key using format: firstauthorYEARkeyword
- Use lowercase only
- First author's last name
- Year
- One descriptive keyword from title
- Examples:
ren2015faster, choi2024neuromamba, park2024processing
-
Create bibtex entry matching existing format in research/papers.bib:
@article{citationkey,
author = {Author One and Author Two and Author Three},
ejournal = {arXiv},
title = {Full Paper Title},
url = {https://arxiv.org/abs/XXXX.XXXXX},
year = {YYYY}
}
Use @inproceedings if it's a conference paper (like NIPS, ICML, etc.) with:
@inproceedings{citationkey,
author = {Authors},
booktitle = {Conference Name},
title = {Title},
year = {YYYY}
}
-
Append to papers.bib:
cat >> research/papers.bib << 'EOF'
@article{citationkey,
...
}
EOF
-
Move and rename PDF to research/papers/:
mv "research/dump/original.pdf" "research/papers/citationkey.pdf"
-
Handle duplicates: If two PDFs are identical (same title), keep only one.
-
Verify after processing all files:
- List moved files:
ls -1 research/papers/ | tail -10
- Check dump is empty:
ls -1 research/dump/*.pdf 2>/dev/null || echo "empty"
-
Run bibify.py to update the changelog and sync with Google Drive:
./bin/bibify.py
If the output contains Missing notes for, run bibify a second time — newly uploaded papers need a second pass to generate their note stubs.
Important Notes
- DO NOT read entire PDFs - only extract first 30 lines to save context
- Process all PDFs in a batch, not one at a time
- For generic filenames like
paper.pdf, check content for actual title
- Follow existing bibtex format exactly (check
research/papers.bib for examples)
- Use consistent naming: lowercase, no special characters in citation keys