<commit_before>//App config
var gui = require('nw.gui');
var fs = require('fs');
var readline = require('readline');

//host config
var filename = 'C:\\WINDOWS\\system32\\drivers\\etc\\hosts';
var lineNumber =0;
var hostFile = Array();


detectPlatform();
function detectPlatform()
{
    if (process.platform !== 'win32') {
        alert('Le systeme ne fonctionne que sur windows');
        gui.App.quit();
    }
}




function readHostFile(){

    document.getElementById('viewsHost').innerHTML="";

    lineNumber =0;
    var rd = readline.createInterface({
        input: fs.createReadStream(filename),
        output: process.stdout,
        terminal: false<commit_msg>use localstorage for save host file location<commit_after>//App config
var gui = require('nw.gui');
var fs = require('fs');
var readline = require('readline');


//host config
var filename;
var lineNumber =0;
var hostFile = Array();

init();
function init(){
    detectPlatform();
    filename = localStorage.getItem('fileName');
    if(filename === null){
        filename = 'C:\\WINDOWS\\system32\\drivers\\etc\\hosts';
        localStorage.setItem('fileName', filename);
    }


}

function detectPlatform()
{
    if (process.platform !== 'win32') {
        alert('Le systeme ne fonctionne que sur windows');
        gui.App.quit();
    }
}




function readHostFile(){

    document.getElementById('viewsHost').innerHTML="";

    lineNumber =0;
    var rd = readline.createInterface({
        input: fs.createReadStream(filename),
        output: process.stdout,
        terminal: false
{'fraction_non_alphanumeric': 0.1490722968650032, 'fraction_numerical': 0.007677543186180422, 'mean_word_length': 3.320441988950276, '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': '5170655', 'n_tokens_mistral': 475, 'n_tokens_neox': 448, 'n_words': 115}