前言
一:环境准备
1.1:安装git,python3
yum -y install git
yum -y install python3
git clone https://github.com/DeppWang/youdaonote-pull.git
迁移参考文档:https://github.com/DeppWang/youdaonote-pull
1.2:遇到报错
[root@jenkins youdaonote-pull]# python3 pull.py
Traceback (most recent call last):
File "pull.py", line 4, in <module>
import requests
ModuleNotFoundError: No module named 'requests'
安装所需模块即可
pip3 install requests
pip3 install markdownify
同理,安装其他缺少模块
1.3:修改配置文件,执行python脚本
[root@jenkins youdaonote-pull]# vim config.json
{
"username": "your_youdaonote_username",
"password": "your_youdaonote_password",
"local_dir": "",
"ydnote_dir": "",
"smms_secret_token": ""
}
[root@jenkins youdaonote-pull]# python3 pull.py
1.4:等待导入完成
压缩成zip包,导出到本地
[root@jenkins youdaonote-pull]# zip -r youdaonote.zip youdaonote/