From 4a12fe5715de8e2b898456ad836b26f0099429c9 Mon Sep 17 00:00:00 2001 From: celogeek <65178+celogeek@users.noreply.github.com> Date: Fri, 5 Jan 2024 17:55:14 +0100 Subject: [PATCH] make public epuboptions --- .../epub_options.go => pkg/epuboptions/epuboptions.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) rename internal/epub/options/epub_options.go => pkg/epuboptions/epuboptions.go (92%) diff --git a/internal/epub/options/epub_options.go b/pkg/epuboptions/epuboptions.go similarity index 92% rename from internal/epub/options/epub_options.go rename to pkg/epuboptions/epuboptions.go index 2de0277..aadf573 100644 --- a/internal/epub/options/epub_options.go +++ b/pkg/epuboptions/epuboptions.go @@ -41,7 +41,7 @@ type Image struct { AppleBookCompatibility bool } -type Options struct { +type EPUBOptions struct { Input string Output string Title string @@ -58,7 +58,7 @@ type Options struct { Image *Image } -func (o *Options) WorkersRatio(pct int) (nbWorkers int) { +func (o *EPUBOptions) WorkersRatio(pct int) (nbWorkers int) { nbWorkers = o.Workers * pct / 100 if nbWorkers < 1 { nbWorkers = 1 @@ -66,6 +66,6 @@ func (o *Options) WorkersRatio(pct int) (nbWorkers int) { return } -func (o *Options) ImgStorage() string { +func (o *EPUBOptions) Temp() string { return fmt.Sprintf("%s.tmp", o.Output) }