Stores all config options, settings, and flags for clerk. More...
#include <options.hpp>
Public Member Functions | |
ConfigOpts () | |
Default constructor, sets all flags and options to default values. More... | |
~ConfigOpts () | |
Default destructor, empties showlist, blacklist, and filelist vectors. More... | |
Static Public Member Functions | |
static bool | Configure (int, char **) |
Reads all arguments into their appropriate variables. More... | |
static void | setOptions (optionValue, string) |
Sets the user configuration options into an array. More... | |
static string | getOptions (optionValue) |
Retrieves the user configuration options from an array. More... | |
static void | setFlags (flagValue) |
Sets the user configuration flags into an array. More... | |
static bool | getFlags (flagValue) |
Retrieves the user configuration flags from an array. More... | |
Static Public Attributes | |
static vector< vector< string > > | v_showList |
A vector of vectors the will store a list of shows and a list of their episodes. More... | |
static vector< string > | v_blackList |
A vector that holds a list of tags to be removed from each file's name. More... | |
static vector< string > | v_fileList |
A vector that contains the list of input files to be parsed. More... | |
Static Private Member Functions | |
static bool | argsTest (int, char **) |
Reads command line arguments into their appropriate variables. More... | |
static void | configRead () |
Reads configuration arguments into their appropriate variables from the configuration file. More... | |
static void | configCheck () |
Sets any unset configuration options to their default values. More... | |
static bool | argsRead (int, char **) |
Reads command line args into their appropriate variables. More... | |
static bool | argsCheck (int, string) |
Reads command line args into their appropriate variables. (WTF?) More... | |
static void | writeFout (string) |
Recreates the showlist, blacklist, and configuration files. More... | |
static void | writeShowList (string) |
Generates a default showlist file in a given directory. More... | |
static void | writeBlackList (string) |
Generates a default blacklist file in the given directory. More... | |
static void | writeConfigFile (string) |
Generates a default configuration file in the given directory. More... | |
static void | printHelp () |
Outputs the help information to the console. More... | |
static void | printVersion () |
Outputs the version information to the console. More... | |
Static Private Attributes | |
static string | options [Default_opt] |
static bool | flags [Default_flag] |
Stores all config options, settings, and flags for clerk.
Checks the existence of a configuration file, and stores the options then reads and stores the arguments from the command line. Recreates the showlist, blacklist, and config files. Creates vectors to store the show list, black list, and files list. Prints help and version information.
Definition at line 60 of file options.hpp.
Enumerator | |
---|---|
SeasonEpisodeError | |
ShowNameMatchError |
A Show name match failure occured. |
DuplicateEpisodeError |
A duplicate Episode failure occured. |
SortFailureError |
A sort failure occured. |
NoError |
No errors occured. |
Definition at line 121 of file options.hpp.
Definition at line 94 of file options.hpp.
Definition at line 67 of file options.hpp.
ConfigOpts::ConfigOpts | ( | ) |
Default constructor, sets all flags and options to default values.
Definition at line 28 of file mainPublic.cpp.
ConfigOpts::~ConfigOpts | ( | ) |
Default destructor, empties showlist, blacklist, and filelist vectors.
Definition at line 37 of file mainPublic.cpp.
|
staticprivate |
Reads command line args into their appropriate variables. (WTF?)
errorFlag | - the number of error arguments submitted. |
errorArg | - the contents of the error arguments submitted. |
Definition at line 192 of file readArgs.cpp.
|
staticprivate |
Reads command line args into their appropriate variables.
argCount | - the number of arguments submitted. |
argVar | - the contents of the arguments submitted. |
Definition at line 17 of file readArgs.cpp.
|
staticprivate |
Reads command line arguments into their appropriate variables.
argCount | - the number of arguments to be read in. |
argVar | - the contents of each argument. |
Definition at line 13 of file testArgs.cpp.
|
staticprivate |
Sets any unset configuration options to their default values.
Definition at line 273 of file readOpts.cpp.
|
staticprivate |
Reads configuration arguments into their appropriate variables from the configuration file.
Definition at line 13 of file readOpts.cpp.
|
static |
Reads all arguments into their appropriate variables.
argCount | - the number of arguments |
argVar | - an array of arguments |
Definition at line 66 of file mainPublic.cpp.
|
static |
Retrieves the user configuration flags from an array.
optInt | - the index of the argument option |
Definition at line 280 of file mainPublic.cpp.
|
static |
Retrieves the user configuration options from an array.
optInt | - the index of the argument option |
Definition at line 129 of file mainPublic.cpp.
|
staticprivate |
Outputs the help information to the console.
Definition at line 53 of file outPut.cpp.
|
staticprivate |
Outputs the version information to the console.
Definition at line 110 of file outPut.cpp.
|
static |
Sets the user configuration flags into an array.
optInt | - the index of the argument flag |
Definition at line 137 of file mainPublic.cpp.
|
static |
Sets the user configuration options into an array.
optInt | - the index of the argument option |
argStr | - the argument to be stored |
Definition at line 105 of file mainPublic.cpp.
|
staticprivate |
Generates a default blacklist file in the given directory.
dirOut | - the directory location to which the blacklist file is to be written. |
Definition at line 12 of file writeBlack.cpp.
|
staticprivate |
Generates a default configuration file in the given directory.
dirOut | - the directory location to which the configuration file is to be written. |
Definition at line 12 of file writeConf.cpp.
|
staticprivate |
Recreates the showlist, blacklist, and configuration files.
dirOut | - the directory to which these files should be output. |
Definition at line 16 of file outPut.cpp.
|
staticprivate |
Generates a default showlist file in a given directory.
dirOut | - the directory location to which the showlist file is to be written. |
Definition at line 12 of file writeShow.cpp.
|
staticprivate |
Configuration flags
flags[0] = inputfile // read input from a file flags[1] = inputdir // read input from a directory flags[2] = recurse // recurse directories flags[3] = input // not sure if needed flags[4] = output // not sure if needed flags[5] = execute // perform an internal action instead of writing a script flags[6] = test // take no real actions - just output to stdout flags[7] = script // write a script instead of internal action flags[8] = rename // rename the input files flags[9] = move // move the input files flags[10] = copy // copy the input files flags[11] = quiet // output nothing flags[12] = summary // output summary flags[13] = verbose // output summary and error information flags[14] = log // output to log instead of stdout flags[15] = help // output help info flags[16] = version // output version information flags[17] = seasondd // season is double digit flags[18] = rewrite // rewrite showlist, blacklist, config files flags[19] = noConfig // clerk.conf not found flags[20] = xml // output xml file flags[21] = gap // output gap file
Definition at line 192 of file options.hpp.
|
staticprivate |
Configuration options
options[0] = episodeSize // max size of a episode, in bytes options[1] = blackList // the location of the blacklist file options[2] = showList // the location of the showlist file options[3] = delimShowList // the delimters used to parse showlist lines options[4] = fileFilter // file types that should be filtered options[5] = delimFilter // the delimters used to parse the file filter options[6] = filler // filler options[7] = noCase // words that should not be uppercased options[8] = delimCase // the delimters used to parse the no uppercased words options[9] = titleFormat // holds the season/episode and title separator options[10] = inputArg // input directory/file from args options[11] = outputArg // output directory from args options[12] = logfile // holds log file name and location options[13] = scriptfile // holds script file name and location options[14] = rewriteLoc // holds showlist, blacklist, config rewrite location options[15] = recurse // holds the recurse option options[16] = mode // holds the mode option options[17] = execute // holds the execute option options[18] = level // holds the output level option options[19] = seasondd // holds season digit option options[20] = xml // holds xml file name and location options[21] = gap // holds gap file name and location
Definition at line 162 of file options.hpp.
|
static |
A vector that holds a list of tags to be removed from each file's name.
Definition at line 141 of file options.hpp.
|
static |
A vector that contains the list of input files to be parsed.
Definition at line 142 of file options.hpp.
|
static |
A vector of vectors the will store a list of shows and a list of their episodes.
Definition at line 140 of file options.hpp.