Problem or Motivation
Users cannot fix missing or low-quality assets after initial paper ingest. Common scenarios:
- Downloaded PDF is corrupted or scan-only → need to attach better PDF
- arXiv paper had no LaTeX source → want to attach
.tex files later
- Want to regenerate summaries/equations after attaching new source
Proposed Solution
Add papi attach command:
papi attach PAPER --pdf /path/to/better.pdf
papi attach PAPER --source /path/to/main.tex
papi attach PAPER --pdf new.pdf --regen auto
Options
--pdf PATH: Replace PDF file
--source PATH: Add/replace LaTeX source (file or directory)
--regen {auto,equations,summary,tags,tldr,all}: Regenerate artifacts after attachment
auto: regenerate only what the new attachment enables (e.g., equations from LaTeX)
- Specific: regenerate only specified artifact
all: regenerate everything
--backup: Create backup before replacement (default: true)
Implementation
Complexity: LOW — straightforward file operations + meta.json updates
- Validate paper exists in index
- Backup existing files if
--backup (default)
- Copy new files to
~/.paperpipe/papers/{name}/
- Update
meta.json with new file paths/metadata
- Run regeneration if
--regen specified
- Update index
Alternatives Considered
- Re-run
papi add with new files — would require delete + re-add, losing metadata
- Manual file replacement — error-prone, doesn't update
meta.json
Area
CLI commands
Problem or Motivation
Users cannot fix missing or low-quality assets after initial paper ingest. Common scenarios:
.texfiles laterProposed Solution
Add
papi attachcommand:Options
--pdf PATH: Replace PDF file--source PATH: Add/replace LaTeX source (file or directory)--regen {auto,equations,summary,tags,tldr,all}: Regenerate artifacts after attachmentauto: regenerate only what the new attachment enables (e.g., equations from LaTeX)all: regenerate everything--backup: Create backup before replacement (default: true)Implementation
Complexity: LOW — straightforward file operations +
meta.jsonupdates--backup(default)~/.paperpipe/papers/{name}/meta.jsonwith new file paths/metadata--regenspecifiedAlternatives Considered
papi addwith new files — would require delete + re-add, losing metadatameta.jsonArea
CLI commands