Project Files
scripts / inspect-docx.cjs
// Quick CLI: node scripts/inspect-docx.cjs <path.docx>
const JSZip = require("jszip");
const fs = require("node:fs/promises");
(async () => {
const buf = await fs.readFile(process.argv[2]);
const zip = await JSZip.loadAsync(buf);
const styles = await zip.file("word/styles.xml").async("string");
const doc = await zip.file("word/document.xml").async("string");
console.log("=== styles.xml (Quote excerpt) ===");
const m = styles.match(/<w:style [^>]*w:styleId="Quote"[^>]*>[\s\S]*?<\/w:style>/);
console.log(m ? m[0] : "(no Quote style block found)");
console.log("\n=== document.xml (first 2 KB) ===");
console.log(doc.slice(0, 2000));
})();