mirror of
https://codeberg.org/scip/epuppy.git
synced 2025-12-17 12:31:02 +01:00
refactored ebook preparation, separated from calling the pager
This commit is contained in:
16
cmd/root.go
16
cmd/root.go
@@ -59,7 +59,21 @@ func Execute(output io.Writer) int {
|
||||
}
|
||||
}
|
||||
|
||||
progress, err := View(conf)
|
||||
ebook, err := Prepare(conf)
|
||||
if err != nil {
|
||||
return Die(err)
|
||||
}
|
||||
|
||||
if conf.Dump {
|
||||
fmt.Println(ebook.Body)
|
||||
return 0
|
||||
}
|
||||
|
||||
if conf.Debug || conf.XML {
|
||||
return 0
|
||||
}
|
||||
|
||||
progress, err := Pager(ebook)
|
||||
if err != nil {
|
||||
return Die(err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user