← ClaudeAtlas

paper-deployerlisted

Deploy paper content from configured site_ready files to d-nd.com VPS. Handles md-to-HTML conversion, bilingual merge, figure path resolution, and pages.json update.
GrazianoGuiducci/d-nd-seed · ★ 1 · AI & Automation · score 71
Install: claude install-skill GrazianoGuiducci/d-nd-seed
# Paper Deployer — Papers → d-nd.com Pipeline Deploy updated paper content from a configured papers source to the live site. ## Prerequisites - Paper source files in `${DND_PAPERS_DIR}/site_ready/paper_X_IT.md` and `paper_X_EN.md` - Figure SVGs in `${DND_PAPERS_DIR}/figures/` (already converted from PDF) - VPS access via SSH ## Deployment Steps ### Step 1 — Check source files ```bash ls ${DND_PAPERS_DIR}/site_ready/paper_*_{IT,EN}.md 2>/dev/null ls ${DND_PAPERS_DIR}/figures/*.svg 2>/dev/null | wc -l ``` ### Step 2 — Convert and merge The conversion pipeline: 1. Read IT and EN markdown from site_ready/ 2. Convert to HTML (preserve LaTeX `$...$` for MathJax) 3. Convert markdown images `![alt](src)` to `<figure><img>` HTML 4. Resolve figure wildcard paths (`fig_C1_*.svg` → `fig_C1_actual_name.svg`) 5. Merge into pages.json: IT → `content`, EN → `content_en` ### Step 3 — Deploy figures to VPS ```bash scp ${DND_PAPERS_DIR}/figures/*.svg root@${DND_VPS_IP}:/opt/d-nd_com_site/papers/figures/ ``` ### Step 4 — Update pages.json on VPS ```bash # The pages.json served by nginx is at /opt/site_repo/data/pages.json # The container bind-mounts this same file # Update in place — changes are immediately live (nginx no-cache) ssh root@${DND_VPS_IP} 'python3 << "PYEOF" import json with open("/opt/site_repo/data/pages.json") as f: data = json.load(f) # ... merge logic here ... with open("/opt/site_repo/data/pages.json", "w") as f: json.dump(data, f, ensure_ascii=False) PYEOF' ``