Script Breakdown Tool
Analyze your script and tag elements for production.
Project & Script
Script
Tagged Elements
Breakdown Report
No elements have been tagged. Go to the Breakdown tab to start tagging your script.
'; } } // --- PDF GENERATION --- document.getElementById('download-pdf-btn').addEventListener('click', async () => { const button = document.getElementById('download-pdf-btn'); button.disabled = true; button.textContent = 'Generating...'; const grouped = breakdownData.elements.reduce((acc, el) => { (acc[el.category] = acc[el.category] || []).push(el); return acc; }, {}); let reportSectionsHtml = ''; Object.keys(CATEGORIES).forEach(key => { if (grouped[key] && grouped[key].length > 0) { const category = CATEGORIES[key]; const tableRows = grouped[key].map(item => `${category.label}
| Element | Scene |
|---|
Script Breakdown Report
Project: ${breakdownData.projectTitle} | Generated: ${new Date().toLocaleDateString("en-US")}
No elements were tagged in this breakdown.
'}