Project

General

Profile

« Previous | Next » 

Revision ebc2733a

Added by David Sorber almost 8 years ago

Adding non-verbose mode with "running" status information and progress
bar. Also added terminate function in preparation of adding proper
SIGINT handling.

View differences:

software/photo_compress_archiver/main.cc
std::cout << " -h [ --help ] display this help message\n";
std::cout << " -d [ --decompress ] find '*.pjg' files and decompress them\n";
std::cout << " -k [ --delete-orig ] delete original files\n";
std::cout << " -v [ --verbose ] verbose output while processing\n";
std::cout << " -t [ --num-threads ] number of processing threads to use (max 2x system cores)\n";
std::cout << " -f [ --filter ] regex with which to filter out input files\n";
std::cout << std::endl;
......
("delete-orig,k", "delete orignal files")
("verbose,v", "verbose output while processing")
("num-threads,t",
bpo::value<uint32_t>(&num_threads)->default_value(num_cores),
"number of processing threads to use")
......
}
std::cout << " delete original files => " << (delete_orig ? "ON" : "OFF")
<< std::endl;
// Verbose output option
bool verbose = false;
if (general_opts_vm.count("verbose"))
{
verbose = true;
}
std::cout << " verbose => " << (verbose ? "ON" : "OFF")
<< std::endl;
// Number of processing threads option
std::cout << " num processing threads => " << num_threads << std::endl;
......
// Create the PCA object and let 'er rip!
auto pca = new PhotoCompressArchiver(search_path, num_threads, decompress,
delete_orig, filter_regex);
delete_orig, verbose, filter_regex);
pca->execute();
delete pca;

Also available in: Unified diff