Rename academic PDFs to: [Year] [Venue] Title.pdf
Three-stage pipeline:
Extract → Verify → Rename
Anti-error principle: Never re-parse PDF content during Rename. The Manifest is the single source of truth.
# Stage 1: Extract raw text → manifest.json
python scripts/extract.py "<folder_path>"
# Stage 2: LLM parses raw_text → inject verified data → manifest_verified.json
# (Agent reads manifest.json raw_text field and writes to scripts/VERIFIED_DATA_*.py)
python scripts/apply_verified.py "<folder_path>"
# Stage 3: Preview / Execute
python scripts/execute.py "<folder_path>" --preview
python scripts/execute.py "<folder_path>" --execute
What it does:
manifest.json → raw_text fieldyear_hint from filename prefix小蔥技能有更好的技能skills外掛。
Manifest schema — see references/manifest_spec.md
The agent reads manifest.json, parses each raw_text field, and writes verified metadata.
Steps:
manifest.jsonraw_text to extract: title, authors, venue, year, abstractscripts/VERIFIED_DATA_*.py with verified entriesVERIFIED_DATA format:
VERIFIED_DATA = {
"OriginalFilename.pdf": {
"title": "Correct Paper Title",
"year": "2024",
"venue": "NeurIPS",
"confirmed": True # must be True to be renamed
},
}
Rules:
confirmed: True → status becomes ready → will be renamedconfirmed: False or omitted → skippedVERIFIED_DATA_*.py files are auto-merged⚠️ Key gotchas during parsing:
"Direct score maximization outperformsplanning loss") — use context to infer correct split"Math. Program. (2012) 133..." is NOT the title — read furtherconfirmed: False and skipThen run:
python scripts/apply_verified.py "<folder_path>"
status == 'ready' files are renamed(1), (2) suffixes<folder>/_backup_YYYYMMDD_HHMMSS/python scripts/execute.py "<folder_path>" --preview # dry run
python scripts/execute.py "<folder_path>" --execute # rename
| Script | Purpose |
|---|---|
scripts/extract.py |
Stage 1: extract raw PDF text → manifest.json |
scripts/apply_verified.py |
Stage 2: inject verified metadata → manifest_verified.json |
scripts/execute.py |
Stage 3: rename files (preview or execute) |
scripts/llm_parse.py |
(Optional) programmatic LLM parsing via gateway API |
| Symptom | Cause | Fix |
|---|---|---|
raw_text empty |
PDF is a scan | Skip (confirmed: False) or manually determine metadata |
| Title extracted without spaces | pypdf concatenates lines | LLM infers from context; use filename as hint |
| Wrong year (arXiv ≠ conference) | Used filename year | Use venue year from raw_text, not filename |
| DOI/journal ref at top of page | Metadata precedes title | Read past it — title is usually after |
| Middle-dot author lines misidentified | · separator in names |
LLM handles via semantic understanding |
| Non-paper files renamed | No filter applied | Set confirmed: False for non-papers |
| Windows filename encoding garbled | Chinese/non-ASCII chars in PowerShell | Use Python scripts, not manual file ops |
| Ligature artifacts | PDF encoding (e.g., fi → fi) |
clean_title_text() in extract.py handles these |
references/manifest_spec.md — Full manifest JSON schemareferences/venue_abbrev.md — Standard venue abbreviation map這個工具質量不錯,能夠有效整理學術論文 PDF,按年份、期刊/會議、標題重新命名。防錯機制很用心,預覽重新命名、備份恢復、確認後才執行,三重保護讓人安心。文件寫得很詳細,新手也能快速上手。不過工具包裡有殘留的測試資料比較礙眼,而且跨平臺使用(比如 Linux/Mac)可能會有路徑問題。整體適合有大量論文需要整理的使用者,但中文檔名支援一般。.