<commit_before><?php
error_reporting(E_ALL & ~8192 & ~E_USER_WARNING);	# 8192 == E_DEPRECATED maar PHP < 5.3 heeft die niet

require_once "settings.php";
require_once "lib/SpotDb.php";
require_once "lib/SpotReq.php";
require_once "SpotParser.php";
require_once "SpotNntp.php";
require_once "lib/retriever/SpotRetriever_Spots.php";
require_once "lib/retriever/SpotRetriever_Comments.php";


# in safe mode, max execution time cannot be set, warn the user
if (ini_get('safe_mode') ) {
	echo "WARNING: PHP safemode is enabled, maximum execution cannot be reset! Turn off safemode if this causes problems\r\n\r\n";
} # if

if (!isset($settings['retrieve_increment'])) {
	echo "WARNING: Parameter retrieve_increment is missing in settings.php, please add and run again.";
	die();
}

$req = new SpotReq();
$req->initialize();

if ($req->getDef('output', '') == 'xml') {
	echo "<xml>";
} # if

try {
	$db = new SpotDb($settings['db']);
	$db->connect();
} 
catch(Exception $x) {
	die("Unable to connect to database: " . $x->getMessage() . "\r\n");
} # catch

## Als we forceren om de "already running" check te bypassen, doe dat dan
if (($argc > 1) && ($argv[1] == '--force')) {
	$db->setRetrieverRunning($settings['nntp_hdr']['host'], false);
} # if


## Spots
try {
	$curMsg = $db->getMaxArticleId($settings['nntp_hdr']['host']);<commit_msg>geen melding geven over argc<commit_after><?php
error_reporting(E_ALL & ~8192 & ~E_USER_WARNING);	# 8192 == E_DEPRECATED maar PHP < 5.3 heeft die niet

require_once "settings.php";
require_once "lib/SpotDb.php";
require_once "lib/SpotReq.php";
require_once "SpotParser.php";
require_once "SpotNntp.php";
require_once "lib/retriever/SpotRetriever_Spots.php";
require_once "lib/retriever/SpotRetriever_Comments.php";


# in safe mode, max execution time cannot be set, warn the user
if (ini_get('safe_mode') ) {
	echo "WARNING: PHP safemode is enabled, maximum execution cannot be reset! Turn off safemode if this causes problems\r\n\r\n";
} # if

if (!isset($settings['retrieve_increment'])) {
	echo "WARNING: Parameter retrieve_increment is missing in settings.php, please add and run again.";
	die();
}

$req = new SpotReq();
$req->initialize();

if ($req->getDef('output', '') == 'xml') {
	echo "<xml>";
} # if

try {
	$db = new SpotDb($settings['db']);
	$db->connect();
} 
catch(Exception $x) {
	die("Unable to connect to database: " . $x->getMessage() . "\r\n");
} # catch

## Als we forceren om de "already running" check te bypassen, doe dat dan
if ((isset($argc)) && ($argc > 1) && ($argv[1] == '--force')) {
	$db->setRetrieverRunning($settings['nntp_hdr']['host'], false);
} # if


## Spots
try {
	$curMsg = $db->getMaxArticleId($settings['nntp_hdr']['host']);
{'fraction_non_alphanumeric': 0.1757306696263411, 'fraction_numerical': 0.008879023307436182, 'mean_word_length': 5.244803695150115, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 19, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, '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': '5848035', 'n_tokens_mistral': 989, 'n_tokens_neox': 955, 'n_words': 258}