<commit_before><?php
	require_once('stats.functions.php');	
	require_once('parse_references.functions.php');
	$title = $_GET['title'];

	$diff = $_GET['diff'];
	$oldid = $_GET['oldid'];


	$oldid_url = "http://spadeserver.ft1.us/parse_references.php?title=$title&oldid=$oldid";
	$diff_url = "http://spadeserver.ft1.us/parse_references.php?title=$title&oldid=$diff";

	$oldid_test_url = "http://spadeserver.ft1.us/wiki_test.php?title=$title&oldid=$oldid";
	$diff_test_url = "http://spadeserver.ft1.us/wiki_test.php?title=$title&oldid=$diff";



echo '
<html><head>
<title> Compare '.$title.' between ('.$oldid.') and ('.$diff.') </title>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</head><body>';

echo '<commit_msg> accept newid instead of diff as argument<commit_after><?php
	require_once('stats.functions.php');	
	require_once('parse_references.functions.php');
	$title = $_GET['title'];

	if(isset($_GET['diff'])){
		$diff = $_GET['diff'];
	}
	
	if(isset($_GET['newid'])){
		$diff = $_GET['newid'];
	}
	

	$oldid = $_GET['oldid'];

	if($oldid > $diff){
		echo "The oldid should be lower than the newid\n";
		exit();
	}


	$oldid_url = "http://spadeserver.ft1.us/parse_references.php?title=$title&oldid=$oldid";
	$diff_url = "http://spadeserver.ft1.us/parse_references.php?title=$title&oldid=$diff";

	$oldid_test_url = "http://spadeserver.ft1.us/wiki_test.php?title=$title&oldid=$oldid";
	$diff_test_url = "http://spadeserver.ft1.us/wiki_test.php?title=$title&oldid=$diff";



echo '
<html><head>
<title> Compare '.$title.' between ('.$oldid.') and ('.$diff.') </title>

<!-- Latest compiled and minified CSS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.1/js/bootstrap.min.js"></script>
</head><body>';

echo '
{'fraction_non_alphanumeric': 0.21682712431979909, 'fraction_numerical': 0.010883214734198409, 'mean_word_length': 5.143958868894601, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 30, 'https://': 6, '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': '4179399', 'n_tokens_mistral': 911, 'n_tokens_neox': 873, 'n_words': 121}