Skip to content

Commit 7e44a41

Browse files
committed
paper sync
1 parent 1a91afb commit 7e44a41

4 files changed

Lines changed: 610 additions & 1 deletion

File tree

.claude/CLAUDE.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -81,8 +81,13 @@ make run-review N=570 # Process a specific PR from the Review pool column
8181
make run-review-forever # Poll Review pool for eligible PRs, dispatch run-review
8282
make copilot-review # (Optional) Request Copilot code review on current PR
8383
make release V=x.y.z # Tag and push a new release (CI publishes to crates.io)
84+
make papers # Full paper fetch: lookup + download + scihub
85+
make papers-status # Show research paper collection stats
86+
make papers-push # Push PDFs to shared remote (requires rclone + PAPERS_REMOTE)
87+
make papers-pull # Pull PDFs from shared remote
8488
# Set RUNNER=claude to use Claude instead of Codex (default: codex)
8589
# Default Codex model: CODEX_MODEL=gpt-5.4
90+
# Set PAPERS_REMOTE=gdrive:folder for paper sync (requires rclone)
8691
```
8792

8893
## Git Safety

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,3 +92,4 @@ docs/superpowers/
9292
*.log
9393
docs/src/reductions/*.json
9494
.claude/projects/
95+
docs/research/

Makefile

Lines changed: 38 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Makefile for problemreductions
22

3-
.PHONY: help build test mcp-test fmt clippy doc mdbook paper clean coverage rust-export compare qubo-testdata export-schemas release run-plan run-issue run-pipeline run-pipeline-forever run-review run-review-forever board-next board-claim board-ack board-move issue-context issue-guards pr-context pr-wait-ci worktree-issue worktree-pr diagrams jl-testdata cli cli-demo copilot-review
3+
.PHONY: help build test mcp-test fmt clippy doc mdbook paper clean coverage rust-export compare qubo-testdata export-schemas release run-plan run-issue run-pipeline run-pipeline-forever run-review run-review-forever board-next board-claim board-ack board-move issue-context issue-guards pr-context pr-wait-ci worktree-issue worktree-pr diagrams jl-testdata cli cli-demo copilot-review papers papers-lookup papers-download papers-scihub papers-status papers-push papers-pull
44

55
RUNNER ?= codex
66
CLAUDE_MODEL ?= opus
@@ -51,6 +51,12 @@ help:
5151
@echo " worktree-pr PR=<number> [REPO=<owner/repo>] - Checkout a PR into an isolated worktree"
5252
@echo " copilot-review - Request Copilot code review on current PR"
5353
@echo ""
54+
@echo " papers - Full paper fetch: lookup + download + scihub"
55+
@echo " papers-lookup - Lookup arxiv/OA URLs for references.bib entries"
56+
@echo " papers-download - Download available free PDFs"
57+
@echo " papers-scihub - Fetch remaining papers via Sci-Hub"
58+
@echo " papers-status - Show paper collection stats"
59+
@echo ""
5460
@echo " Set RUNNER=claude to use Claude instead of Codex (default: codex)"
5561
@echo " Override CODEX_MODEL or CLAUDE_MODEL to pick a different model"
5662

@@ -593,3 +599,34 @@ copilot-review:
593599
@PR=$$(gh pr view --json number --jq .number 2>/dev/null) || { echo "No PR found for current branch"; exit 1; }; \
594600
echo "Requesting Copilot review on PR #$$PR..."; \
595601
gh copilot-review $$PR
602+
603+
# ── Research paper management ──────────────────────────────────────
604+
# Downloads referenced papers to docs/research/raw/ (gitignored).
605+
# Manifest in docs/research/manifest.json tracks URLs and sources.
606+
607+
# Full pipeline: lookup URLs, download free PDFs, then try Sci-Hub for the rest
608+
papers: papers-lookup papers-download papers-scihub papers-status
609+
610+
# Step 1: Find arxiv/OA URLs via Semantic Scholar + arxiv APIs
611+
papers-lookup:
612+
python3 scripts/fetch_papers.py lookup
613+
614+
# Step 2: Download papers with known free URLs
615+
papers-download:
616+
python3 scripts/fetch_papers.py download
617+
618+
# Step 3: Fetch remaining papers (with DOIs) via Sci-Hub
619+
papers-scihub:
620+
python3 scripts/fetch_papers.py scihub
621+
622+
# Step 4: Push PDFs to shared remote (requires rclone + PAPERS_REMOTE env var)
623+
papers-push:
624+
python3 scripts/fetch_papers.py push
625+
626+
# Pull PDFs from shared remote (collaborator setup)
627+
papers-pull:
628+
python3 scripts/fetch_papers.py pull
629+
630+
# Show current collection stats
631+
papers-status:
632+
python3 scripts/fetch_papers.py status

0 commit comments

Comments
 (0)