Skip to content

Commit

Permalink
chore: drop tianlang support.
Browse files Browse the repository at this point in the history
  • Loading branch information
syhily committed Nov 2, 2023
1 parent 71fbaf3 commit 92aa5c9
Show file tree
Hide file tree
Showing 7 changed files with 90 additions and 272 deletions.
10 changes: 1 addition & 9 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,18 +1,10 @@
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.3.0
rev: v4.5.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: local
hooks:
- id: goimports
name: goimports
entry: scripts/goimports.sh
language: script
types: [ go ]
pass_filenames: true
- repo: https://github.com/tekwizely/pre-commit-golang
rev: v1.0.0-rc.1
hooks:
Expand Down
30 changes: 0 additions & 30 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
![Release](https://github.com/bookstairs/bookhunter/workflows/release/badge.svg)

Downloading books from [talebook](https://github.com/talebook/talebook),
[天浪书屋](https://www.tianlangbooks.com),
[SoBooks](https://sobooks.cc)
[中小学教材](https://basic.smartedu.cn/tchMaterial)
and Telegram Channels. This is a totally
Expand Down Expand Up @@ -47,7 +46,6 @@ by your running environment.
|--------------------------------------------------|----------------------------------------|-----------------|----------------------------------------|-----------------------------------|----------------------------------|
| [智慧教育平台](#download-textbooks-for-kids) | <https://basic.smartedu.cn/tchMaterial> |||||
| [Talebook](#download-books-from-talebook) | <https://github.com/talebook/talebook> |||||
| [天浪书屋](#download-books-from-tianlang) | <https://www.tianlangbooks.com> |||||
| [SoBooks](#download-books-from-sobooks) | <https://sobooks.net> |||||
| [Telegram](#download-books-from-telegram-groups) | <https://t.me> |||||

Expand Down Expand Up @@ -123,34 +121,6 @@ Global Flags:
--verbose Print all the logs for debugging
```

### Download books from Tianlang

```text
Usage:
bookhunter tianlang [flags]
Flags:
-d, --download string The book directory you want to use (default ".")
-e, --extract Extract the archive file for filtering
-f, --format strings The file formats you want to download (default [epub,azw3,mobi,pdf,zip])
-h, --help help for tianlang
-i, --initial int The book id you want to start download (default 1)
--ratelimit int The allowed requests per minutes for every thread (default 30)
--refreshToken string Refresh token for aliyun drive
-r, --rename Rename the book file by book id
--secretKey string The secret key for tianlang (default "359198")
--source string The source (aliyun, telecom, lanzou) to download book (default "telecom")
--telecomPassword string Telecom drive password
--telecomUsername string Telecom drive username
-t, --thread int The number of download thead (default 1)
Global Flags:
-c, --config string The config path for bookhunter
--proxy string The request proxy
-a, --user-agent string The request user-agent (default "Mozilla/5.0 (X11; Linux i686; rv:13.0) Gecko/13.0 Firefox/13.0")
--verbose Print all the logs for debugging
```

### Download books from SoBooks

```text
Expand Down
4 changes: 0 additions & 4 deletions cmd/flags/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,6 @@ var (
AppID = int64(0)
AppHash = ""

// Tianlang secret key.

TianlangSecretKey = "359198"

// SoBooks configurations.

SoBooksCode = "844283"
Expand Down
1 change: 0 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@ func Execute() {
func init() {
// Download commands.
rootCmd.AddCommand(talebookCmd)
rootCmd.AddCommand(tianlangCmd)
rootCmd.AddCommand(telegramCmd)
rootCmd.AddCommand(sobooksCmd)
rootCmd.AddCommand(k12Cmd)
Expand Down
84 changes: 0 additions & 84 deletions cmd/tianlang.go

This file was deleted.

51 changes: 25 additions & 26 deletions go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,51 +4,50 @@ go 1.21

require (
github.com/PuerkitoBio/goquery v1.8.1
github.com/bits-and-blooms/bitset v1.5.0
github.com/go-resty/resty/v2 v2.7.0
github.com/gotd/contrib v0.15.0
github.com/gotd/td v0.79.0
github.com/jedib0t/go-pretty/v6 v6.4.6
github.com/bits-and-blooms/bitset v1.10.0
github.com/go-resty/resty/v2 v2.10.0
github.com/gotd/contrib v0.19.0
github.com/gotd/td v0.89.0
github.com/jedib0t/go-pretty/v6 v6.4.9
github.com/k0kubun/go-ansi v0.0.0-20180517002512-3bf9e2903213
github.com/mitchellh/colorstring v0.0.0-20190213212951-d06e56a500db
github.com/schollz/progressbar/v3 v3.13.1
github.com/skip2/go-qrcode v0.0.0-20200617195104-da1b6568686e
github.com/spf13/cobra v1.7.0
github.com/stretchr/testify v1.8.2
go.uber.org/ratelimit v0.2.0
golang.org/x/net v0.9.0
golang.org/x/term v0.7.0
golang.org/x/text v0.9.0
github.com/stretchr/testify v1.8.4
go.uber.org/ratelimit v0.3.0
golang.org/x/net v0.17.0
golang.org/x/term v0.13.0
golang.org/x/text v0.13.0
)

require (
github.com/andres-erbsen/clock v0.0.0-20160526145045-9e14626cd129 // indirect
github.com/andybalholm/cascadia v1.3.1 // indirect
github.com/cenkalti/backoff/v4 v4.2.0 // indirect
github.com/andybalholm/cascadia v1.3.2 // indirect
github.com/benbjohnson/clock v1.3.5 // indirect
github.com/cenkalti/backoff/v4 v4.2.1 // indirect
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/go-faster/errors v0.6.1 // indirect
github.com/go-faster/jx v1.0.0 // indirect
github.com/go-faster/jx v1.1.0 // indirect
github.com/go-faster/xor v1.0.0 // indirect
github.com/gotd/ige v0.2.2 // indirect
github.com/gotd/neo v0.1.5 // indirect
github.com/inconshreveable/mousetrap v1.1.0 // indirect
github.com/klauspost/compress v1.16.4 // indirect
github.com/kr/pretty v0.3.0 // indirect
github.com/mattn/go-isatty v0.0.18 // indirect
github.com/mattn/go-runewidth v0.0.14 // indirect
github.com/klauspost/compress v1.17.2 // indirect
github.com/mattn/go-isatty v0.0.20 // indirect
github.com/mattn/go-runewidth v0.0.15 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/rivo/uniseg v0.4.4 // indirect
github.com/segmentio/asm v1.2.0 // indirect
github.com/spf13/pflag v1.0.5 // indirect
go.opentelemetry.io/otel v1.14.0 // indirect
go.opentelemetry.io/otel/trace v1.14.0 // indirect
go.uber.org/atomic v1.10.0 // indirect
go.opentelemetry.io/otel v1.19.0 // indirect
go.opentelemetry.io/otel/trace v1.19.0 // indirect
go.uber.org/atomic v1.11.0 // indirect
go.uber.org/multierr v1.11.0 // indirect
go.uber.org/zap v1.24.0 // indirect
golang.org/x/crypto v0.8.0 // indirect
golang.org/x/sync v0.1.0 // indirect
golang.org/x/sys v0.7.0 // indirect
go.uber.org/zap v1.26.0 // indirect
golang.org/x/crypto v0.14.0 // indirect
golang.org/x/sync v0.4.0 // indirect
golang.org/x/sys v0.13.0 // indirect
gopkg.in/yaml.v3 v3.0.1 // indirect
nhooyr.io/websocket v1.8.7 // indirect
nhooyr.io/websocket v1.8.10 // indirect
rsc.io/qr v0.2.0 // indirect
)
Loading

0 comments on commit 92aa5c9

Please sign in to comment.