Yuque-exporter is a simple tool to export Yuque repo to GitHub.
A tiny and tailored Python3 exporter downloads Yuque repo documents in format of markdown through Yuque OpenAPI V2.0, and archive them to GitHub repo. It was inspired by M1r0ku/YuqueExport.
Now it run as a Kubernetes Cronjob, synchronizing every 8 hours, instead of Linux crontab in early weeks.
It is written in Python 3.11, and it is available to compile as a binary executable.
- Python 3.11+
- Pipenv
- Git
- PyCharm (Recommended)
git clone https://github.com/leryn1122/yuque-exporter.git
make install build
Apply for Yuque token and write your username with token in the config file ~/.yuque/config
.
pipenv run python3 src/main.py --log-level=INFO --yuque --git-push
dist/yuque-export --log-level=INFO --yuque --git-push
It's recommended to run as a Kubernetes Cronjob. Fill in deploy/raw/secret.yaml
with the content of ~/.yuque/config
.
kubectl create ns cron
kubectl apply -f deploy/raw/secret.yaml -n cron
kubectl apply -f deploy/raw/cronjob.yaml -n cron
Those repos are referenced on:
MIT © Leryn