Features:
- Write csdn article in markdown format with local editor such as Vim, Visual Code, Emacs
- Currently local filename (without .md extension) must equals to remote article name, which is hard coded, so that the tool can match the remote article
- Preview using csdn offical previewer on the fly
- Custom dark theme (currently hard coded)
Screenshot:
git clone
cd sync-csdn-article-markdown
npm install -g
npm install -g sync-csdn-article-markdown
- go to 发布文章 and click back
- click "Markdown编辑器" to enable markdown format as default
-
create a article which title is exact match the local file (without .md extension)
-
create a local .md file with name
<article-name>.md
terminal command:
sync-csdn-article-markdown <article-name>.md
login csdn with any method
terminal stdout:
Waiting for 3s to login
Session expired, login to csdn.net
You have logged in csdn.net, please retry
terminal command:
sync-csdn-article-markdown <article-name>.md
save local file and preview using remote previewer
reinstall the package or followings:
chromedriver
selenium-webdriver
rm -rf ~/.sync-csdn-article-markdown