@liblaf liblaf authored on 26 Sep 2023
.github fix: fix parse error of time 2 years ago
make docs: update demo 2 years ago
template fix: fix parse error of time 2 years ago
thu_learn_downloader fix: fix parse error of time 2 years ago
.envrc build: config direnv 2 years ago
.gitignore docs: update demo 2 years ago
.gitmodules fix: strip homework title 2 years ago
.pre-commit-config.yaml fix: fix parse error of time 2 years ago
CHANGELOG.md chore(main): release 0.1.18 (#67) 2 years ago
LICENSE docs(license): update copyright year(s) (#13) 3 years ago
Makefile build: fix build on Windows 2 years ago
README.md docs: pretty README 2 years ago
demo.tape docs: update demo 2 years ago
main.py fix: use Typer app instead of command 3 years ago
poetry.lock fix: fix parse error of time 2 years ago
pyproject.toml chore(main): release 0.1.18 (#67) 2 years ago
requirements.txt fix: fix parse error of time 2 years ago
README.md

THU Web Learning Downloader

Download everything from Web Learning of Tsinghua University

Build Status
Python Version
PyPI

Demo

Demo

The resulting file structure looks like:

thu-learn
└── Quantum Mechanics(1)
   ├── docs
   │  └── 电子教案
   │     ├── 01-0量子力学介绍1.pdf
   │     └── 04-0量子力学介绍2.pdf
   └── work
      └── 01-第一周作业
         ├── attach-第一周作业.pdf
         ├── submit-第一周作业.pdf
         └── README.md

Usage

Usage:

$ tld [OPTIONS]

Options:

  • -u, --username TEXT: [default: liqin20]
  • -p, --password TEXT: [required]
  • -s, --semester TEXT: [default: 2022-2023-2]
  • -c, --course TEXT
  • --prefix PATH: [default: /home/liblaf/Desktop/thu-learn]
  • -s, --size-limit INTEGER: [default: 9223372036854775807]
  • --help: Show this message and exit.

Features

  • fast concurrent download
  • pretty TUI powered by rich
  • auto set mtime of downloaded files according to timestamp of remote file
  • auto skip download when local file is newer
  • dump homework details into README.md in each homework folder
  • pretty markdown files powered by prettier (require prettier installed)

Installation

  • download pre-built binary form GitHub Releases
  • pip install thu-learn-downloader
  • pipx install thu-learn-downloader