Commit 42a45f4
authored
Add a first-class `mimir obsidian-sync <vault>` subcommand that surfaces
vault export as a one-command Obsidian/Logseq/Notion PKM workflow, plus
structured WikiLink backlinks between linked entities.
- CLI: ObsidianSync { vault_path, db: Option<String>, --watch } variant +
dispatch arm. Opens the DB and runs vault export to vault_path; --watch
polls the cheap deterministic state_digest() (#256) on an interval and
re-exports on change. No FS-watcher dependency; naturally catches
remember writes and decouples from the server write path.
- vault_export: parse the MemoryLink JSON array and write a `## Links`
section per note (`- [[<id>|<key>]] (<relationship>)`). Two-pass build
(id->filename map, then render). Links resolve BY ID for guaranteed
Obsidian resolution. Links section is part of the unchanged-content
comparison so the skip-optimization still holds. Dangling targets render
as best-effort unresolved refs rather than crashing. Backward compatible:
link-free notes are byte-identical to the prior format.
- README: "Your AI Memory in Obsidian" PKM section (Obsidian/Logseq/Notion).
- Tests: linked entities emit a WikiLink in the dependent note; unchanged
re-export is a no-op; dangling link id does not crash; digest-change
trigger logic (should_resync) tested in isolation; CLI parse tests.
Closes #274.
1 parent 198deed commit 42a45f4
3 files changed
Lines changed: 456 additions & 38 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
215 | 215 | | |
216 | 216 | | |
217 | 217 | | |
| 218 | + | |
| 219 | + | |
218 | 220 | | |
219 | 221 | | |
220 | 222 | | |
| |||
237 | 239 | | |
238 | 240 | | |
239 | 241 | | |
| 242 | + | |
| 243 | + | |
| 244 | + | |
| 245 | + | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
| 249 | + | |
| 250 | + | |
| 251 | + | |
| 252 | + | |
| 253 | + | |
| 254 | + | |
| 255 | + | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
| 264 | + | |
| 265 | + | |
| 266 | + | |
| 267 | + | |
| 268 | + | |
| 269 | + | |
| 270 | + | |
| 271 | + | |
| 272 | + | |
| 273 | + | |
| 274 | + | |
| 275 | + | |
| 276 | + | |
| 277 | + | |
| 278 | + | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
| 285 | + | |
| 286 | + | |
| 287 | + | |
| 288 | + | |
| 289 | + | |
| 290 | + | |
| 291 | + | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
240 | 302 | | |
241 | 303 | | |
242 | 304 | | |
| |||
0 commit comments