<commit_before>/**
 * Prepros
 * (c) <NAME>
 * <EMAIL>
 * License: MIT
 */

/*jshint browser: true, node: true*/
/*global prepros, angular, _, $*/

prepros.factory('config', function () {

    'use strict';

    var fs = require('fs-extra'),
        path = require('path'),
        os = require('os');

    //Base path
    var basePath = path.join(path.dirname(process.execPath), 'app');

    //Package.json file url
    var packageFileUrl = path.join(basePath, '../package.json');

    //Read package.json file and get data of app in prepros object
    var packageData = JSON.parse(fs.readFileSync(packageFileUrl).toString());

    //We need package path because everything is relative to this file
    var packagePath = path.join(basePath, '..');

    var dataPath = '';

    //for windows > vista
    if(process.env.LOCALAPPDATA){

        //User data path
        dataPath = path.join(process.env.LOCALAPPDATA, 'Prepros/Data');

    } else {

        //for windows Xp
        dataPath = path.join(process.env.APPDATA, 'Prepros/Data');

    }

    //User config file
    var configFile = path.join(dataPath, 'config.json');

    //CachePath
    var cachePath = path.join(process.env.TEMP, 'PreprosCache');

    //Node modules required by the app
    var node_modules = packageData.dependencies;

    //App version
    var version = packageData.version;

    //App urls
    var online = {
        url: 'http://alphapixels.com/prepros',
        helpUrl: 'http://alphapixels.com/prepros',
        loveUrl: 'http://alphapixels.com/prepros#love',
        updateFileUrl: 'http://alphapixels.com/prepros/update.json',<commit_msg>get temporary folder with os module<commit_after>/**
 * Prepros
 * (c) <NAME>
 * <EMAIL>
 * License: MIT
 */

/*jshint browser: true, node: true*/
/*global prepros, angular, _, $*/

prepros.factory('config', function () {

    'use strict';

    var fs = require('fs-extra'),
        path = require('path'),
        os = require('os');

    //Base path
    var basePath = path.join(path.dirname(process.execPath), 'app');

    //Package.json file url
    var packageFileUrl = path.join(basePath, '../package.json');

    //Read package.json file and get data of app in prepros object
    var packageData = JSON.parse(fs.readFileSync(packageFileUrl).toString());

    //We need package path because everything is relative to this file
    var packagePath = path.join(basePath, '..');

    var dataPath = '';

    //for windows > vista
    if(process.env.LOCALAPPDATA){

        //User data path
        dataPath = path.join(process.env.LOCALAPPDATA, 'Prepros/Data');

    } else {

        //for windows Xp
        dataPath = path.join(process.env.APPDATA, 'Prepros/Data');

    }

    //User config file
    var configFile = path.join(dataPath, 'config.json');

    //CachePath
    var cachePath = path.join(os.tmpdir(), 'PreprosCache');

    //Node modules required by the app
    var node_modules = packageData.dependencies;

    //App version
    var version = packageData.version;

    //App urls
    var online = {
        url: 'http://alphapixels.com/prepros',
        helpUrl: 'http://alphapixels.com/prepros',
        loveUrl: 'http://alphapixels.com/prepros#love',
        updateFileUrl: 'http://alphapixels.com/prepros/update.json',
{'fraction_non_alphanumeric': 0.1447811447811448, 'fraction_numerical': 0.0, 'mean_word_length': 2.6843291995490417, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, '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': '2243393', 'n_tokens_mistral': 1045, 'n_tokens_neox': 1023, 'n_words': 252}