Documentation ¶
Overview ¶
Manage options with default value from config.
Index ¶
- type Options
- func (o *Options) AvailableProfiles() string
- func (o *Options) FileName() string
- func (o *Options) GetProfile() *profiles.Profile
- func (o *Options) Header() string
- func (o *Options) LoadConfig() error
- func (o *Options) ResetConfig() error
- func (o *Options) SaveConfig() error
- func (o *Options) ShowConfig() string
- func (o *Options) String() string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct { // Output Input string `yaml:"-"` Output string `yaml:"-"` Author string `yaml:"-"` Title string `yaml:"-"` // Config Profile string `yaml:"profile"` Quality int `yaml:"quality"` Grayscale bool `yaml:"grayscale"` GrayscaleMode int `yaml:"grayscale_mode"` // 0 = normal, 1 = average, 2 = luminance Crop bool `yaml:"crop"` CropRatioLeft int `yaml:"crop_ratio_left"` CropRatioUp int `yaml:"crop_ratio_up"` CropRatioRight int `yaml:"crop_ratio_right"` CropRatioBottom int `yaml:"crop_ratio_bottom"` Brightness int `yaml:"brightness"` Contrast int `yaml:"contrast"` AutoContrast bool `yaml:"auto_contrast"` AutoRotate bool `yaml:"auto_rotate"` AutoSplitDoublePage bool `yaml:"auto_split_double_page"` NoBlankImage bool `yaml:"no_blank_image"` Manga bool `yaml:"manga"` HasCover bool `yaml:"has_cover"` LimitMb int `yaml:"limit_mb"` StripFirstDirectoryFromToc bool `yaml:"strip_first_directory_from_toc"` SortPathMode int `yaml:"sort_path_mode"` ForegroundColor string `yaml:"foreground_color"` BackgroundColor string `yaml:"background_color"` NoResize bool `yaml:"noresize"` Format string `yaml:"format"` AspectRatio float64 `yaml:"aspect_ratio"` PortraitOnly bool `yaml:"portrait_only"` TitlePage int `yaml:"title_page"` // Default Config Show bool `yaml:"-"` Save bool `yaml:"-"` Reset bool `yaml:"-"` // Shortcut Auto bool `yaml:"-"` NoFilter bool `yaml:"-"` MaxQuality bool `yaml:"-"` BestQuality bool `yaml:"-"` GreatQuality bool `yaml:"-"` GoodQuality bool `yaml:"-"` // Other Workers int `yaml:"-"` Dry bool `yaml:"-"` DryVerbose bool `yaml:"-"` Quiet bool `yaml:"-"` Version bool `yaml:"-"` Help bool `yaml:"-"` // contains filtered or unexported fields }
func (*Options) AvailableProfiles ¶
all available profiles
func (*Options) GetProfile ¶
shortcut to get current profile
func (*Options) ResetConfig ¶
reset all settings to default value
func (*Options) SaveConfig ¶
save all current settings as futur default value
func (*Options) ShowConfig ¶
Get current settings for fields that can be saved
Click to show internal directories.
Click to hide internal directories.