This is a script for batch migration of Markdown images to image hosting.
Install required dependencies.
pip install -r .\requirements.txt
Fill in the configuration information of the image hosting in the .env
file.
For example (use Tencent COS):
NEW_PIC_BED="COS"
COS_SECRET_ID=""
COS_SECRET_KEY=""
COS_BUCKET=""
COS_REGION=""
COS_SAVE_PATH=""
Fill in the Markdown file directory of the image hosting service to be migrated in main.py
For example:
# Fill in the directory of Markdown files waiting to be migrated here
markdown_files = find_files('./my_blogs')
Run main.py
and have a cup of coffee while waiting for the program to finish running.
python3 main.py
- Support Tencent Cloud COS
- Support Alibaba Cloud OSS
- Support Qiniu Cloud Image Hosting
- ...