How dev57668/python-programms works
Code Lifejacket is a local, real-time shadow-backup and accidental-deletion recovery tool. A developer starts the CLI watcher, which scans existing files and handles filesystem events; eligible changes are debounced, deduplicated, and saved as timestamped snapshots with metadata. CLI recovery commands inspect history or status and can restore a selected snapshot after confirmation. The README also documents snapshot listing and cleanup. Wiring for those commands is represented at the CLI-to-recovery boundary; details beyond the sampled recovery excerpts are not inferred.
Main entry points: watcher.py Watcher and debounce · backup.py Backup engine · recovery.py Recovery engine · main.py CLI dispatcher
Components 13
CLI and recovery
- CLI dispatcher
main.py - Recovery engine
recovery.py
File monitoring
- Watcher and debounce
watcher.py - Settings and filters
config.py - User settings
config.json
Snapshot engine
- Backup engine
backup.py - Hash and path utilities
utils.py
Local storage
- Metadata database
database.py - Metadata JSON
.lifejacket/metadata.json - Snapshot files
.lifejacket/snapshots
Other components
- Developer
- Watchdog observer
- Project files
Connections 20
- Developer → CLI dispatcher: runs commands
- CLI dispatcher → Settings and filters: loads settings
- User settings → Settings and filters: supplies settings
- CLI dispatcher → Watcher and debounce: starts watch
- Watcher and debounce → Watchdog observer: schedules observer
- Watchdog observer → Watcher and debounce: dispatches events
- Project files → Watcher and debounce: emits file events
- Watcher and debounce → Settings and filters: checks filters
- Watcher and debounce → Backup engine: requests snapshots
- Watcher and debounce → Backup engine: reports deletion
- Backup engine → Settings and filters: checks rules
- Backup engine → Hash and path utilities: hashes and resolves paths
- Backup engine → Metadata database: checks and records versions
- Backup engine → Snapshot files: writes copies
- Metadata database → Metadata JSON: reads and writes
- CLI dispatcher → Recovery engine: dispatches recovery commands
- Recovery engine → Backup engine: initializes engine
- Recovery engine → Metadata database: queries and updates history
- Recovery engine → Snapshot files: reads selected version
- Recovery engine → Project files: restores file