<commit_before>var T = require ( 'Tango' ) ;
var Tail = require ( './Tail' ) ;
var Event = require ( 'gp/Event' ) ;
var Client = require ( 'gp/Client' ) ;

var index = -1 ;

fileName = T.getProperty ( "file" ) ;

var _fileList = [ "/home/gess/work/poi-3.8/ServiceContainer.ACS.log_1"
								, "/home/isdp/isdp-server/log/isdp-ciss.log_1"
								, "/home/gess/NGMD/Test/Converter.log"
								];

index = 2 ;

var client = new Client() ;

var fileName = T.getProperty ( "file" ) ;
if ( fileName )
{
	var i = _fileList.indexOf ( fileName ) ;
	if ( i < 0 )
	{
		_fileList.push ( fileName ) ;
		index = _fileList.length - 1 ;
	}
}

var what = T.getProperty ( "getFileList" ) ;
if ( what )
{
	client.request ( "tail:getFileList"
, function result(e)
  {
    T.log ( e.data.fileList ) ;
    this.end() ;
  });
	return ;
}
what = T.getProperty ( "subscribe" ) ;
if ( what )
{
	index = parseInt ( what ) ;
	if ( isNaN ( index ) || index < 0 || index >= _fileList.length )
	{
		console.error ( T.where() + " subscribe: invalid index=" + index ) ;
		return ;
	}
	client.request ( { name: "tail:subscribe", type: index }
	, function result(e)
	  {
	    if ( e.isBad() )
	    {
	    	this.end() ;
	    	return ;
	    }
	    // console.log ( "tail of " + e.type + " accepted!" ) ;
	    var n = 0 ;
	    client.on ( "tail:" + _fileList[index], function subscribed_callback(e)
	    {
T.lwhere (  ) ;
				console.log ( e.data.text ) ;
T.lwhere (  ) ;
	    } )
	  }
	);
T.lwhere (  ) ;
	return ;<commit_msg>gp tail<commit_after>var T = require ( 'Tango' ) ;
var Tail = require ( './Tail' ) ;
var Event = require ( 'gp/Event' ) ;
var Client = require ( 'gp/Client' ) ;

var index = -1 ;

fileName = T.getProperty ( "file" ) ;

var _fileList = [ "/home/gess/work/poi-3.8/ServiceContainer.ACS.log_1"
								, "/home/isdp/isdp-server/log/isdp-ciss.log_1"
								, "/home/gess/NGMD/Test/Converter.log"
								];

index = 2 ;

var client = new Client() ;

var fileName = T.getProperty ( "file" ) ;
if ( fileName )
{
	var i = _fileList.indexOf ( fileName ) ;
	if ( i < 0 )
	{
		_fileList.push ( fileName ) ;
		index = _fileList.length - 1 ;
	}
}

var what = T.getProperty ( "getFileList" ) ;
if ( what )
{
	client.request ( "tail:getFileList"
, function result(e)
  {
    T.log ( e.data.fileList ) ;
    this.end() ;
  });
	return ;
}
what = T.getProperty ( "subscribe" ) ;
if ( what )
{
	index = parseInt ( what ) ;
	if ( isNaN ( index ) || index < 0 || index >= _fileList.length )
	{
		console.error ( T.where() + " subscribe: invalid index=" + index ) ;
		return ;
	}
	client.request ( { name: "tail:subscribe", type: index }
	, function result(e)
	  {
	    if ( e.isBad() )
	    {
	    	this.end() ;
	    	return ;
	    }
	    // console.log ( "tail of " + e.type + " accepted!" ) ;
	    var n = 0 ;
	    client.on ( "tail:" + _fileList[index], function subscribed_callback(e)
	    {
				console.log ( e.data.text ) ;
	    } )
	  }
	);
T.lwhere (  ) ;
	return ;
{'fraction_non_alphanumeric': 0.17718940936863545, 'fraction_numerical': 0.006788866259334691, 'mean_word_length': 2.356492027334852, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '5473230', 'n_tokens_mistral': 1220, 'n_tokens_neox': 1145, 'n_words': 233}