Document Metadata Analyzer
Input document details to analyze and summarize key metadata points.
No document data configured. Please go to the 'Data Configuration' tab to add documents.
Add & Edit Document Metadata
No document data configured. Please go to the 'Data Configuration' tab to add documents.
`; return; } let totalFiles = documentItems.length; let totalSizeKB = 0; const fileTypeCounts = {}; const authorCounts = {}; const documentData = []; documentItems.forEach(item => { const inputs = item.querySelectorAll('input, select'); const fileSize = parseFloat(inputs[3].value) || 0; const fileType = inputs[1].value; const author = inputs[2].value.trim(); totalSizeKB += fileSize; fileTypeCounts[fileType] = (fileTypeCounts[fileType] || 0) + 1; if (author) { authorCounts[author] = (authorCounts[author] || 0) + 1; } documentData.push({ name: inputs[0].value || 'N/A', type: fileType, author: author || 'N/A', size: fileSize, created: inputs[4].value || 'N/A', modified: inputs[5].value || 'N/A' }); }); const mostCommonFileType = Object.keys(fileTypeCounts).reduce((a, b) => fileTypeCounts[a] > fileTypeCounts[b] ? a : b, 'N/A'); const totalSizeMB = (totalSizeKB / 1024).toFixed(2); let dashboardHTML = `Analysis Summary
Total Documents
${totalFiles}
Total Size
${totalSizeMB} MB
Most Common Type
${mostCommonFileType}
Document Details
| File Name | Type | Author | Size (KB) | Last Modified |
|---|---|---|---|---|
| ${doc.name} | ${doc.type} | ${doc.author} | ${doc.size.toLocaleString()} | ${doc.modified} |
