File Modification Watcher (Dev)
unlistedby aHDpeee
Build selected Markdown notes and publish generated files to GitHub when source notes change.
File Modification Watcher
An Obsidian plugin that compiles selected notes and folders into generated Markdown documents, then publishes those documents to a configured GitHub repository when their source files change.
Status
Early extraction and hardening stage. This repository is a standalone development copy. It uses the temporary plugin ID file-modification-watcher-next so it can be tested alongside the older plugin without replacing it.
Features
- Declarative mapping from vault notes to generated Markdown files.
- Optional heading-level extraction.
- Date placeholders such as
{{DATE:yyyy-MM-dd}}. - Debounced updates after source-note modifications.
- Manual "Sync all configured outputs now" command.
- GitHub Contents API uploads with update-SHA handling.
- GitHub token selected through Obsidian SecretStorage rather than stored in this plugin's
data.json.
Requirements
- Obsidian 1.11.4 or later.
- Node.js and npm for development.
- A GitHub repository and a fine-grained token with Contents read/write permission for that repository.
Development
npm ci
npm test
npm run check
npm run build
The build produces main.js, an Obsidian runtime artifact that should be included in plugin releases, not edited by hand.
Test installation
The development build is installed, but not enabled, in the author's existing vault under the temporary plugin ID file-modification-watcher-next. Enable it from Settings → Community plugins only when ready to test. The previous plugin remains installed under its original ID and is not modified by this repository.
Do not point the new plugin at a production repository for the first test. Use a disposable GitHub test repository or a dedicated test branch, and verify the generated Markdown before enabling automatic synchronization.
Configuration format
Each @name declares a generated file under RepoSyncFolder/. Each following /path declares a vault source. Optional #Heading lines select sections from the preceding source.
@daily
/Journal/{{DATE:yyyy-MM-dd}}
#Summary
#Next steps!
@ideas
/Ideas
- A heading ending in
!is included as a heading in the output. - A source path containing
!requests a title before the source content. - Source paths are relative to the vault. The
.mdextension is optional for note sources. - Folder sources include Markdown files recursively; heading filters on folder sources are currently unsupported.
- Output names are relative paths and cannot escape
RepoSyncFolder.
Security notes
- Never paste tokens into source files, issue reports, screenshots, or logs.
- The plugin stores only the selected SecretStorage entry name in its settings.
- Obsidian's SecretStorage keeps the secret out of plugin
data.json; do not assume this alone guarantees OS-level encryption at rest. - Use a fine-grained GitHub token restricted to the target repository and minimum required Contents permissions.
- The older in-vault plugin stored a token directly in its
data.json. Rotate that token after migrating and remove the old plaintext value from backups or synced copies where feasible.
Current limitations
- No conflict resolution for simultaneous remote edits.
- No retry queue or offline synchronization.
- Folder sources do not support heading filters.
- No dry-run preview yet.
- Runtime behavior has not yet been tested inside Obsidian.
License
MIT
For plugin developers
Search results and similarity scores are powered by semantic analysis of your plugin's README. If your plugin isn't appearing for searches you'd expect, try updating your README to clearly describe your plugin's purpose, features, and use cases.