zhenbin_huang30 downloadsSync Markdown notes to CSDN blog drafts via a local Playwright bridge, with multi-account support, draft management, and write-back editing.
An Obsidian plugin that syncs the current Markdown note to a CSDN blog draft, and lets you manage existing drafts without leaving the vault.
Full usage documentation lives in the Wiki — including a 中文快速上手指南.
title, description / summary, tags, and cover / image from YAML frontmatterThe plugin ships a small Python bridge script (csdn_bridge.py, also embedded in main.js and released to the plugin folder on first run). When enabled, the plugin starts this script with the Python interpreter configured in the settings, and talks to it over local HTTP at http://127.0.0.1:8765. The bridge drives a Playwright Chromium browser to fill the CSDN Markdown editor and save drafts.
%LOCALAPPDATA%\CSDN-Draft-Publisher\.127.0.0.1 only and never sends your notes anywhere except to CSDN itself when saving a draft. Draft sync requires internet access to csdn.net.csdn_bridge.py into its own plugin folder, and Playwright keeps browser login profiles under %LOCALAPPDATA%\CSDN-Draft-Publisher\. None of your vault notes are copied outside the vault.Install and enable the plugin.
Install Python 3.11+ and the bridge dependencies:
pip install playwright==1.62.0
python -m playwright install chromium
A conda environment works as well (environment.yml is provided).
Open the plugin settings and make sure Python command points to a Python that has Playwright installed (python by default, or a full path such as a conda env interpreter).
Turn on Enable bridge service. The plugin starts the local bridge automatically.
Run Sync current note to CSDN draft. On first run a browser window opens — log in to CSDN manually once; the session is reused afterwards.
| Setting | Description |
|---|---|
| Bridge URL | Local bridge address, default http://127.0.0.1:8765 |
| Enable bridge service | Starts the Python bridge with the configured interpreter; disabling only stops a bridge the plugin itself started |
| Python command | Python interpreter used to launch the bridge |
| CSDN accounts | Add, rename, log in, and clear login state per account; each account has its own browser profile |
If port 8765 is already served by a manually started bridge, the plugin reuses it and will not stop it when the toggle goes off.
---
title: My article title
description: One-sentence summary
tags:
- Python
- Obsidian
cover: https://example.com/cover.png
---
The repository root doubles as the plugin folder:
main.js — plugin source (plain JavaScript, no build step). It embeds a base64 copy of the bridge script and writes it next to itself on first run.csdn_bridge.py — the Python bridge (source of truth for the embedded copy; regenerate the base64 constant when you change it).manifest.json, versions.json — plugin metadata for the Obsidian community directory.Install a dev copy by symlinking or copying this folder to <vault>/.obsidian/plugins/csdn-draft-publisher/ and reloading Obsidian.
See CONTRIBUTING.md for the local check commands, branch and commit conventions, and how releases are cut (RELEASE-CHECKLIST.md). Bug reports and feature requests use the issue templates; security issues go through SECURITY.md.