mirror of
https://github.com/celogeek/go-comic-converter.git
synced 2025-06-27 07:39:55 +02:00
add nofilter option
This commit is contained in:
parent
ee00ed2615
commit
58cd5f5399
@ -128,6 +128,7 @@ func (c *Converter) InitParse() {
|
||||
c.AddBoolParam(&c.Options.Reset, "reset", false, "Reset your parameters to default")
|
||||
|
||||
c.AddSection("Other")
|
||||
c.AddBoolParam(&c.Options.NoFilter, "nofilter", false, "Disable all filter")
|
||||
c.AddIntParam(&c.Options.Workers, "workers", runtime.NumCPU(), "Number of workers")
|
||||
c.AddBoolParam(&c.Options.Dry, "dry", false, "Dry run to show all options")
|
||||
c.AddBoolParam(&c.Options.DryVerbose, "dry-verbose", false, "Display also sorted files after the TOC")
|
||||
@ -212,6 +213,15 @@ func (c *Converter) Parse() {
|
||||
c.Options.AutoRotate = true
|
||||
c.Options.AutoSplitDoublePage = true
|
||||
}
|
||||
|
||||
if c.Options.NoFilter {
|
||||
c.Options.Crop = false
|
||||
c.Options.Brightness = 0
|
||||
c.Options.Contrast = 0
|
||||
c.Options.AutoRotate = false
|
||||
c.Options.NoBlankImage = false
|
||||
c.Options.NoResize = true
|
||||
}
|
||||
}
|
||||
|
||||
// Check parameters
|
||||
|
@ -51,6 +51,7 @@ type Options struct {
|
||||
|
||||
// Other
|
||||
Workers int `yaml:"-"`
|
||||
NoFilter bool `yaml:"-"`
|
||||
Dry bool `yaml:"-"`
|
||||
DryVerbose bool `yaml:"-"`
|
||||
Quiet bool `yaml:"-"`
|
||||
|
Loading…
x
Reference in New Issue
Block a user