Add live sync visibility and Gitea updater

This commit is contained in:
dinlo
2026-06-20 10:24:42 +08:00
parent 621b25c39f
commit e5fd9a6127
4 changed files with 219 additions and 19 deletions
+27 -2
View File
@@ -5,10 +5,12 @@ Simple CouchDB Sync is an Obsidian plugin that synchronizes vault files through
## Features
- Manual synchronization command and ribbon action.
- Optional live synchronization for file create, modify, delete, and rename events.
- Live synchronization for file create, modify, delete, rename events, and periodic remote pulls.
- Visible Obsidian status bar text with the latest sync result.
- Syncs Markdown notes and binary attachments.
- Uses Obsidian `requestUrl`, so it can work on desktop and mobile, including Android.
- Stores CouchDB connection settings inside the plugin settings tab.
- One-button plugin update from the Gitea repository.
## Default Test Configuration
@@ -44,6 +46,7 @@ styles.css
7. Enable `Simple CouchDB Sync`.
8. Open the plugin settings and verify the CouchDB server, database, username, and password.
9. Press `Sync` in the plugin settings, or use the command `Sync vault with CouchDB`.
10. Keep `Live sync` enabled on every device that should receive remote changes automatically.
For your test vault, the target folder is:
@@ -94,12 +97,25 @@ styles.css
7. Go to Settings -> Community plugins and enable `Simple CouchDB Sync`.
8. Open the plugin settings and enter the same CouchDB connection settings as on desktop.
9. Run `Sync vault with CouchDB`.
10. Keep `Live sync` enabled if the phone should pull changes from CouchDB automatically.
For easier Android updates, install an Android Git client such as Termux or a file manager with Git support, then clone the repository into the same plugin folder. After updating files, restart Obsidian so it reloads `main.js`.
## Updating The Plugin
When the repository changes, update these three files in the plugin folder:
The plugin includes a one-button updater.
1. Open Obsidian Settings -> Community plugins -> Simple CouchDB Sync.
2. In `Plugin updates`, keep the Gitea raw URL as:
```text
https://nnootteess.dinlo.ru/dimon/simple-couchdb-sync/raw/branch/main
```
3. Press `Check and update`.
4. Restart Obsidian, or disable and re-enable the plugin.
Manual update is also possible. When the repository changes, update these three files in the plugin folder:
```text
manifest.json
@@ -109,6 +125,15 @@ styles.css
Then restart Obsidian or disable and re-enable the plugin.
## Live Sync Behavior
Live sync must be enabled on every device where automatic updates are expected.
- When a local file changes, the plugin queues it and syncs after a short delay.
- On the configured interval, the plugin checks CouchDB for changes created on other devices.
- The status bar shows the latest result, including pushed and pulled file counts.
- If live sync is disabled, use the `Sync` button manually on each device.
## CouchDB Notes
The plugin stores one CouchDB document per vault file. Document ids are derived from file paths. Deleted files are represented by tombstone documents so deletion can propagate between devices.