<commit_before>package ufront.web.mvc.view;
import thx.neutral.io.File;
import htemplate.Template;
using udo.collections.UArray;
using udo.type.UType;    
using thx.text.UString;
import ufront.web.mvc.IView;
import ufront.web.mvc.ViewEngineResult;
import ufront.web.mvc.ControllerContext;
import ufront.web.mvc.IViewEngine;    
import thx.neutral.FileSystem;                                              

class HTemplateViewEngine implements IViewEngine 
{   
	public static var DEFAULT_EXTENSION = ".html";
	public function new()
	{
		
	}
                                
	public function getTemplatesDirectory(controllerContext : ControllerContext)
	{
		return controllerContext.request.scriptDirectory + "view/";
	}

	public function findView(controllerContext : ControllerContext, viewName : String) : ViewEngineResult
	{   
		var parts = controllerContext.controller.fullName().split(".");
		
		parts
			.removeR("controller")
			.removeR("controllers");
		
		parts[parts.length-1] = parts[parts.length-1].lcfirst();
		
		var controllerPath =  parts.join("/");                                          
		
		var template = getTemplate(controllerContext, controllerPath + "/" + viewName);<commit_msg>Some more udo changes to thx and thx.sys<commit_after>package ufront.web.mvc.view;
import thx.sys.io.File;
import htemplate.Template;
using thx.collections.UArray;
using thx.type.UType;    
using thx.text.UString;
import ufront.web.mvc.IView;
import ufront.web.mvc.ViewEngineResult;
import ufront.web.mvc.ControllerContext;
import ufront.web.mvc.IViewEngine;    
import thx.sys.FileSystem;                                              

class HTemplateViewEngine implements IViewEngine 
{   
	public static var DEFAULT_EXTENSION = ".html";
	public function new()
	{
		
	}
                                
	public function getTemplatesDirectory(controllerContext : ControllerContext)
	{
		return controllerContext.request.scriptDirectory + "view/";
	}

	public function findView(controllerContext : ControllerContext, viewName : String) : ViewEngineResult
	{   
		var parts = controllerContext.controller.fullName().split(".");
		
		parts
			.removeR("controller")
			.removeR("controllers");
		
		parts[parts.length-1] = parts[parts.length-1].lcfirst();
		
		var controllerPath =  parts.join("/");                                          
		
		var template = getTemplate(controllerContext, controllerPath + "/" + viewName);
{'fraction_non_alphanumeric': 0.10251132153149445, 'fraction_numerical': 0.0016467682173734047, 'mean_word_length': 2.888, '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': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '406314', 'n_tokens_mistral': 731, 'n_tokens_neox': 678, 'n_words': 134}