Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add -noTitle option to avoid printing the title on every run (makes output less noisy) #56

Merged
merged 4 commits into from
Jul 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions crunch/crunch.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ class crunch {

console::message("\nMisc. options:");
console::printf("-helperThreads # - Set number of helper threads, 0-%d, default=(# of CPU's)-1", cCRNMaxHelperThreads);
console::printf("-noTitle - Disable title output at run time");
console::printf("-noprogress - Disable progress output");
console::printf("-quiet - Disable all console output");
console::printf("-ignoreerrors - Continue processing files after errors. Note: The default");
Expand Down Expand Up @@ -193,6 +194,7 @@ class crunch {
{"fileformat", 1, false},

{"helperThreads", 1, false},
{"noTitle", 0, false},
{"noprogress", 0, false},
{"quiet", 0, false},
{"ignoreerrors", 0, false},
Expand All @@ -213,7 +215,6 @@ class crunch {
{"wrap", 0, false},
{"renormalize", 0, false},
{"rtopmip", 0, false },
{"noprogress", 0, false},
{"paramdebug", 0, false},
{"debug", 0, false},
{"quick", 0, false},
Expand Down Expand Up @@ -1157,7 +1158,7 @@ static void print_title() {
#endif
console::printf("");
console::printf("Crunch is brought to you by:");
console::printf("- 2014-2023 Daemon Developers and contributors");
console::printf("- 2014-2024 Daemon Developers and contributors");
console::printf(" https://github.com/DaemonEngine/crunch");
/* Who owns the copyright, Alexander, Unity, both?
Unity Technologies is a Trade Name for Unity Software Inc. */
Expand Down Expand Up @@ -1187,7 +1188,8 @@ static int main_internal(int argc, char* argv[]) {
if (check_for_option(argc, argv, "quiet"))
console::disable_output();

print_title();
if (!check_for_option(argc, argv, "noTitle"))
print_title();

dynamic_string cmd_line;
get_command_line_as_single_string(cmd_line, argc, argv);
Expand Down
2 changes: 1 addition & 1 deletion test/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def crunch(input_path, output_path, options=[]):
if input_path:
input_path = convert_path(input_path)
output_path = convert_path(output_path)
command_list += ["-file", input_path, "-out", output_path]
command_list += ["-noTitle", "-file", input_path, "-out", output_path]

run(command_list)

Expand Down