by kageetai
Migrate Voicenotes image attachments into existing daily notes.
Voicenote Image Migrator
Voicenote Image Migrator moves image embeds from Voicenotes notes into existing Obsidian daily notes.
It scans the configured Voicenotes folder, reads image embeds from each note's ## Attachments section, copies the referenced image files into the daily note's sibling attachments/ folder, inserts the original embeds after the daily note frontmatter, and removes the source ## Attachments section only after a successful migration.
Features
- Runs manually from the command palette; it has no file watcher or ribbon icon.
- Uses Obsidian's Daily Notes configuration through
obsidian-daily-notes-interface. - Requires daily notes to already exist and never creates them.
- Preserves image embeds, inline groups, and size or alias markers such as
![[image.webp|317]]. - Deduplicates image references by filename and avoids links already present in a daily note.
- Blocks an entire voicenote when its date, daily note, source image, or safe destination is unavailable.
- Rechecks files and verifies copied bytes before changing notes.
- Can create
.backupfiles before modifying daily notes and voicenotes. - Produces an in-app report and can write the latest report to
Voicenotes/image-migration-report.md. - Runs locally without telemetry, accounts, or external services.
Commands
- Dry run voicenote image migration builds and reports the migration plan without modifying notes or images.
- Run voicenote image migration shows a preflight summary and requires confirmation before executing that exact plan.
- Open last migration report opens the report stored in the vault, or the latest in-memory report when file output is disabled.
Settings
- Voicenotes folder: defaults to
Voicenotes. - Voicenote attachments folder: defaults to
Voicenotes/attachments. - Create backup files: defaults to off.
- Write migration report: defaults to on.
- Open report after run: defaults to on.
Migration behavior
For each voicenote with supported image embeds in ## Attachments, the plugin reads Date: [[YYYY-MM-DD]] or Date: YYYY-MM-DD and resolves the existing daily note through Obsidian's configured Daily Notes state. Missing daily notes are blocked and reported; the plugin does not create daily notes or change Daily Notes settings.
A ready migration copies images into an attachments/ folder next to the daily note, inserts the embeds immediately after frontmatter with one blank line around the block, then removes the source attachments section. Existing destination images are reused only when their bytes match the source. One voicenote failing does not prevent later ready candidates from running.
Development
npm ci
npm run dev
Before submitting changes, run:
npm test
npm run lint
npm run build
The production build writes main.js at the repository root. Build output is not committed.
Release
Create a Git tag matching the package version without a leading v. The release workflow builds the plugin and creates a draft GitHub release with main.js, manifest.json, and styles.css.
License
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.