<commit_before>var celery = require('../');

celery.on('hello :name', function(data)
{
    console.log('hello %s, how are you doing?', data.name);
});

celery.open();
celery.parse(process.argv);<commit_msg>more to the hello world example<commit_after>var celery = require('../');

celery.on('hello :name', function(data)
{
    console.log('hello %s, how are you doing?', data.name);
});

celery.on('download :file', function(data)
{
    console.log("starting");
    
    var i = 0;
    
    data.file = decodeURIComponent(data.file);
    
    var interval = setInterval(function()
    {
        
        celery.progress('Downloading '+data.file+':', i++);
    
        if(i > 100)
        {
            clearInterval(interval);
            celery.newLine('done!');
        }
    }, 10);
});


celery.on('timeout :ttl', function(data)
{
    var loader = celery.loading('timeout for '+data.ttl+' seconds: ');
    
    setTimeout(function()
    {
        loader.done();
    }, Number(data.ttl) * 1000);
});

celery.open();
celery.parse(process.argv);
{'fraction_non_alphanumeric': 0.18529130850047756, 'fraction_numerical': 0.009551098376313277, 'mean_word_length': 2.838827838827839, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4500397', 'n_tokens_mistral': 364, 'n_tokens_neox': 349, 'n_words': 67}