Baidu Netdisk Sync Plus

by Stifen Listen
5
4
3
2
1
Score: 50/100

Description

Obsidian + Baidu Netdisk two-way sync with explicit conflict choices. Modified from owl234/obsidian-baidu-netdisk-sync.

Reviews

No reviews yet.

Stats

0
stars
44
downloads
0
forks
5
days
3
days
3
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
33
commits

README file from

Github

Baidu Netdisk Sync Plus for Obsidian

Baidu Netdisk Sync Plus synchronizes an Obsidian vault with Baidu Netdisk in both directions. It is a modified build of owl234/obsidian-baidu-netdisk-sync under the MIT License, with a separate plugin ID so both plugins can be installed side by side.

The sync engine was rewritten around per-device content baselines instead of a shared remote index.

Features

  • Reinstalling against the same cloud folder compares file content before transferring: identical files only establish the device's sync baseline.

  • First transfers show the target folder and operations for confirmation. New files and modified files are labeled separately in the sync log.

  • The per-device sync baseline is stored in .obsidian/baidu-sync/baidu-netdisk-sync-plus/, outside the plugin folder, so plugin updates keep the baseline and do not trigger a full rescan. A legacy baseline inside the plugin folder is migrated automatically.

  • The left ribbon icon can open the sync log (default) or start a sync, selected with the Ribbon click action setting. Starting a sync while another sync is running shows an informational notice.

  • Identical files are recorded as one summary line instead of one log line per file.

  • Per-device baseline with SHA-256 local content hashes and cloud revision metadata.

  • Conflict table with four choices: keep local, keep cloud, keep both, or skip.

  • Startup auto sync prompts for conflicts; interval and save-triggered sync hold conflicts until the next manual run.

  • Explicit file and folder rename journal. Same-parent renames use Baidu filemanager opera=rename; cross-directory renames use opera=move.

  • Folder renames update cloud paths first, refresh child metadata, and upload only files whose content changed.

  • Reviewed deletions use the Obsidian vault trash and the Baidu recycle bin.

  • Four-stage resumable multipart uploads with post-transfer verification.

  • No automatic history copies on ordinary overwrites.

Network use

The plugin sends requests only to Baidu Open Platform endpoints (pan.baidu.com, d.pcs.baidu.com, and hosts returned by Baidu's locateupload response). It does not send telemetry or data to any other service. AppKey, AppSecret, OAuth tokens and the optional E2EE password are stored locally in the plugin's data.json and are never included in this repository.

First install

On a fresh install the plugin opens a sync path setup dialog and does not start automatic sync. The default is /WebDAV/; enter a folder below it, for example /WebDAV/Obsidian. /WebDAV and /WebDAV/ without a folder name are invalid and cannot be saved. After saving, run the first sync manually. Startup, interval, and save-triggered automatic sync begin on the next Obsidian launch.

Install manually

  1. Download main.js, manifest.json and styles.css from the latest GitHub release.
  2. Put them in <vault>/.obsidian/plugins/baidu-netdisk-sync-plus/.
  3. Reload Obsidian and enable Baidu Netdisk Sync Plus.
  4. Create a Baidu Open Platform application and enter its AppKey and AppSecret in the plugin settings.

Existing settings under .obsidian/plugins/baidu-netdisk-sync/ are not migrated automatically. Copy data.json only if you intend to reuse the old authorization and sync settings.

When reinstalling, select the same Baidu account and exact remote folder as before. A different remote folder is a different sync destination. Initial content verification may download files for comparison, but identical content is not uploaded again. Keep only one sync plugin active for the same vault.

Build from source

npm install
npm test
npm run build

npm test runs the original TypeScript unit tests and the native sync engine tests. npm run build bundles src/entry.ts to main.js.

The source tree contains the original TypeScript modules under src/, the native Baidu API reconciler in src/native-sync.js, and the bundle entry point in src/entry.ts.

Attribution and license

Based on owl234/obsidian-baidu-netdisk-sync. The original author is credited in NOTICE.md. Both the original project and this modified build use the MIT License; see LICENSE.

This repository contains no Baidu credentials, tokens, sync manifest, native state or machine-specific sync data.