Skip to content

Yuque-exporter is a simple tool to export Yuque repo to GitHub.

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-Apache-2.0
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

leryn1122/yuque-exporter

Repository files navigation

README

TL;DR

Yuque-exporter is a simple tool to export Yuque repo to GitHub.

Table of Contents

Background

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.

Install

Prerequisites

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

Usage

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

Related Efforts

Those repos are referenced on:

Maintainers

@Leryn.

License

MIT © Leryn

About

Yuque-exporter is a simple tool to export Yuque repo to GitHub.

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-Apache-2.0
MIT
LICENSE-MIT

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published