How aaronkhodami/zotgit works
ZotGit is a Zotero extension for managing attachment files and syncing settings and PDFs with GitHub. Its main workflow is to move or copy imported attachments into a configured directory and link them to Zotero items; users can also manage attachments from context menus. Sync is an optional branch with scheduled/manual pushes, startup pulls, and remote-PDF recall. The README documents several capabilities whose internal call paths are not shown, so those relationships are cited to the README; source-level edges use the shown bootstrap wiring.
Main entry points: bootstrap.js Extension startup · 06-zotmoov-sync.js Sync coordinator · 02-zotmoov.js Attachment handling · 03-zotmoov-menus.js Context menus
Components 22
Extension runtime
- Extension startup
bootstrap.js - Zotero patching
src/04-zotmoov-patcher.js - Filename sanitizer
lib/02-sanitize-filename.js
Attachment management
- Attachment handling
src/02-zotmoov.js - Wildcard rules
src/00-zotmoov-wildcard.js - Wildcard commands
src/00-zotmoov-command-parser.js - Delete queue
src/01-zotmoov-delete-queue.js - Attachment callbacks
src/01-zotmoov-notify-callback.js - Attachment directory
Settings and menus
- Context menus
src/03-zotmoov-menus.js - Custom menu items
src/03-zotmoov-custom-menus.js - Window bindings
src/05-zotmoov-bindings.js - General preferences
preferences/zotmoov-prefs.js - Advanced preferences
preferences/zotmoov-adv-prefs.js
GitHub sync
- Sync coordinator
src/06-zotmoov-sync.js - Temporary PDF cache
- GitHub repository
Logging
- Log directory
lib/logging/00-directory-manager.js - Extension debugger
lib/00-zotmoov-debugger.js - Log output
lib/logging/04-output-manager.js
Other components
- Zotero user
- Zotero library
Connections 28
- Zotero user → General preferences: configures
README.md - Zotero user → Context menus: manages attachments
README.md - Zotero library → Attachment handling: imports attachments
README.md - Attachment handling → Attachment directory: moves or copies
README.md - Attachment handling → Zotero library: links attachments
README.md - Context menus → Attachment handling: requests move or copy
README.md - Zotero library → Delete queue: deletion queues unlink
README.md - Zotero user → Attachment callbacks: attaches latest file
README.md - Extension startup → Attachment handling: constructs
bootstrap.js - Extension startup → Window bindings: constructs
bootstrap.js - Extension startup → Context menus: constructs
bootstrap.js - Extension startup → Sync coordinator: constructs
bootstrap.js - Extension startup → Wildcard rules: constructs
bootstrap.js - Extension startup → Filename sanitizer: constructs
bootstrap.js - Extension startup → Log directory: creates
bootstrap.js - Extension startup → Extension debugger: creates
bootstrap.js - Extension startup → Custom menu items: loads scripts
bootstrap.js - Extension startup → Zotero patching: loads scripts
bootstrap.js - Extension startup → Wildcard commands: loads scripts
bootstrap.js - Extension startup → Attachment callbacks: loads scripts
bootstrap.js - Wildcard rules → Wildcard commands: uses commands
- General preferences → Sync coordinator: checks auth
preferences/zotmoov-prefs.js - Advanced preferences → Sync coordinator: pushes settings
preferences/zotmoov-adv-prefs.js - Sync coordinator → GitHub repository: pushes and pulls
README.md - Sync coordinator → Temporary PDF cache: recalls remote PDFs
README.md - Sync coordinator → Attachment directory: syncs PDFs
README.md - Extension debugger → Log output: writes logs
lib/00-zotmoov-debugger.js - Log output → Log directory: gets log file
lib/logging/04-output-manager.js