Documentation
¶
Overview ¶
Package config is responsible for setting the program config from command-line arguments
Index ¶
Constants ¶
View Source
const ( EnvNoColor = "NO_COLOR" EnvF2NoColor = "F2_NO_COLOR" EnvDebug = "F2_DEBUG" )
View Source
const ( DefaultFixConflictsPattern = "(%d)" DefaultWorkingDir = "." )
Variables ¶
Functions ¶
Types ¶
type Config ¶
type Config struct {
Date time.Time `json:"date"`
BackupLocation io.Writer `json:"-"`
Location *time.Location `json:"location"`
ExcludeDirRegex *regexp.Regexp `json:"exclude_dir_regex"`
ExcludeRegex *regexp.Regexp `json:"exclude_regex"`
IncludeRegex *regexp.Regexp `json:"include_regex"`
Search *Search `json:"search_regex"`
FixConflictsPatternRegex *regexp.Regexp `json:"fix_conflicts_pattern_regex"`
TargetDir string `json:"target_dir"`
FixConflictsPattern string `json:"fix_conflicts_pattern"`
CSVFilename string `json:"csv_filename"`
BackupFilename string `json:"backup_filename"`
WorkingDir string `json:"working_dir"`
SortVariable string `json:"sort_variable"`
Replacement string `json:"replacement"`
DateTimeVariable string `json:"dt"`
ExiftoolOpts ExiftoolOpts `json:"exiftool_opts"`
FilesAndDirPaths []string `json:"files_and_dir_paths"`
FindSlice []string `json:"find_slice"`
ReplacementSlice []string `json:"replacement_slice"`
ReplaceRange []int `json:"replace_range"`
PairOrder []string `json:"pair_order"`
ReplaceLimit int `json:"replace_limit"`
StartNumber int `json:"start_number"`
MaxDepth int `json:"max_depth"`
Sort Sort `json:"sort"`
Revert bool `json:"revert"`
IgnoreExt bool `json:"ignore_ext"`
IgnoreCase bool `json:"ignore_case"`
Verbose bool `json:"verbose"`
IncludeHidden bool `json:"include_hidden"`
Quiet bool `json:"quiet"`
NoColor bool `json:"no_color"`
AutoFixConflicts bool `json:"auto_fix_conflicts"`
Exec bool `json:"exec"`
StringLiteralMode bool `json:"string_literal_mode"`
JSON bool `json:"json"`
Debug bool `json:"debug"`
Recursive bool `json:"recursive"`
ResetIndexPerDir bool `json:"reset_index_per_dir"`
OnlyDir bool `json:"only_dir"`
PipeOutput bool `json:"is_output_to_pipe"`
ReverseSort bool `json:"reverse_sort"`
AllowOverwrites bool `json:"allow_overwrites"`
Pair bool `json:"pair"`
SortPerDir bool `json:"sort_per_dir"`
Clean bool `json:"clean"`
ExifToolVarPresent bool `json:"-"`
IndexPresent bool `json:"-"`
IncludeDir bool `json:"include_dir"`
}
Config represents the program configuration.
func Get ¶
func Get() *Config
Get retrives an already set config or panics if the configuration has not yet been initialized.
type ExiftoolOpts ¶
type ExiftoolOpts struct {
API string `long:"api" json:"api"` // corresponds to the `-api` flag
Charset string `long:"charset" json:"charset"` // corresponds to the `-charset` flag
CoordFormat string `long:"coordFormat" json:"coord_format"` // corresponds to the `-coordFormat` flag
DateFormat string `long:"dateFormat" json:"date_format"` // corresponds to the `-dateFormat` flag
ExtractEmbedded bool `long:"extractEmbedded" json:"extract_embedded"` // corresponds to the `-extractEmbedded` flag
}
ExiftoolOpts defines supported options for customizing Exitool's output.
Click to show internal directories.
Click to hide internal directories.