Daily Note Snapshot

approved

by Seiichi Arai

Copies a daily note into a snapshot folder at a scheduled time, named after the snapshot date. - This plugin has not been manually reviewed by Obsidian staff.

20 downloadsUpdated 22d ago0BSD

Daily Note Snapshot

An Obsidian plugin that copies a daily note into a snapshot folder at a scheduled time. The copy is named after the snapshot date, so the folder accumulates a dated history of the note.

What it does

Every day at the configured time (or on demand), the plugin:

  1. Reads the configured source note, e.g. DailyNote.md.
  2. Copies its content verbatim — frontmatter included — into the snapshot folder, e.g. DailyNoteSnapshot/26-08-08.md.

With the defaults (snapshot at hour 0, previous-day naming on), the snapshot taken just after midnight is named after the day that just ended, so each file holds the note as it looked at the end of that day.

If a snapshot with the same name already exists, it is overwritten. That is by design: a coarser date format (for example YY-MM) simply means "keep the latest snapshot per period".

When the source note does not exist, nothing is written.

Usage

  • Command palette: run Take a snapshot of the daily note.
  • Ribbon: click the camera icon in the left ribbon.
  • Settings: the Take a snapshot now button at the bottom of the plugin settings runs it immediately — handy for testing a configuration.
  • Automatic: enable the scheduled snapshot in the settings (on by default). Obsidian has to be running for the schedule to fire; a run missed while the app was closed is caught up the next time it starts on the same day.

Settings

SettingDefaultDescription
Source noteDailyNote.mdVault path of the note to snapshot. The .md extension is optional.
Snapshot folderDailyNoteSnapshotFolder the snapshots are stored in. Empty means the vault root. Missing folders are created.
Snapshot name formatYY-MM-DDMoment.js format for the snapshot file name. Choose how much detail to include, e.g. YYYY-MM-DD or YYYY-MM-DD_HH-mm-ss. Colliding names are overwritten. Slashes create subfolders.
Name the snapshot after the previous dayonUse the previous day for the file name. Keep it on with a midnight schedule so the file carries the date of the day that just ended; turn it off for schedules later in the day.
Take a snapshot automaticallyonWhether the scheduled snapshot runs.
Snapshot hour00Hour of day (0-23, 24 hour clock) the automatic snapshot happens, at the start of the hour.

Development

pnpm install
pnpm dev        # bundle with esbuild in watch mode
pnpm build      # type check and produce main.js
pnpm test       # run the vitest suite
pnpm lint       # eslint with the obsidianmd preset

License

0-BSD

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.