mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-05-25 08:12:36 +02:00
make public epuboptions
This commit is contained in:
parent
f34ba5a37c
commit
4a12fe5715
@ -41,7 +41,7 @@ type Image struct {
|
|||||||
AppleBookCompatibility bool
|
AppleBookCompatibility bool
|
||||||
}
|
}
|
||||||
|
|
||||||
type Options struct {
|
type EPUBOptions struct {
|
||||||
Input string
|
Input string
|
||||||
Output string
|
Output string
|
||||||
Title string
|
Title string
|
||||||
@ -58,7 +58,7 @@ type Options struct {
|
|||||||
Image *Image
|
Image *Image
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Options) WorkersRatio(pct int) (nbWorkers int) {
|
func (o *EPUBOptions) WorkersRatio(pct int) (nbWorkers int) {
|
||||||
nbWorkers = o.Workers * pct / 100
|
nbWorkers = o.Workers * pct / 100
|
||||||
if nbWorkers < 1 {
|
if nbWorkers < 1 {
|
||||||
nbWorkers = 1
|
nbWorkers = 1
|
||||||
@ -66,6 +66,6 @@ func (o *Options) WorkersRatio(pct int) (nbWorkers int) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
func (o *Options) ImgStorage() string {
|
func (o *EPUBOptions) Temp() string {
|
||||||
return fmt.Sprintf("%s.tmp", o.Output)
|
return fmt.Sprintf("%s.tmp", o.Output)
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user