How samuelnotfound/drive-preview-exporter works
Drive Preview Exporter adds an Export action to Google Drive and produces local PDF or video files from view-only previews. The principal paths are menu selection, PDF page capture and PDF construction, or video stream detection, download, remux, and save. Quality selection and Classroom handling are distinct supporting capabilities. The README documents the end-to-end export behavior; source excerpts show selected messaging, capture, and processing details, so unsampled links are omitted.
Main entry points: ui.js Export menu · video-stage-processor.js Remux and save · pdf.js PDF menu handler · video.js Video menu handler
Components 18
Drive interface
- Export menu
src/content/drive/ui.js - PDF menu handler
src/content/drive/pdf.js - Video menu handler
src/content/drive/video.js - Quality picker
src/content/drive/video/quality-picker.js - Quality automation
src/content/automation/quality-trigger.js - Classroom export
src/background/classroom-export.js
PDF export
- Page capture
src/content/drive/pdf/capture.js - PDF construction
src/content/drive/pdf/writer.js
Video capture
- Page network bridge
src/content/media/network-bridge.js - Stream capture
src/background/network-capture.js - Format catalog
src/background/format-catalog.js - Video context
src/content/drive/video/context.js
Video processing
- Message router
src/background/message-router.js - Video job coordination
src/background/video-jobs.js - Stream downloader
src/offscreen/video-stage-downloader.js - Remux and save
src/offscreen/video-stage-processor.js - Temporary disk storage
src/offscreen/video-stage-storage.js
Other components
- Drive user
Connections 15
- Drive user → Export menu: opens File menu
README.md - Export menu → PDF menu handler: selects PDF export
README.md - Export menu → Video menu handler: selects video export
README.md - PDF menu handler → Page capture: starts capture
README.md - Page capture → PDF construction: builds PDF
README.md - Video menu handler → Quality picker: offers quality choice
README.md - Quality picker → Quality automation: sets stream quality
src/content/automation/quality-trigger.js - Page network bridge → Video context: forwards stream URLs
src/content/media/network-bridge.js - Stream capture → Format catalog: catalogs captured streams
- Video context → Message router: requests video download
src/content/drive/video/context.js - Message router → Video job coordination: coordinates video stages
src/background/message-router.js - Stream downloader → Remux and save: hands off streams
src/offscreen/video-stage-processor.js - Remux and save → Temporary disk storage: reads merged output
src/offscreen/video-stage-processor.js - Remux and save → Drive user: saves MP4
README.md - Classroom export → PDF menu handler: supports Classroom PDFs