-
Notifications
You must be signed in to change notification settings - Fork 0
Installation
Pick one of these ways:
From the Obsidian community directory (once published): Settings → Community plugins → Browse → search CSDN Draft Publisher → Install → Enable.
From a GitHub release (manual): download main.js and manifest.json from the latest release, put both files into:
<vault>/.obsidian/plugins/csdn-draft-publisher/
Then enable the plugin in Settings → Community plugins.
Via BRAT: install BRAT, add the repository ncepuee/csdn-draft-publisher, and enable the plugin.
The plugin needs a local Python interpreter with Playwright to drive the CSDN editor.
Option A — pip (simplest)
pip install playwright==1.62.0
python -m playwright install chromiumOption B — conda (isolated environment, recommended if your base env is busy)
conda env create -f environment.yml # from the repository
conda run -n csdn-publisher python -m playwright install chromiumOpen the plugin settings and check Python command:
-
python(default) — works if the Playwright install above went into your default interpreter; - or a full path, e.g.
C:\Users\<you>\.conda\envs\csdn-publisher\python.exeor/home/you/miniconda3/envs/csdn-publisher/bin/python.
Use whatever interpreter has Playwright installed — a wrong interpreter is the single most common setup problem (see Troubleshooting).
- Toggle Enable bridge service in the plugin settings. The plugin starts the local bridge automatically (
127.0.0.1:8765). - Run the command palette command Sync current note to CSDN draft.
- A Chromium window opens the first time — log in to your CSDN account manually.
- That's it. The login session is kept in a local browser profile and reused from then on.
The bridge health endpoint should answer:
curl http://127.0.0.1:8765/health{"ok": true, "bridge_api_version": "0.5.0", "account_profiles": true, "playwright": true, ...}If anything fails, see Troubleshooting.
中文
Repository