<commit_before>#######################
# initialize logger
logger = GLOBAL.logger = require 'winston'
logger.exitOnError = false
logger.remove logger.transports.Console
logger.add logger.transports.Console,
    colorize:   true
    timestamp:  true
logger.add logger.transports.File,
    filename:   'ingress-exporter.log'

#######################

noop = GLOBAL.noop = ->
    null

#######################

require './config.js'

require './lib/leaflet.js'
require './lib/utils.js'
require './lib/database.js'
require './lib/agent.js'
require './lib/entity.js'
require './lib/mungedetector.js'
require './lib/accountinfo.js'

require 'color'

GLOBAL.argv = require('optimist').argv
async = require('async')

plugins = require('require-all')(
    dirname: __dirname + '/plugins'
    filter : /(.+)\.js$/,
)

#######################
# bootstrap

bootstrap = ->

    async.series [

        (callback) ->

            if argv.mungedetect isnt 'false'
                MungeDetector.detect callback
            else
                MungeDetector.initFromDatabase callback

        , (callback) ->

            if argv.playerdetect isnt 'false'
                AccountInfo.fetch callback
            else
                callback()

        , (callback) ->

            Agent.initFromDatabase callback

    ], (err) ->
<commit_msg>fix bug: not exit when munge detection failed<commit_after>#######################
# initialize logger
logger = GLOBAL.logger = require 'winston'
logger.exitOnError = false
logger.remove logger.transports.Console
logger.add logger.transports.Console,
    colorize:   true
    timestamp:  true
logger.add logger.transports.File,
    filename:   'ingress-exporter.log'

#######################

noop = GLOBAL.noop = ->
    null

#######################

require './config.js'

require './lib/leaflet.js'
require './lib/utils.js'
require './lib/database.js'
require './lib/agent.js'
require './lib/entity.js'
require './lib/mungedetector.js'
require './lib/accountinfo.js'

require 'color'

GLOBAL.argv = require('optimist').argv
async = require('async')

plugins = require('require-all')(
    dirname: __dirname + '/plugins'
    filter : /(.+)\.js$/,
)

#######################
# bootstrap

bootstrap = ->

    async.series [

        (callback) ->

            if argv.mungedetect isnt 'false'
                MungeDetector.detect callback
            else
                MungeDetector.initFromDatabase callback

        , (callback) ->

            if argv.playerdetect isnt 'false'
                AccountInfo.fetch callback
            else
                callback()

        , (callback) ->

            Agent.initFromDatabase callback

    ], (err) ->

        if err

            Database.db.close()
            return

{'fraction_non_alphanumeric': 0.18277616279069767, 'fraction_numerical': 0.0, 'mean_word_length': 2.44125, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 15, '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': '3165638', 'n_tokens_mistral': 813, 'n_tokens_neox': 774, 'n_words': 169}