How jashanjodhb/smartshot works
SmartShot pairs a Windows tray capture app with a OneNote task pane. The main workflow is capture → session/file and clipboard staging → reorder/remove and choose width → insert into OneNote or export PDF. The optional HTTP bridge lets the pane manage desktop captures where browser policy permits; clipboard and file intake remain the primary handoff. Edges are limited to relationships visible in excerpts, indexed references, or README statements; unsampled add-in and native route details are not inferred.
Main entry points: taskpane.js Pane workflow · main.cpp Tray controls · session.cpp Capture session · capture.cpp Screen capture
Components 19
Desktop capture
- Tray controls
native/src/main.cpp - Screen capture
native/src/capture.cpp - Capture session
native/src/session.cpp - Image codec
native/src/image.cpp - Clipboard publishing
native/src/clipboard.cpp - Desktop PDF export
native/src/pdf.cpp - Capture files
OneNote add-in
- Pane workflow
SmartShot/src/taskpane/taskpane.js - Clipboard and file intake
SmartShot/src/taskpane/taskpane.js - Staged screenshots
SmartShot/src/taskpane/taskpane.js - Page insertion
SmartShot/src/taskpane/onenote.js - Pane PDF export
SmartShot/src/taskpane/pdf.js - PDF download
Optional bridge
- Bridge client
SmartShot/src/taskpane/bridge.js - HTTP server
native/src/httpserver.cpp - Bridge route handling
native/src/main.cpp
Other components
- User
- Windows clipboard
- OneNote page
Connections 26
- User → Tray controls: chooses capture
README.md - Tray controls → Screen capture: starts capture
native/src/main.cpp - Screen capture → Capture session: adds bitmap
- Capture session → Image codec: encodes PNG
native/src/session.cpp - Capture session → Capture files: writes PNGs
native/src/session.cpp - Tray controls → Clipboard publishing: publishes capture
native/src/main.cpp - Clipboard publishing → Windows clipboard: sets clipboard
README.md - Windows clipboard → Clipboard and file intake: pastes shots
README.md - Capture files → Clipboard and file intake: drops or browses
README.md - Pane workflow → Clipboard and file intake: wires inputs
SmartShot/src/taskpane/taskpane.js - Clipboard and file intake → Staged screenshots: stages images
SmartShot/src/taskpane/taskpane.js - Pane workflow → Page insertion: inserts images
SmartShot/src/taskpane/taskpane.js - Page insertion → OneNote page: writes page
README.md - Pane workflow → Pane PDF export: builds export
SmartShot/src/taskpane/taskpane.js - Pane PDF export → PDF download: creates PDF
- User → Pane workflow: stages and exports
README.md - User → Tray controls: exports session
README.md - Tray controls → Desktop PDF export: builds session PDF
native/src/main.cpp - Capture session → Desktop PDF export: supplies PNGs
- User → Bridge client: enables bridge
README.md - Pane workflow → Bridge client: probes and requests
SmartShot/src/taskpane/taskpane.js - Bridge client → HTTP server: sends HTTP
SmartShot/src/taskpane/bridge.js - HTTP server → Bridge route handling: dispatches requests
native/src/main.cpp - Bridge route handling → Capture session: manages captures
native/src/main.cpp - Bridge route handling → Screen capture: requests capture
native/src/main.cpp - Bridge route handling → Desktop PDF export: builds PDF
native/src/main.cpp