34 for(
unsigned int i = 0; i < confOpt->
v_showList.size(); i++ )
41 while( pos < confOpt->v_showList[i][1].length() &&
showNameIndex == -1 )
46 string cmpStr = confOpt->
v_showList[i][1].substr( oPos, nPos-oPos );
48 if ( p_showName.find(cmpStr) < p_showName.length() )
88 for( ; i < fillStr.length(); i++ )
105 unsigned int found = fillStr.find( sp );
107 while( found < fillStr.length() )
110 fillStr.erase( found, 1 );
112 found = fillStr.find( sp );
116 if ( fillStr[0] == sp[0] )
119 fillStr = fillStr.substr( 1 );
123 int l = fillStr.length();
126 if ( fillStr[l-1] == sp[0] )
129 fillStr = fillStr.substr( 0, l-1 );
145 for(
unsigned int i = 0; i < confOpt->
v_blackList.size(); i++ )
148 unsigned int pos = tagStr.find( confOpt->
v_blackList[i] );
150 if( pos < tagStr.length() )
153 tagStr.erase( pos, confOpt->
v_blackList[i].length() );
166 string sp =
"\"'[({";
169 capStr[0] = toupper(capStr[0]);
172 for (
unsigned int i=1; i < capStr.length(); i++ )
175 if ( capStr[i-1] ==
' ' )
178 if ( capStr[i] == sp[0] || capStr[i] == sp[1] || capStr[i] == sp[2] || capStr[i] == sp[3] || capStr[i] == sp[4] )
181 capStr[i+1] = toupper( capStr[i+1] );
184 capStr[i] = toupper( capStr[i] );
187 if ( capStr[i] ==
'-' )
190 capStr[i+1] = toupper( capStr[i+1] );
212 unsigned int textPos = capStr.find( cmpStr.c_str() );
214 while( textPos < capStr.length() )
217 capStr[textPos+1] = tolower( cmpStr[1] );
219 textPos = capStr.find( cmpStr.c_str(), textPos+1 );
231 stringstream tempStr;
246 show += tempStr.str();
260 show += tempStr.str();
277 show += tempStr.str();
287 if(
title.length() > 0 )
306 stringstream tempStr;
static bool getFlags(flagValue)
Retrieves the user configuration flags from an array.
void newDir(ConfigOpts *)
Generates the new directory in which the file will be located.
bool overrideDir
Override directory flag - (WTF?)
void newName(ConfigOpts *)
Generates the new filename from parsed data complete with extension.
bool findShow(string &, ConfigOpts *)
Determines if the given filename contains a show name.
static void cleanUp(string &, ConfigOpts *)
Removes filler characters and extra white spaces from a string.
string show
Holds the show's new filename.
string pepisode
Holds the show's episode part.
int episode
Holds the show's episode number.
static vector< vector< string > > v_showList
A vector of vectors the will store a list of shows and a list of their episodes.
int xepisode
Holds the show's multi-episode number.
static void removeTag(string &, ConfigOpts *)
Removes release group tags as defined in the blacklist file.
int showNameIndex
Holds the index of the showname.
string extension
Holds the show's new extension.
string dir
Holds the show's new directory.
static string getOptions(optionValue)
Retrieves the user configuration options from an array.
output directory from args
The Parser class creates an object for each input file and parses file and folder names...
the delimiters used to parse showlist lines
string title
Holds the show's new title.
the delimters used to parse the no uppercased words
static void titleCase(string &, ConfigOpts *)
Standardizes capitalization of titles.
holds the season/episode and title separator
words that should not be uppercased
int season
Holds the show's season number.
Stores all config options, settings, and flags for clerk.
static vector< string > v_blackList
A vector that holds a list of tags to be removed from each file's name.