forked from markus/S_New4
v3.0.2: update search helpmenüe && !! completly update Defaults file
This commit is contained in:
parent
192433cbb7
commit
238f5181aa
@ -136,24 +136,48 @@ int loadDefaulOptions(Settings &settings)
|
|||||||
return 89;
|
return 89;
|
||||||
} else {
|
} else {
|
||||||
std::cout << " => Erstelle Defaults-Datei: " << settings.defaultsFilePath << std::endl;
|
std::cout << " => Erstelle Defaults-Datei: " << settings.defaultsFilePath << std::endl;
|
||||||
ofs << "#Mit # kann man eine Zeile deaktivieren." << std::endl;
|
ofs << "# -> Mit # kann man eine Zeile deaktivieren." << std::endl;
|
||||||
ofs << "DefaultFileVersion="<< settings.defaultFileVersion << std::endl;
|
ofs << "DefaultFileVersion="<< settings.defaultFileVersion << std::endl << std::endl;
|
||||||
ofs << "#DebugModus=false" << std::endl;
|
|
||||||
ofs << std::endl;
|
|
||||||
ofs << "#Socks5Proxy=127.0.0.1:9050" << std::endl;
|
|
||||||
ofs << "#FarbloseAusgabe=false" << std::endl;
|
|
||||||
ofs << "#OutputFile=/tmp/a" << std::endl;
|
|
||||||
ofs << std::endl;
|
|
||||||
ofs << "default-GenaueHoster=Vivo,GoUnlimited" << std::endl;
|
|
||||||
ofs << "#default-Sprachen=GerDub,GerSub,Eng" << std::endl;
|
|
||||||
ofs << "#default-CheckSuchMuster=S%Staffel%E%Folge%" << std::endl;
|
|
||||||
ofs << "#default-CheckMaxDirs=20" << std::endl;
|
|
||||||
ofs << "#default-maxThreads=0" << std::endl;
|
|
||||||
ofs << std::endl;
|
|
||||||
ofs << "#search-AchteAufGroßUndKleinschreibung=false" << std::endl;
|
|
||||||
ofs << "#Mit 0 Können Sie die Warnung deaktivieren:" << std::endl;
|
|
||||||
ofs << "#search-UpdateWarnungNachTagen=10" << std::endl;
|
|
||||||
|
|
||||||
|
ofs << "#" << std::endl << "# -> Globale Einstellungen:" << std::endl << "#" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Einstellung gleicht dem Parameter -d, --debug-mode:" << std::endl;
|
||||||
|
ofs << "#DebugModus=false" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Einstellung gleicht dem Parameter -p, --socks5-proxy:" << std::endl;
|
||||||
|
ofs << "#Socks5Proxy=127.0.0.1:9050" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Einstellung gleicht dem Parameter -c, --colorless:" << std::endl;
|
||||||
|
ofs << "#FarbloseAusgabe=false" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Einstellung gleicht dem Parameter -o [Pfad], --output-file," << std::endl;
|
||||||
|
ofs << "# falls dieser in der ausgeführeten Unterfunktion vorhanden ist:" << std::endl;
|
||||||
|
ofs << "#OutputFile=/tmp/a" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "#" << std::endl << "# -> Einstellungen für default Modus:" << std::endl << "#" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Standart Wert für Parameter: -g, --genaue-hoster:" << std::endl;
|
||||||
|
ofs << "default_GenaueHoster=Vivo,GoUnlimited" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Standart Wert für Parameter: -l, --languages:" << std::endl;
|
||||||
|
ofs << "#default_Sprachen=GerDub,GerSub,Eng" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Standart Wert für Parameter: -m, --check-muster:" << std::endl;
|
||||||
|
ofs << "#default_CheckSuchMuster=S%Staffel%E%Folge%" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Standart Wert für Parameter: -D, --check-max-dirs:" << std::endl;
|
||||||
|
ofs << "#default_CheckMaxDirs=20" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Standart Wert für Parameter: -t, --threads:" << std::endl;
|
||||||
|
ofs << "#default_maxThreads=0" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "#" << std::endl << "# -> Einstellungen für search Modus:" << std::endl << "#" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Standart Wert für Parameter: -e, --exactly-writing:" << std::endl;
|
||||||
|
ofs << "#search-AchteAufGroßUndKleinschreibung=false" << std::endl << std::endl;
|
||||||
|
|
||||||
|
ofs << "# -> Mit 0 Können Sie die Warnung deaktivieren:" << std::endl;
|
||||||
|
ofs << "#search-UpdateWarnungNachTagen=10" << std::endl << std::endl;
|
||||||
|
|
||||||
ofs.close();
|
ofs.close();
|
||||||
}
|
}
|
||||||
@ -195,32 +219,32 @@ int loadDefaulOptions(Settings &settings)
|
|||||||
if(settings.debugMode)
|
if(settings.debugMode)
|
||||||
std::cout << " > Defaults: DebugMode: true" << std::endl;
|
std::cout << " > Defaults: DebugMode: true" << std::endl;
|
||||||
|
|
||||||
} else if (what == "default-GenaueHoster") {
|
} else if (what == "default_GenaueHoster") {
|
||||||
settings.genaueHoster=data;
|
settings.genaueHoster=data;
|
||||||
if(settings.debugMode)
|
if(settings.debugMode)
|
||||||
std::cout << " > Defaults: GenaueHoster: " << settings.genaueHoster << std::endl;
|
std::cout << " > Defaults: GenaueHoster: " << settings.genaueHoster << std::endl;
|
||||||
|
|
||||||
} else if (what == "default-Sprachen") {
|
} else if (what == "default_Sprachen") {
|
||||||
settings.languages=data;
|
settings.languages=data;
|
||||||
if(settings.debugMode)
|
if(settings.debugMode)
|
||||||
std::cout << " > Defaults: Sprachen: " << settings.languages << std::endl;
|
std::cout << " > Defaults: Sprachen: " << settings.languages << std::endl;
|
||||||
|
|
||||||
} else if (what == "default-CheckSuchMuster") {
|
} else if (what == "default_CheckSuchMuster") {
|
||||||
settings.default_Searchmuster=data;
|
settings.default_Searchmuster=data;
|
||||||
if(settings.debugMode)
|
if(settings.debugMode)
|
||||||
std::cout << " > Defaults: SuchMuster: " << settings.default_Searchmuster << std::endl;
|
std::cout << " > Defaults: SuchMuster: " << settings.default_Searchmuster << std::endl;
|
||||||
|
|
||||||
} else if (what == "default-CheckMaxDirs") {
|
} else if (what == "default_CheckMaxDirs") {
|
||||||
settings.default_maxDirs = atoi(data.c_str());
|
settings.default_maxDirs = atoi(data.c_str());
|
||||||
if(!isNumber(data) ) {
|
if(!isNumber(data) ) {
|
||||||
std::cout << " => Error_Defaults: default-CheckMaxDirs: Ungültige Zahl: " << data << std::endl;
|
std::cout << " => Error_Defaults: default_CheckMaxDirs: Ungültige Zahl: " << data << std::endl;
|
||||||
return 18;
|
return 18;
|
||||||
}
|
}
|
||||||
if(settings.debugMode)
|
if(settings.debugMode)
|
||||||
std::cout << " > Defaults: default-CheckMaxDirs: " << settings.default_maxDirs << std::endl;
|
std::cout << " > Defaults: default_CheckMaxDirs: " << settings.default_maxDirs << std::endl;
|
||||||
|
|
||||||
|
|
||||||
} else if (what == "default-maxThreads") {
|
} else if (what == "default_maxThreads") {
|
||||||
settings.maxThreads = static_cast<unsigned>(atoi(data.c_str()));
|
settings.maxThreads = static_cast<unsigned>(atoi(data.c_str()));
|
||||||
if(!isNumber(data) ) {
|
if(!isNumber(data) ) {
|
||||||
std::cout << " => Error_Defaults: Thread-Max Ungültige Zahl: " << data << std::endl;
|
std::cout << " => Error_Defaults: Thread-Max Ungültige Zahl: " << data << std::endl;
|
||||||
@ -778,23 +802,28 @@ int unterOption_search(Settings *settings, int argc, char **argv)
|
|||||||
void unterOption_search_help(std::string programName)
|
void unterOption_search_help(std::string programName)
|
||||||
{
|
{
|
||||||
std::cout << "Aufruf: " << programName << " search [OPTION]... [NAME]" << std::endl
|
std::cout << "Aufruf: " << programName << " search [OPTION]... [NAME]" << std::endl
|
||||||
|
<< " " << programName << " search [-u, --update] [OPTION]... [NAME]" << std::endl
|
||||||
<< " " << programName << " search [-u, --update]" << std::endl << std::endl;
|
<< " " << programName << " search [-u, --update]" << std::endl << std::endl;
|
||||||
|
|
||||||
std::cout << "Beschreibung:" << std::endl
|
std::cout << "Beschreibung:" << std::endl
|
||||||
<< " Mit dieser Unterfunction des Programms kann man Serien auf s.to suchen." << std::endl
|
<< " Mit dieser Unterfunktion des Programms kann man Serien auf s.to suchen." << std::endl
|
||||||
<< " Tipp: Falls deine Serie nicht gefunden wird, entferne einen Teil" << std::endl
|
<< " Tipp: Falls deine Serie nicht gefunden wird, entferne einen Teil" << std::endl
|
||||||
<< " am Ende deines SuchNamens und wiederhole die Suche." << std::endl
|
<< " am Ende deines SuchNamens und wiederhole die Suche." << std::endl
|
||||||
<< " Tipp: Wenn deine Serie sehr neu auf s.to ist, und deshalb nicht gefunden" << std::endl
|
<< " Tipp: Wenn deine Serie sehr neu auf s.to ist, und deshalb nicht gefunden" << std::endl
|
||||||
<< " wird, verwende die Option -u, um die Liste zu aktualisieren." << std::endl << std::endl;
|
<< " wird, verwende die Option -u, um die Liste zu aktualisieren." << std::endl << std::endl;
|
||||||
|
|
||||||
std::cout << "AKTUALISIERUNG:" << std::endl
|
std::cout << "AKTUALISIERUNG:" << std::endl
|
||||||
|
|
||||||
<< " -u, --update" << std::endl
|
<< " -u, --update" << std::endl
|
||||||
<< " Mit dieser Option wird die Liste der Serien, die bei der Suche durchsucht " << std::endl
|
<< " Mit dieser Option wird die Liste der Serien, die bei der" << std::endl
|
||||||
<< " wird, aktualisiert." << std::endl << std::endl;
|
<< " Suche durchsucht wird, aktualisiert." << std::endl << std::endl;
|
||||||
|
|
||||||
|
std::cout << "AKTUALISIERUNGSWARNUNG:" << std::endl
|
||||||
|
<< " In der Defaults Datei findest du die Einstellung" << std::endl
|
||||||
|
<< " 'search-UpdateWarnungNachTagen' mit der du festlegen kannst," << std::endl
|
||||||
|
<< " nach wie vielen Tagen du an das Updaten erinert wirst." << std::endl
|
||||||
|
<< " Default: 10 Tage." << std::endl << std::endl;
|
||||||
|
|
||||||
std::cout << "OPTIONEN:" << std::endl
|
std::cout << "OPTIONEN:" << std::endl
|
||||||
|
|
||||||
<< " -p [ip:port/ip/port], --socks5-proxy [ip:port/ip/port]" << std::endl
|
<< " -p [ip:port/ip/port], --socks5-proxy [ip:port/ip/port]" << std::endl
|
||||||
<< " Mit dieser Option kann man den Socks5Proxy ändern." << std::endl
|
<< " Mit dieser Option kann man den Socks5Proxy ändern." << std::endl
|
||||||
<< " Standart: 127.0.0.1:9050" << std::endl << std::endl
|
<< " Standart: 127.0.0.1:9050" << std::endl << std::endl
|
||||||
|
@ -50,8 +50,8 @@ struct Settings {
|
|||||||
proxy_ip = "127.0.0.1",
|
proxy_ip = "127.0.0.1",
|
||||||
languages = "GerDub,GerSub,Eng",
|
languages = "GerDub,GerSub,Eng",
|
||||||
genaueHoster = "",
|
genaueHoster = "",
|
||||||
version = "3.0.1",
|
version = "3.0.2",
|
||||||
defaultFileVersion="1.5",
|
defaultFileVersion="1.6",
|
||||||
outputFilePath = "",
|
outputFilePath = "",
|
||||||
default_checkPath = "",
|
default_checkPath = "",
|
||||||
default_Searchmuster = "S%Staffel%E%Folge%";
|
default_Searchmuster = "S%Staffel%E%Folge%";
|
||||||
|
Loading…
Reference in New Issue
Block a user