Revision of CLI --help info

This commit is contained in:
Morgan Hardwood
2018-09-01 14:40:32 +02:00
parent 61e033ae14
commit 7e1d6a3c67

View File

@@ -211,7 +211,7 @@ int main (int argc, char **argv)
int ret = 0;
// printing RT's version in all case, particularly useful for the 'verbose' mode, but also for the batch processing
std::cout << "RawTherapee, version " << RTVERSION << ", command line" << std::endl;
std::cout << "RawTherapee, version " << RTVERSION << ", command line." << std::endl;
if (argc > 1) {
ret = processLineParams (argc, argv);
@@ -315,7 +315,7 @@ int processLineParams ( int argc, char **argv )
#endif
if (fname.at (0) == '-') {
std::cerr << "Error: filename missing next to the -p switch" << std::endl;
std::cerr << "Error: filename missing next to the -p switch." << std::endl;
deleteProcParams (processingParams);
return -3;
}
@@ -325,7 +325,7 @@ int processLineParams ( int argc, char **argv )
if (! (currentParams->load ( fname ))) {
processingParams.push_back (currentParams);
} else {
std::cerr << "Error: \"" << fname << "\" not found" << std::endl;
std::cerr << "Error: \"" << fname << "\" not found." << std::endl;
deleteProcParams (processingParams);
return -3;
}
@@ -393,13 +393,13 @@ int processLineParams ( int argc, char **argv )
bits = atoi (currParam.substr (2).c_str());
if (bits != 8 && bits != 16 && bits != 32) {
std::cerr << "Error: specify -b8 for 8-bit/integer or -b16 for 16-bit/integer or -b16f for 16-bit/float or -b32 for 32-bit/float output." << std::endl;
std::cerr << "Error: specify output bit depth per channel as -b8 for 8-bit integer, -b16 for 16-bit integer, -b16f for 16-bit float or -b32 for 32-bit float." << std::endl;
deleteProcParams (processingParams);
return -3;
}
isFloat = (bits == 16 && currParam.length() == 3 && currParam.at(2) == 'f') || bits == 32;
printf("Float output detected (%d bits)!\n", bits);
printf("Float output detected (%d-bit)!\n", bits);
break;
@@ -426,7 +426,7 @@ int processLineParams ( int argc, char **argv )
#endif
if (!Glib::file_test (argument, Glib::FILE_TEST_EXISTS)) {
std::cout << "\"" << argument << "\" doesn't exist !" << std::endl;
std::cout << "\"" << argument << "\" doesn't exist!" << std::endl;
continue;
}
@@ -436,9 +436,9 @@ int processLineParams ( int argc, char **argv )
if (notAll || notRetained) {
if (notAll) {
std::cout << "\"" << argument << "\" is not one of the file format to process: skipped" << std::endl;
std::cout << "\"" << argument << "\" is not one of the parsed extensions. Image skipped." << std::endl;
} else if (notRetained) {
std::cout << "\"" << argument << "\" is not one of the retained file format to process: skipped" << std::endl;
std::cout << "\"" << argument << "\" is not one of the selected parsed extensions. Image skipped." << std::endl;
}
} else {
inputFiles.emplace_back (argument);
@@ -469,11 +469,11 @@ int processLineParams ( int argc, char **argv )
if (isDir || notAll || notRetained) {
if (isDir) {
std::cout << "\"" << fileName << "\" is a directory: skipped" << std::endl;
std::cout << "\"" << fileName << "\" is a folder. Folder skipped" << std::endl;
} else if (notAll) {
std::cout << "\"" << fileName << "\" is not one of the file format to process: skipped" << std::endl;
std::cout << "\"" << fileName << "\" is not one of the parsed extensions. Image skipped." << std::endl;
} else if (notRetained) {
std::cout << "\"" << fileName << "\" is not one of the retained file format to process: skipped" << std::endl;
std::cout << "\"" << fileName << "\" is not one of the selected parsed extensions. Image skipped." << std::endl;
}
continue;
@@ -483,7 +483,7 @@ int processLineParams ( int argc, char **argv )
if (sideProcParams && skipIfNoSidecar) {
// look for the sidecar proc params
if (!Glib::file_test (fileName + paramFileExtension, Glib::FILE_TEST_EXISTS)) {
std::cout << "\"" << fileName << "\" has no side-car file: image skipped" << std::endl;
std::cout << "\"" << fileName << "\" has no side-car file. Image skipped." << std::endl;
continue;
}
}
@@ -523,11 +523,11 @@ int processLineParams ( int argc, char **argv )
std::cout << " " << Glib::path_get_basename (argv[0]) << " <other options> -c <dir>|<files> Convert files in batch with your own settings." << std::endl;
std::cout << std::endl;
std::cout << "Options:" << std::endl;
std::cout << " " << Glib::path_get_basename (argv[0]) << "[-o <output>|-O <output>] [-q] [-a] [-s|-S] [-p <one.pp3> [-p <two.pp3> ...] ] [-d] [ -j[1-100] [-js<1-3>] | [-b<8|16>] [-t[z] | [-n]] ] [-Y] [-f] -c <input>" << std::endl;
std::cout << " " << Glib::path_get_basename (argv[0]) << "[-o <output>|-O <output>] [-q] [-a] [-s|-S] [-p <one.pp3> [-p <two.pp3> ...] ] [-d] [ -j[1-100] -js<1-3> | -t[z] -b<8|16|16f|32> | -n -b<8|16> ] [-Y] [-f] -c <input>" << std::endl;
std::cout << std::endl;
std::cout << " -c <files> Specify one or more input files or directory." << std::endl;
std::cout << " When specifying directories, Rawtherapee will look for images files that comply with the" << std::endl;
std::cout << " selected extensions (see also '-a')." << std::endl;
std::cout << " -c <files> Specify one or more input files or folders." << std::endl;
std::cout << " When specifying folders, Rawtherapee will look for image file types which comply" << std::endl;
std::cout << " with the selected extensions (see also '-a')." << std::endl;
std::cout << " -c must be the last option." << std::endl;
std::cout << " -o <file>|<dir> Set output file or folder." << std::endl;
std::cout << " Saves output file alongside input file if -o is not specified." << std::endl;
@@ -554,15 +554,15 @@ int processLineParams ( int argc, char **argv )
std::cout << " Chroma halved horizontally." << std::endl;
std::cout << " 3 = Best quality: 1x1, 1x1, 1x1 (4:4:4)" << std::endl;
std::cout << " No chroma subsampling." << std::endl;
std::cout << " -b<8|16|16f|32> Specify bit depth per channel (default value: 16 for TIFF, 8 for PNG and JPEG)." << std::endl;
std::cout << " 8 = 8 bits integer, applies to JPEG, PNG and TIFF" << std::endl;
std::cout << " 16 = 16 bits integer, applies to PNG and TIFF" << std::endl;
std::cout << " 16f = 16 bits float, applies to TIFF" << std::endl;
std::cout << " 32 = 32 bits float, applies to TIFF" << std::endl;
std::cout << " -b<8|16|16f|32> Specify bit depth per channel." << std::endl;
std::cout << " 8 = 8-bit integer. Applies to JPEG, PNG and TIFF. Default for JPEG and PNG." << std::endl;
std::cout << " 16 = 16-bit integer. Applies to TIFF and PNG. Default for TIFF." << std::endl;
std::cout << " 16f = 16-bit float. Applies to TIFF." << std::endl;
std::cout << " 32 = 32-bit float. Applies to TIFF." << std::endl;
std::cout << " -t[z] Specify output to be TIFF." << std::endl;
std::cout << " Uncompressed by default, or deflate compression with 'z'." << std::endl;
std::cout << " -n Specify output to be compressed PNG." << std::endl;
std::cout << " Compression is hard-coded to PNG_FILTER_PAETH, Z_RLE" << std::endl;
std::cout << " Compression is hard-coded to PNG_FILTER_PAETH, Z_RLE." << std::endl;
std::cout << " -Y Overwrite output if present." << std::endl;
std::cout << " -f Use the custom fast-export processing pipeline." << std::endl;
std::cout << std::endl;
@@ -624,7 +624,7 @@ int processLineParams ( int argc, char **argv )
Glib::ustring profPath = options.findProfilePath (options.defProfRaw);
if (options.is_defProfRawMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && rawParams->load (profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename (profPath, Glib::path_get_basename (options.defProfRaw) + paramFileExtension)))) {
std::cerr << "Error: default raw processing profile not found" << std::endl;
std::cerr << "Error: default raw processing profile not found." << std::endl;
rawParams->deleteInstance();
delete rawParams;
deleteProcParams (processingParams);
@@ -635,7 +635,7 @@ int processLineParams ( int argc, char **argv )
profPath = options.findProfilePath (options.defProfImg);
if (options.is_defProfImgMissing() || profPath.empty() || (profPath != DEFPROFILE_DYNAMIC && imgParams->load (profPath == DEFPROFILE_INTERNAL ? DEFPROFILE_INTERNAL : Glib::build_filename (profPath, Glib::path_get_basename (options.defProfImg) + paramFileExtension)))) {
std::cerr << "Error: default non-raw processing profile not found" << std::endl;
std::cerr << "Error: default non-raw processing profile not found." << std::endl;
imgParams->deleteInstance();
delete imgParams;
rawParams->deleteInstance();
@@ -716,7 +716,7 @@ int processLineParams ( int argc, char **argv )
rawParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData());
}
std::cout << " Merging default raw processing profile" << std::endl;
std::cout << " Merging default raw processing profile." << std::endl;
rawParams->applyTo (&currentParams);
} else {
if (options.defProfImg == DEFPROFILE_DYNAMIC) {
@@ -725,7 +725,7 @@ int processLineParams ( int argc, char **argv )
imgParams = ProfileStore::getInstance()->loadDynamicProfile (ii->getMetaData());
}
std::cout << " Merging default non-raw processing profile" << std::endl;
std::cout << " Merging default non-raw processing profile." << std::endl;
imgParams->applyTo (&currentParams);
}
}
@@ -744,7 +744,7 @@ int processLineParams ( int argc, char **argv )
std::cerr << "Warning: sidecar file requested but not found for: " << sideProcessingParams << std::endl;
} else {
sideCarFound = true;
std::cout << " Merging sidecar procparams" << std::endl;
std::cout << " Merging sidecar procparams." << std::endl;
}
}