MAVS Mathews Tablet Package Builder Script: tools/mathews-package-builder/build-mathews-tablet-package.ps1 Purpose: Build the exact /MAVS/Mathews tablet data package before handing a tablet or SD card to a field tech. Example using already-downloaded offline aerial files: powershell -ExecutionPolicy Bypass -File tools/mathews-package-builder/build-mathews-tablet-package.ps1 ` -DestinationRoot E:\ ` -OriginalPdfsSource "C:\mathews\original_pdfs_mathews" ` -TemplatesSource "C:\mathews\templates" ` -ParcelPackageSource "C:\mathews\parcels-package.json" ` -OfflineSource "C:\mathews\offline" Example downloading hosted aerial MBTiles/manifest/checksum: powershell -ExecutionPolicy Bypass -File tools/mathews-package-builder/build-mathews-tablet-package.ps1 ` -DestinationRoot E:\ ` -OriginalPdfsSource "C:\mathews\original_pdfs_mathews" ` -TemplatesSource "C:\mathews\templates" ` -ParcelPackageSource "C:\mathews\parcels-package.json" ` -DownloadOffline Inputs: DestinationRoot SD card, tablet drive, or final MAVS\Mathews folder. OriginalPdfsSource Folder containing original property-card PDFs. TemplatesSource Folder containing new_construction.pdf and mobile_home.pdf. ParcelPackageSource parcels-package.json exported from Supabase. OfflineSource Folder containing mathews_va_51115_z14_z18_aerials.mbtiles, manifest.json, and checksum. DownloadOffline Downloads the hosted aerial files instead of copying from OfflineSource. Output: MAVS\Mathews\offline MAVS\Mathews\original_pdfs MAVS\Mathews\templates MAVS\Mathews\config MAVS\Mathews\returned_work MAVS\Mathews\logs Validation: The script runs: node scripts\validate-mathews-tablet-package.js --root E:\MAVS\Mathews Reports: MAVS\Mathews\logs\package-builder-report.txt MAVS\Mathews\logs\package-builder-report.json Safety: The script does not recursively delete returned_work or logs.