<commit_before>#include <QCoreApplication>

#include "mooapp.h"
#include "connectionmanager.h"
#include "connection.h"
#include "listenertelnet.h"
#include "listenerwebsocket.h"
#include "taskentry.h"
#include <lua.hpp>
#include <QDateTime>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include "objectmanager.h"
#include "osc.h"

void myMessageOutput( QtMsgType type, const QMessageLogContext &context, const QString &msg )
{
	Q_UNUSED( context )

	QFile				LogFil( "moo.log" );
	const QDateTime		CurDat = QDateTime::currentDateTime();
	QString				DateTime = CurDat.toString( "dd-MMM-yyyy hh:mm:ss" );
	QString				LogMsg;

	switch( type )
	{
		case QtDebugMsg:
			LogMsg = "[DBUG]";
			break;

		case QtInfoMsg:
			LogMsg = "[INFO]";
			break;

		case QtWarningMsg:
			LogMsg = "[WARN]";
			break;

		case QtCriticalMsg:
			LogMsg = "[CRIT]";
			break;

		default:
			LogMsg = "[----]";
			break;
	}

	LogMsg = QString( "%1 - %2: %3" ).arg( DateTime ).arg( LogMsg ).arg( msg );

	if( LogFil.open( QIODevice::Append | QIODevice::Text ) )
	{
		QTextStream		TxtOut( &LogFil );

		TxtOut << LogMsg << "\n";

		LogFil.close();
	}

#if defined( QT_DEBUG )
	QTextStream out( stdout, QIODevice::WriteOnly );

	out << msg << "\n";
#endif
}

int main( int argc, char *argv[] )
{
	QCoreApplication	a( argc, argv );

	a.setApplicationName( "ArtMOO" );
	a.setOrganizationName( "<NAME>" );
	a.setOrganizationDomain( "bigfug.com" );
	a.setApplicationVersion( "0.1" );

	QString			DataDir    = ".";
	quint16			ServerPort = 1123;

	const QStringList	args = a.arguments();

	foreach( const QString &arg, args )
	{
		if( arg.startsWith( "-dir=", Qt::CaseSensitive ) )
		{
			DataDir = arg.mid( 5 );

			continue;
		}

		if( arg.startsWith( "-port=", Qt::CaseInsensitive ) )
		{
			ServerPort = arg.mid( 6 ).toInt();

			continue;
		}
	}
<commit_msg>Using c++11 for<commit_after>#include <QCoreApplication>

#include "mooapp.h"
#include "connectionmanager.h"
#include "connection.h"
#include "listenertelnet.h"
#include "listenerwebsocket.h"
#include "taskentry.h"
#include <lua.hpp>
#include <QDateTime>
#include <QFile>
#include <QFileInfo>
#include <QDir>
#include "objectmanager.h"
#include "osc.h"

void myMessageOutput( QtMsgType type, const QMessageLogContext &context, const QString &msg )
{
	Q_UNUSED( context )

	QFile				LogFil( "moo.log" );
	const QDateTime		CurDat = QDateTime::currentDateTime();
	QString				DateTime = CurDat.toString( "dd-MMM-yyyy hh:mm:ss" );
	QString				LogMsg;

	switch( type )
	{
		case QtDebugMsg:
			LogMsg = "[DBUG]";
			break;

		case QtInfoMsg:
			LogMsg = "[INFO]";
			break;

		case QtWarningMsg:
			LogMsg = "[WARN]";
			break;

		case QtCriticalMsg:
			LogMsg = "[CRIT]";
			break;

		default:
			LogMsg = "[----]";
			break;
	}

	LogMsg = QString( "%1 - %2: %3" ).arg( DateTime ).arg( LogMsg ).arg( msg );

	if( LogFil.open( QIODevice::Append | QIODevice::Text ) )
	{
		QTextStream		TxtOut( &LogFil );

		TxtOut << LogMsg << "\n";

		LogFil.close();
	}

#if defined( QT_DEBUG )
	QTextStream out( stdout, QIODevice::WriteOnly );

	out << msg << "\n";
#endif
}

int main( int argc, char *argv[] )
{
	QCoreApplication	a( argc, argv );

	a.setApplicationName( "ArtMOO" );
	a.setOrganizationName( "<NAME>" );
	a.setOrganizationDomain( "bigfug.com" );
	a.setApplicationVersion( "0.1" );

	QString			DataDir    = ".";
	quint16			ServerPort = 1123;

	const QStringList	args = a.arguments();

	for( const QString &arg : args )
	{
		if( arg.startsWith( "-dir=", Qt::CaseSensitive ) )
		{
			DataDir = arg.mid( 5 );

			continue;
		}

		if( arg.startsWith( "-port=", Qt::CaseInsensitive ) )
		{
			ServerPort = arg.mid( 6 ).toInt();

			continue;
		}
	}

{'fraction_non_alphanumeric': 0.1647186735525958, 'fraction_numerical': 0.007610763794509377, 'mean_word_length': 3.6582278481012658, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 17, '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': '7341508', 'n_tokens_mistral': 1576, 'n_tokens_neox': 1422, 'n_words': 324}