<commit_before>/*
 * rpiHomeApp.cpp

 *
 *  Created on: 19 sty 2015
 *      Author: paku
 */

#include <boost/program_options.hpp>
namespace po = boost::program_options;

#include "rpiHome.h"

using namespace std;

int get_cmd_line_params(rpiHome* thisRPiHome, int ac, char *av[]) {

	int period;

	// Declare the supported options.
	po::options_description desc("RPiHome options");
	desc.add_options()("help,h", "this help message")("daemon,d", "run in daemon mode (not implemented)")("logger,l", "log activity into the DB")("termo,t",
			"read and log temperature (1Wire DS18D20 temperature sensors only)")("verbose,v", "be verbose, enable stdio output messages.");

	po::variables_map vm;

	try {

		po::store(po::parse_command_line(ac, av, desc), vm);

		if (vm.count("help")) {
			cout << TITLE << endl << desc << endl;
			return SUCCESS_HELP_ONLY;
		}

		po::notify(vm);

	}

	catch (po::error& e) {
		cerr << "#STOP#" << endl << "Command line parser error: " << e.what() << endl << endl;
		cerr << desc << endl;
		return ERROR_IN_COMMAND_LINE;
	}

	//thisRPiHome->args.daemon=vm.count("daemon");

	thisRPiHome->args.verbose = vm.count("verbose");
	thisRPiHome->args.termo = vm.count("termo");
	thisRPiHome->args.logger = vm.count("logger");

	//show title in verbose mode
	if (thisRPiHome->args.verbose)<commit_msg>UI text correction<commit_after>/*
 * rpiHomeApp.cpp

 *
 *  Created on: 19 sty 2015
 *      Author: paku
 */

#include <boost/program_options.hpp>
namespace po = boost::program_options;

#include "rpiHome.h"

using namespace std;

int get_cmd_line_params(rpiHome* thisRPiHome, int ac, char *av[]) {

	int period;

	// Declare the supported options.
	po::options_description desc("RPiHome options");
	desc.add_options()("help,h", "this help message")("daemon,d", "run in daemon mode (not implemented)")("logger,l", "log into the DB")("termo,t",
			"read and log temperature (1Wire DS18x20 temperature sensors only)")("verbose,v", "be verbose, enable stdio output messages.");

	po::variables_map vm;

	try {

		po::store(po::parse_command_line(ac, av, desc), vm);

		if (vm.count("help")) {
			cout << TITLE << endl << desc << endl;
			return SUCCESS_HELP_ONLY;
		}

		po::notify(vm);

	}

	catch (po::error& e) {
		cerr << "#STOP#" << endl << "Command line parser error: " << e.what() << endl << endl;
		cerr << desc << endl;
		return ERROR_IN_COMMAND_LINE;
	}

	//thisRPiHome->args.daemon=vm.count("daemon");

	thisRPiHome->args.verbose = vm.count("verbose");
	thisRPiHome->args.termo = vm.count("termo");
	thisRPiHome->args.logger = vm.count("logger");

	//show title in verbose mode
	if (thisRPiHome->args.verbose)
{'fraction_non_alphanumeric': 0.1696969696969697, 'fraction_numerical': 0.008333333333333333, 'mean_word_length': 4.479253112033195, 'pattern_counts': {'":': 0, '<': 53, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5703969', 'n_tokens_mistral': 1000, 'n_tokens_neox': 924, 'n_words': 228}