<commit_before>/**
 * Created by Mauriel on 8/16/2016.
 */

var sourcePaths = [];
var pathLog = [];
var pathLogIndex = 0;
var isDragging = false;
var file_metadata_alert = '<div class="alert alert-warning alert-dismissible" role="alert"><h4>Select a file to see file type metadata.</h4></div>';

function getFolderTemplateInstance(folderName) {
    return "<li class='fb-folder droppable draggable' title='" + folderName + "&#13;Type: File Folder'>" +
                "<span class='fb-file-icon fa fa-folder icon-blue'></span>" +
                "<span class='fb-file-name'>" + folderName + "</span>" +
                "<span class='fb-file-type'>File Folder</span>" +
                "<span class='fb-file-size'></span>" +
            "</li>"
}

// Associates file icons with file extensions. Could be improved with a dictionary.
function getFileTemplateInstance(fileName, fileType, logical_type, logical_file_id, fileSize, pk, url) {
    var fileTypeExt = fileName.substr(fileName.lastIndexOf(".") + 1, fileName.length);
    var extIcon = "fa-file-o";

    var iconTemplate;

    if (fileName.lastIndexOf(".")) {
        if (fileTypeExt.toUpperCase() == "PDF") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-pdf-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "XLS" || fileTypeExt.toUpperCase() == "XLT" || fileTypeExt.toUpperCase() == "XML" || fileTypeExt.toUpperCase() == "CSV") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-excel-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "ZIP" || fileTypeExt.toUpperCase() == "RAR" || fileTypeExt.toUpperCase() == "RAR5") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-zip-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "DOC" || fileTypeExt.toUpperCase() == "DOCX") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-word-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "MP3" || fileTypeExt.toUpperCase() == "WAV" || fileTypeExt.toUpperCase() == "WMA") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-audio-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "MP4" || fileTypeExt.toUpperCase() == "MOV" || fileTypeExt.toUpperCase() == "WMV") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-movie-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "PNG" || fileTypeExt.toUpperCase() == "JPG" || fileTypeExt.toUpperCase() == "JPEG" || fileTypeExt.toUpperCase() == "GIF" || fileTypeExt.toUpperCase() == "TIF" || fileTypeExt.toUpperCase() == "BMP") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-image-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "TXT") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-text-o" + "'></span>";<commit_msg>Removed unused variable<commit_after>/**
 * Created by Mauriel on 8/16/2016.
 */

var sourcePaths = [];
var pathLog = [];
var pathLogIndex = 0;
var isDragging = false;
var file_metadata_alert = '<div class="alert alert-warning alert-dismissible" role="alert"><h4>Select a file to see file type metadata.</h4></div>';

function getFolderTemplateInstance(folderName) {
    return "<li class='fb-folder droppable draggable' title='" + folderName + "&#13;Type: File Folder'>" +
                "<span class='fb-file-icon fa fa-folder icon-blue'></span>" +
                "<span class='fb-file-name'>" + folderName + "</span>" +
                "<span class='fb-file-type'>File Folder</span>" +
                "<span class='fb-file-size'></span>" +
            "</li>"
}

// Associates file icons with file extensions. Could be improved with a dictionary.
function getFileTemplateInstance(fileName, fileType, logical_type, logical_file_id, fileSize, pk, url) {
    var fileTypeExt = fileName.substr(fileName.lastIndexOf(".") + 1, fileName.length);

    var iconTemplate;

    if (fileName.lastIndexOf(".")) {
        if (fileTypeExt.toUpperCase() == "PDF") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-pdf-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "XLS" || fileTypeExt.toUpperCase() == "XLT" || fileTypeExt.toUpperCase() == "XML" || fileTypeExt.toUpperCase() == "CSV") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-excel-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "ZIP" || fileTypeExt.toUpperCase() == "RAR" || fileTypeExt.toUpperCase() == "RAR5") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-zip-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "DOC" || fileTypeExt.toUpperCase() == "DOCX") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-word-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "MP3" || fileTypeExt.toUpperCase() == "WAV" || fileTypeExt.toUpperCase() == "WMA") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-audio-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "MP4" || fileTypeExt.toUpperCase() == "MOV" || fileTypeExt.toUpperCase() == "WMV") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-movie-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "PNG" || fileTypeExt.toUpperCase() == "JPG" || fileTypeExt.toUpperCase() == "JPEG" || fileTypeExt.toUpperCase() == "GIF" || fileTypeExt.toUpperCase() == "TIF" || fileTypeExt.toUpperCase() == "BMP") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-image-o" + "'></span>";
        }
        else if (fileTypeExt.toUpperCase() == "TXT") {
            iconTemplate = "<span class='fb-file-icon fa " + "fa-file-text-o" + "'></span>";
{'fraction_non_alphanumeric': 0.19731246810682088, 'fraction_numerical': 0.005443102568464024, 'mean_word_length': 3.013651877133106, 'pattern_counts': {'":': 0, '<': 63, '<?xml version=': 0, '>': 63, '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': '4804675', 'n_tokens_mistral': 1957, 'n_tokens_neox': 1930, 'n_words': 394}