<commit_before>"use strict";

var globART = function ( folder )  {
 
  
  	var self = Object.create( module, {});
  	var fs 	= require('fs');
  	var S = require( 'string');

  	function trace( message ){
  		console.log( message );
  	}

   self.searchRoot = function( root ){

   		var fileList = fs.readdirSync( root );
      	var max = fileList.length;

      	self.removeJS( fileList );
     	self.searchDir( root, fileList );
  }

    self.searchDir = function( root, list ){

    	var max = list.length;
    	var url;
    	var frameList;

    	for ( var i = max - 1; i >= 0 ; i-- ){
    		var dir = list[i];
    		url = root +  '/' + dir;
    		var rockList = fs.readdirSync( url );
    		self.removeJS( rockList );
    		self.searchRock( rockList, url );
    	}
    	
    }

    self.searchRock = function( rockList, root ){

    	var max = rockList.length;
    	var rockFile;
    	var frameData;

    	for (var i = 0; i < max; i++) {
    		var rock = rockList[i];
    		var newSRC = root + '/' + rock;
    		var toonList = fs.readdirSync( newSRC );
    		
    		rockFile = self.removeJS( toonList )[0];
    		frameData = self.searchToon( toonList, newSRC, rockFile );
    		};

    	var rockSRC 	= newSRC + '/' + rockFile;
		var rock 		= require( '../.' + rockSRC )();
	
		for (var i = rock.toonList.length - 1; i >= 0; i--) {
			var toon = rock.toonList[i];

			if ( toon.id == null 		) continue;
			if ( toon.src == null    	) toon.src = toon.id;
			if ( toon.frames == null 	) {
				if( frameData[ toon.src] != null  ) toon.frames = frameData[ toon.src]
				continue;
			}

			self.replaceFramesWithURLs( toon.frames, frameData[toon.src] );


				

		};

		// now you needs to build out the frames
		// populate the frames with the urls of the images
    }

    self.replaceFramesWithURLs = function( frames , urls ){

    		for (var i = frames.length - 1; i >= 0; i--) {
    			var frame = frames[i];
    			frames[ i ] = urls[ frame - 1 ];// the frames are based on the idea of 1
    			trace("what does the frame look like " + frames[ i ] );
    		};
    }

    self.searchToon = function( toonList, dir, rockFile ){


    	var max 	= toonList.length;<commit_msg>all you graphics belong to us<commit_after>"use strict";

var globART = function ( folder )  {
 
  
  	var self = Object.create( module, {});
  	
  	self.graphics = []; // ARRAY OF ALL THE GRAPHIC ASSETS THAT NEED TO BE LOADED

  	var fs 	= require('fs');
  	var S = require( 'string');

  	function trace( message ){
  		console.log( message );
  	}

   self.searchRoot = function( root ){

   		var fileList = fs.readdirSync( root );
      	var max = fileList.length;

      	self.removeJS( fileList );
     	self.searchDir( root, fileList );
  }

    self.searchDir = function( root, list ){

    	var max = list.length;
    	var url;
    	var frameList;

    	for ( var i = max - 1; i >= 0 ; i-- ){
    		var dir = list[i];
    		url = root +  '/' + dir;
    		var rockList = fs.readdirSync( url );
    		self.removeJS( rockList );
    		var frameData = self.searchRock( rockList, url );
    		self.aquireAllGraphics( frameData );
    	}

    	var max = self.graphics.length;
    	for (var i = self.graphics.length - 1; i >= 0; i--) {
    		var file = self.graphics[i];
    	};
    }

    self.aquireAllGraphics = function( frameData ){

    	for (var key in frameData) {
  				
  				if ( frameData.hasOwnProperty(key)) {
    			
    			var data = frameData[key];
    			var max = data.length
    			for ( var i = 0; i < max; i++ ){

    			var file = data[i];
    			self.graphics.push( file ) ;	
    		}
  			}
			}
    }

    self.searchRock = function( rockList, root ){

    	var max = rockList.length;
    	var rockFile;
    	var frameData;

    	for (var i = 0; i < max; i++) {
    		var rock = rockList[i];
    		var newSRC = root + '/' + rock;
    		var toonList = fs.readdirSync( newSRC );
    		
    		rockFile = self.removeJS( toonList )[0];
    		frameData = self.searchToon( toonList, newSRC, rockFile );
    		};

    	var rockSRC 	= newSRC + '/' + rockFile;
		var rock 		= require( '../.' + rockSRC )();
	
		for (var i = rock.toonList.length - 1; i >= 0; i--) {
			var toon = rock.toonList[i];

			if ( toon.id == null 		) continue;
			if ( toon.src == null    	) toon.src = toon.id;
			if ( toon.frames == null 	) {
				if( frameData[ toon.src] != null  ) toon.frames = frameData[ toon.src]
				continue;
			}

			//self.replaceFramesWithURLs( toon.frames, frameData[toon.src] );// TURN THIS OFF FOR NOW WILL NEED LATR
		};

		return frameData;

		// now you needs to build out the frames
		// populate the frames with the urls of the images
    }

    self.replaceFramesWithURLs = function( frames , urls ){

    		for (var i = frames.length - 1; i >= 0; i--) {
    			var frame = frames[i];
    			frames[ i ] = urls[ frame - 1 ];// the frames are based on the idea of 1
    			trace("what does the frame look like " + frames[ i ] );
    		};
    }

    self.searchToon = function( toonList, dir, rockFile ){


    	var max 	= toonList.length;
{'fraction_non_alphanumeric': 0.13659793814432988, 'fraction_numerical': 0.004559873116574148, 'mean_word_length': 2.0446590223295114, 'pattern_counts': {'":': 0, '<': 6, '<?xml version=': 0, '>': 10, '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': '4713155', 'n_tokens_mistral': 1984, 'n_tokens_neox': 1820, 'n_words': 498}