<commit_before>'use strict';
//Add scripts in order.
var ProcessingScripts = ["lynximport"];
var ScriptsPath = "../addons/ProcessesingScripts/"; //path to the script folder, ralative to boot.js

/*
The script should have the function "Process(string)" with a return type of string. Like so
exports.Process = function(somestring){
	//do stuff
	return somestring;
}
*/



//------------------------------------------------------------------

var Scripts = [];
ProcessingScripts.forEach(function(file){
	try{
		var fullpath = ScriptsPath + file + ".js";
		var required = require(fullpath);
		if(typeof required.Process != 'function'){
			console.log(file+ " script doesnt contain a Process function");
		}
		else{Scripts.push(required)}
	}catch(err){
		console.log(file+ " script not found or not valid.");
	}
});

var templatehandler = require("../engine/templateHandler.js");
var originalprocesspage; 

exports.init = function(){
	originalprocesspage = templatehandler.processPage;


	templatehandler.processPage = function(errors, page){
		
		originalprocesspage(errors, page);<commit_msg>wip2<commit_after>'use strict';
//Add scripts in order.
var ProcessingScripts = ["lynximport"];
var ScriptsPath = "../addons/ProcessesingScripts/"; //path to the script folder, ralative to boot.js

/*
The script should have the function "Process(string)" with a return type of string. Like so
exports.Process = function(somestring){
	//do stuff
	return somestring;
}
*/



//------------------------------------------------------------------

var Scripts = [];
ProcessingScripts.forEach(function(file){
	try{
		var fullpath = ScriptsPath + file + ".js";
		var required = require(fullpath);
		if(typeof required.Process != 'function'){
			console.log(file+ " script doesnt contain a Process function");
		}
		else{Scripts.push(required)}
	}catch(err){
		debugger;
		console.log(file+ " script not found or not valid.");
	}
});

var templatehandler = require("../engine/templateHandler.js");
var originalprocesspage; 

exports.init = function(){
	originalprocesspage = templatehandler.processPage;


	templatehandler.processPage = function(errors, page){
		
		originalprocesspage(errors, page);
{'fraction_non_alphanumeric': 0.1856946354883081, 'fraction_numerical': 0.0004585052728106373, 'mean_word_length': 3.417004048582996, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '874454', 'n_tokens_mistral': 645, 'n_tokens_neox': 605, 'n_words': 172}