QYY Baidu Sync

by QYY542
5
4
3
2
1
Score: 50/100

Description

通过百度网盘增量同步笔记和附件,保留冲突版本并记录待同步改动.

Reviews

No reviews yet.

Stats

0
stars
52
downloads
0
forks
6
days
6
days
6
days
0
total PRs
0
open PRs
0
closed PRs
0
merged PRs
0
total issues
0
open issues
0
closed issues
4
commits

Latest Version

6 days ago

Changelog

Automatic sync now runs quietly on desktop and mobile. Manual sync keeps its notifications. Errors, pending transfers and conflict copies remain recorded. Update both plugins together for quiet conflict handling.

自动同步不再弹窗,手动同步继续提示;失败、待同步与冲突副本仍然保留。搭配使用时请同时更新两个插件。

The public helper continues to provide Save and sync without desktop exit interception. Mobile compatibility is covered by simulated tests; physical-phone testing is pending.

Install or update with main.js, manifest.json and styles.css. Preserve your data.json. These assets are built and attested by GitHub Actions.

README file from

Github

QYY Baidu Sync

通过你授权的百度网盘,在 Obsidian 设备之间同步笔记与附件。支持持久化增量队列、覆盖前恢复副本、可选文件内容加密,以及与 QYY Folder Notes 联动整理冲突。

Sync Obsidian notes and attachments through your own Baidu Netdisk account. Includes a persistent change journal, recovery copies, optional content encryption, and folder-based conflict handling with QYY Folder Notes. The settings interface is currently in Chinese. English setup and privacy appear below.

安装

需要 Obsidian 1.15.0 或更新版本、百度网盘账号,以及你自己的百度开放平台应用 AppKey / AppSecret。第三方平台可能限制应用权限、配额与速度。手机代码路径已做模拟检查,iOS / Android 真机验证仍未完成。

GitHub 安装

  1. 备份知识库,先在独立测试库使用。关闭同库中的旧版百度网盘同步插件,避免两个同步引擎同时操作同一云目录。
  2. 打开 最新 Release,下载 Assets 中的 main.js、manifest.json、styles.css,不要用自动生成的源码压缩包替代它们。
  3. 在知识库的 .obsidian/plugins/qyy-baidu-sync/ 内放入这三个文件;如果使用自定义配置目录,以实际目录为准。
  4. 重新加载 Obsidian,在「设置 → 第三方插件」中允许第三方插件并启用 QYY Baidu Sync。
  5. 更新时先停用插件、备份设置,再替换这三个程序文件并重新启用;保留本机 data.json,不要将它上传到公开仓库或发给他人。

手机不方便访问插件目录时,可在已经安装的 BRAT 中添加 QYY542/qyy-baidu-sync 并选择发布版本。BRAT 是另一个独立插件,本项目不会自动安装它或其他插件。

社区目录安装

社区页面 已公开,但页面公开不代表审核通过。只有目录安装按钮可用时,才可在 Obsidian「第三方插件 → 浏览」中搜索 QYY Baidu Sync 安装。按钮不可用时使用上面的 GitHub 安装路径;不要把本页当作官方审核通过证明。

从零配置与第一次同步

  1. 打开「设置 → QYY Baidu Sync」。在「百度网盘账号授权」中填写自己的 AppKey 和 AppSecret。
  2. 点击「第一步:打开授权网页」,在百度页面登录授权;把返回的授权码手动粘贴到插件的授权码输入框,点击「第二步:确认换取 Token」。插件不会自动读取剪贴板。
  3. 在「网盘端根目录」设置专用位置,例如 /apps/obsidian_test。不同知识库使用不同目录;同一知识库的设备应使用同一目录。
  4. 在首次手动验证前关闭「启动时自动同步」「保存/修改后防抖自动同步」,将定时周期设为 0。配置同步默认关闭;插件目录始终排除。
  5. 若需要文件内容加密,在上传前设置相同的 E2EE 开关和密码,并在各设备保持一致。更改已有云端数据的加密方式需要迁移,不能只改开关就假定旧数据已转换。妥善保管密码,本项目不能找回。
  6. 在测试库创建一篇笔记,运行命令「立即执行同步 (Sync Now)」或点击云朵图标。运行「查看同步日志 (View Sync Logs)」确认成功,再在另一设备验证下载与修改回传。
  7. 验证完成后,按需要开启自动同步。切换设备或关闭应用前先保存并手动同步,确认日志成功;手机挂起或系统退出后不保证继续传输。

多设备配对

在已授权设备的「多设备快速配对与配置迁移」中选择「导出配置至其他设备」,设置一个强的临时保护密码,生成配对码,再主动点击「复制到剪贴板」。生成本身不再自动覆盖剪贴板。 复制不可用时,手动选择输出框内容。

在另一设备安装本插件后,选择「导入外部设备配置」,手动粘贴配对码并输入保护密码。配对码在设备本地加密/解密;导入后获得的授权凭据用于正常百度授权与同步请求。检查导入的云目录、加密选项和自动同步设置,再开始使用。

配对码包含加密后的 AppSecret、访问/刷新令牌、同步设置以及已配置的 E2EE 密码。它不是公开分享链接;保护密码与配对码应分开传递。操作系统、剪贴板管理器或你使用的聊天软件可能保存或跨设备传输复制内容。

同步和恢复规则

  • 正常轮次使用增量改动队列;启动、异常恢复和周期核对仍可能扫描目录,不承诺永不扫描。
  • 单边变更按同步基线处理;双边 Markdown 冲突交给 QYY Folder Notes。该插件需单独安装。助手使用版本信息选择主版本,时间不可靠时要求选择;旧版保留为子笔记。缺少助手时该冲突项停止,不静默覆盖。
  • 覆盖前保存本地恢复副本。同步不是独立备份,应另存知识库备份;不要直接在正式库测试批量删除。
  • 公开版始终排除插件程序和账户配置目录。外观及全局设置可单独选择同步。自用版和公开版行为有差异,不提供自动迁移。
  • 手机默认单个传输,桌面最多两个。15 秒等待预算不保证所有文件都能在 15 秒内同步,后台挂起也可能延迟任务。

隐私与安全

本插件没有项目方中转服务器、广告或遥测。授权、目录查询与文件传输使用百度服务:openapi.baidu.com、pan.baidu.com、d.pcs.baidu.com 及百度返回的下载地址。同步会传输选中的文件内容和必要元数据;未启用 E2EE 时云端保存明文,启用后文件名、目录和大小等仍可能可见。

凭据与 E2EE 密码通过 Obsidian 插件设置保存在本机库内的 data.json,不是系统钥匙串。请保护设备、备份和配置目录。本插件排除插件目录并不能阻止操作系统或其他备份工具复制它。

剪贴板: 无 readText / read 调用或后台监听;唯一程序写入来自主动点击复制加密配对码。插件不自动上传剪贴板内容,也不会自动发送配对码。手动粘贴导入的配对码在本地解密;其中的凭据随后用于百度 API。若把内容粘贴到笔记,且该笔记参加同步,它会按普通笔记上传。

详见 隐私与数据说明。遇到问题可提交 Issue,不要附上 AppSecret、令牌、密码、配对码或原始 data.json。

English guide

Install and configure

  1. Requires Obsidian 1.15.0+, a Baidu Netdisk account, and your own Baidu developer application's AppKey and AppSecret. Back up your vault and begin with a separate test vault. Disable other Baidu sync engines in that vault.
  2. Download main.js, manifest.json, and styles.css from the latest GitHub Release. Place them in <vault>/.obsidian/plugins/qyy-baidu-sync/, reload Obsidian, and enable QYY Baidu Sync in Community plugins. Use your actual configuration folder if customized. On mobile, an independently installed BRAT can install QYY542/qyy-baidu-sync.
  3. In the plugin settings, enter AppKey / AppSecret, open the authorization page, sign in to Baidu, then manually paste the authorization code and exchange it for tokens.
  4. Choose a dedicated remote folder. Use separate folders for different vaults; devices sharing one vault must use the same folder and encryption settings. Disable automatic triggers for the initial manual test.
  5. Run Sync Now on a test note and check View Sync Logs. Verify download and edit round trips on the second device before enabling automatic sync. To update manually, disable the plugin and replace only the three release files, retaining local settings.
  6. To pair devices, export an encrypted pairing code with a strong protection password, explicitly click Copy, then manually paste and decrypt it on the second device. Generating a code does not automatically copy it. Check imported settings before syncing.

The community listing is separate from GitHub releases: install through Obsidian's directory only when its install action is available. The project does not install or update itself or other plugins.

Privacy and limitations

Network requests go to Baidu for OAuth, listings, uploads and downloads; there is no project-operated relay or telemetry. Selected notes and attachments are uploaded to your Baidu account. Optional E2EE protects file content, not all filenames or metadata. Credentials and the encryption password are stored in local plugin settings, not an OS keychain.

The plugin does not read or monitor the clipboard. It writes only the encrypted pairing code after an explicit Copy click. No clipboard content or pairing code is automatically uploaded by this feature. Pairing codes contain encrypted credentials and, if configured, the E2EE password. Imported credentials are subsequently used for normal Baidu API requests. OS clipboard history, cross-device clipboard services, and apps you paste into may retain or transmit the code. Pasting content into a synced note also makes it part of that note's upload.

Folder-based Markdown conflict handling requires the separately installed QYY Folder Notes; without it, the conflict is left unresolved instead of silently overwriting either version. Mobile loading and logic have simulated coverage, but iOS / Android hardware validation remains outstanding. Background suspension and app exit can interrupt transfers. Keep independent backups and check sync success before switching devices.

构建、测试与来源验证 / Build and provenance

构建环境固定为 Node.js 24.13.0、npm 11.6.2;项目不额外引入 npm 构建依赖。package-lock.json 记录空的外部依赖树,后续添加依赖必须一起更新锁文件。Obsidian 在运行时提供其 API。

npm ci --ignore-scripts --no-audit --no-fund
npm run build
npm test

project-1114-1727.json 指定源码和资源;离线构建生成根目录三个安装文件。GitHub Actions 对提交运行检查,对版本 tag 重新构建并校验、生成 Artifact Attestations 后才发布正式 Release。工作流权限按任务划分,引用的 Actions 固定到提交 SHA。

下载 Release 附件后可验证来源 / Verify downloaded release artifacts:

gh attestation verify main.js --repo QYY542/qyy-baidu-sync
gh attestation verify styles.css --repo QYY542/qyy-baidu-sync
gh attestation verify manifest.json --repo QYY542/qyy-baidu-sync

来源证明用于核对构建来源,不代表官方审核、安全审计或真机测试通过。只有实际生成证明的版本支持上述验证,旧版本不自动补齐。

来源与许可证 / Attribution and license

维护者 QYY,基于 owl234 的 Baidu Netdisk Sync 1.0.14 衍生,保留上游 MIT 许可和版权;QYY 修改同样使用 MIT。当前维护的是来自上游发行文件的可读 JavaScript 快照及新增模块,不是从零原创。详见 LICENSE、THIRD-PARTY-NOTICES 与 source-provenance-1113-1100.json。

Maintained by QYY; derived from owl234's Baidu Netdisk Sync 1.0.14 under MIT. Upstream attribution is retained. Community fork approval, code review and hardware validation are separate from GitHub publication; outstanding work is tracked in RELEASE-CHECKLIST.md.

Quiet automatic sync / 自动同步静默

Automatic startup, periodic, edit-triggered and mobile foreground sync do not show popup notifications. Failures and pending work remain recorded; check the sync log and use a manual sync before switching devices. Manual sync keeps its notifications. Update both QYY Baidu Sync (1.3.3+) and QYY Folder Notes (0.1.3+) when using them together.

启动、定时、保存后及手机返回前台的自动同步不弹窗。失败、待同步和冲突记录仍保留;切换设备前可查看同步日志并手动确认同步成功。手动同步继续显示提示。搭配使用时请同时更新百度同步至 1.3.3 或以上、文件夹助手至 0.1.3 或以上。

The public mobile-compatible helper supports Save and sync, but does not intercept application exit. Mobile operating systems may suspend background work; unfinished work resumes on a later sync. Mobile module loading and lifecycle behavior are tested with mocks; this release has not been tested on a physical phone.

公开助手支持“保存并同步”,不拦截退出。手机系统可能暂停后台运行,未完成任务留待后续同步重试。本次验证包含手机模块加载与生命周期模拟,尚未进行手机实机测试。