forked from zsakvo/dhbooker
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstruct.go
More file actions
56 lines (47 loc) · 1 KB
/
struct.go
File metadata and controls
56 lines (47 loc) · 1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
package main
import (
"sync"
"github.com/Unknwon/goconfig"
"github.com/schollz/progressbar"
"github.com/tidwall/gjson"
)
const appVersion = "2.1.032"
const initEncryptKey = "zG2nSeEfSHfvTCHy5LCcqtBbQehKNLXn"
var downloadType string
var bookCoverURL string
var tocNcx string
var contentOpf string
var bookID string
var bookName string
var bookAuthor string
var bookChapterNum int
var validChapterNum int
var invalidChapterID []string
var chapterTitles []string
var chapterIDs []gjson.Result
var validChapterIDs []string
var chapters sync.Map
var invalidChapters sync.Map
var bookTmpPath string
// var chapters map[string]string
// var counter = struct{
// sync.RWMutex
// chapters map[string]string
// }
var bar progressbar.ProgressBar
var token ctoken
var path pathSettings
var config *goconfig.ConfigFile
type ctoken struct {
readerID string
loginToken string
account string
}
type accountSettings struct {
username string
password string
}
type pathSettings struct {
tmp string
out string
}