Files
jhogyuandClaude Sonnet 5.5 b066471945 feat(skills): add lawnb-pdf-download skill for saving LAWnB 주석서 pages as PDF
Scripts to probe a book's TOC, print each page-level item to PDF via the
print popup, verify, merge per 대항목 and clean up temp files. Invoked only
by /lawnb-pdf-download (disable-model-invocation).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-10-28 22:16:22 +09:00

13 lines
813 B
JavaScript

// List every book entry button on the LAWnB 주석서 main page with its sid.
// The sid prefix (before "_") identifies the book; the suffix is a TOC node id.
// Run (sandbox disabled): ego-browser nodejs < find_books.js
const task = await taskSpace("lawnb find books " + Date.now());
const page = task.page("p1");
await page.goto("https://academynext-lawnb-com.libra.cnu.ac.kr/Info/ContentMain/Jusuk", { timeout: 30000 });
await page.waitForTimeout(3000);
const rows = await page.evaluate(() => [...document.querySelectorAll('[onclick]')]
.filter(e => /showOriginalView/.test(e.getAttribute('onclick')))
.map((e, i) => i + ': ' + e.textContent.trim().replace(/\s+/g, ' ') + ' | ' + (e.getAttribute('onclick').match(/sid=([^']+)/) || [])[1]));
console.log(rows.join('\n'));
await task.finish({ keep: [] });