output formatting
This commit is contained in:
parent
44e58de30a
commit
147988315d
10
main.go
10
main.go
@ -23,8 +23,8 @@ var (
|
|||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
colRed = "\033[31m"
|
colRed = "\033[31;1m"
|
||||||
colYellow = "\033[33m"
|
colYellow = "\033[33;1m"
|
||||||
colReset = "\033[m"
|
colReset = "\033[m"
|
||||||
)
|
)
|
||||||
|
|
||||||
@ -377,11 +377,11 @@ func main() {
|
|||||||
var b bytes.Buffer
|
var b bytes.Buffer
|
||||||
e, err := NewExtractor(url, &b)
|
e, err := NewExtractor(url, &b)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
printErr("Error: %v", err)
|
||||||
}
|
}
|
||||||
err = e.FetchAndProcessIndex()
|
err = e.FetchAndProcessIndex()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
printErr("Error: %v", err)
|
||||||
}
|
}
|
||||||
bookName := e.Meta.ToTitle()
|
bookName := e.Meta.ToTitle()
|
||||||
printInfo("Book: %v", bookName)
|
printInfo("Book: %v", bookName)
|
||||||
@ -392,7 +392,7 @@ func main() {
|
|||||||
fmt.Printf("* Downloading chapter %v/%v...\r", i+1, len(e.ChapterUrls))
|
fmt.Printf("* Downloading chapter %v/%v...\r", i+1, len(e.ChapterUrls))
|
||||||
err = e.FetchAndProcessChapter(chapter)
|
err = e.FetchAndProcessChapter(chapter)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
printErr("Error: %v", err)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user