Skip to content

Installation

ncepuee edited this page Aug 31, 2026 · 1 revision

Installation

1. Install the plugin

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.

2. Install the Python bridge

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 chromium

Option 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 chromium

3. Point the plugin at your Python

Open 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.exe or /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).

4. Enable the bridge and log in once

  1. Toggle Enable bridge service in the plugin settings. The plugin starts the local bridge automatically (127.0.0.1:8765).
  2. Run the command palette command Sync current note to CSDN draft.
  3. A Chromium window opens the first time — log in to your CSDN account manually.
  4. That's it. The login session is kept in a local browser profile and reused from then on.

5. Verify

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.

Clone this wiki locally