<commit_before>﻿using mp4box.Extension;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace mp4box.Utility
{
    public static class ToolsUtil
    {
        // Best way to get the application foldre path (as known as workPath)
        // https://stackoverflow.com/questions/6041332/best-way-to-get-application-folder-path
        public static string ToolsFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "tools");

        public static List<ToolInfo> ToolList = new List<ToolInfo>(
            new ToolInfo[]
            {
                AVS4X26X,
                FDKAAC,
                FFMPEG,
                FLAC,
                FLVEXTRACTCL,
                GMKVEXTRACTGUI,
                LAME,
                MKVMERGE,
                MP4BOX,
                NEROAACENC,
                QAAC,
                REFALAC,
                X264_32_10,
                X264_32_8,
                X264_64_10,
                X264_64_8,
                X265_32,
                X265_64,
                ////
                FFPLAY
            }
        );

        #region ToolInfo instances

        public static ToolInfo AVS4X26X = new ToolInfo("avs4x26x.exe")
        {
            description = "avs4x26x"
        };

        public static ToolInfo FDKAAC = new ToolInfo("fdkaac.exe")
        {
            description = "fdkaac"
        };

        public static ToolInfo FFMPEG = new ToolInfo("ffmpeg.exe")
        {
            description = "ffmpeg"
        };

        public static ToolInfo FLAC = new ToolInfo("flac.exe")
        {
            description = "flac"
        };

        public static ToolInfo FLVEXTRACTCL = new ToolInfo("FLVExtractCL.exe")
        {
            description = "FLVExtractCL"
        };

        public static ToolInfo GMKVEXTRACTGUI = new ToolInfo("gMKVExtractGUI.exe")
        {
            description = "gMKVExtractGUI"
        };

        public static ToolInfo LAME = new ToolInfo("lame.exe")
        {
            description = "lame"
        };

        public static ToolInfo MKVMERGE = new ToolInfo("mkvmerge.exe")
        {
            description = "mkvmerge"
        };

        public static ToolInfo MP4BOX = new ToolInfo("MP4Box.exe")
        {
            description = "MP4Box"
        };

        public static ToolInfo NEROAACENC = new ToolInfo("neroAacEnc.exe")
        {
            description = "neroAacEnc"
        };

        public static ToolInfo QAAC = new ToolInfo("qaac.exe")
        {
            description = "qaac"
        };

        public static ToolInfo REFALAC = new ToolInfo("refalac.exe")
        {
            description = "refalac"
        };

        public static ToolInfo X264_32_10 = new ToolInfo("x264_32-10bit.exe")
        {
            description = "x264_32-10bit"
        };

        public static ToolInfo X264_32_8 = new ToolInfo("x264_32-8bit.exe")
        {
            description = "x264_32-8bit"
        };

        public static ToolInfo X264_64_10 = new ToolInfo("x264_64-10bit.exe")
        {
            description = "x264_64-10bit"
        };

        public static ToolInfo X264_64_8 = new ToolInfo("x264_64-8bit.exe")
        {
            description = "x264_64-8bit"
        };

        public static ToolInfo X265_32 = new ToolInfo("x265_32.exe")
        {
            description = "x265_32"
        };

        public static ToolInfo X265_64 = new ToolInfo("x265_64.exe")
        {
            description = "x265_64"
        };

        public static ToolInfo FFPLAY = new ToolInfo("ffplay.exe")
        {
            description = "ffplay"
        };

        #endregion ToolInfo instances


        public class ToolInfo
        {
            public ToolInfo(string fileName)
            {
                this.fileName = fileName;
            }

            public string fileName { get; private set; }<commit_msg>Update the ToolsUtil as version 2016-10-23<commit_after>﻿using mp4box.Extension;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;

namespace mp4box.Utility
{
    public static class ToolsUtil
    {
        // Best way to get the application foldre path (as known as workPath)
        // https://stackoverflow.com/questions/6041332/best-way-to-get-application-folder-path
        public static string ToolsFolder = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "tools");

        // Based on tool_chain version 2016-10-23
        public static List<ToolInfo> ToolList = new List<ToolInfo>(
            new ToolInfo[]
            {
                AVS4X26X,
                FDKAAC,
                FFMPEG,
                FLAC,
                FLVEXTRACTCL,
                GMKVEXTRACTGUI,
                LAME,
                MKVMERGE,
                MP4BOX,
                NEROAACENC,
                QAAC,
                REFALAC,
                X264_32_10,
                X264_32_8,
                X264_64_10,
                X264_64_8,
                X265_8,
                X265_64_10,
                X265_64_12,
                X265_64_8,
                ////
                FFPLAY
            }
        );

        #region ToolInfo instances

        public static ToolInfo AVS4X26X = new ToolInfo("avs4x26x.exe")
        {
            description = "avs4x26x"
        };

        public static ToolInfo FDKAAC = new ToolInfo("fdkaac.exe")
        {
            description = "fdkaac"
        };

        public static ToolInfo FFMPEG = new ToolInfo("ffmpeg.exe")
        {
            description = "ffmpeg"
        };

        public static ToolInfo FLAC = new ToolInfo("flac.exe")
        {
            description = "flac"
        };

        public static ToolInfo FLVEXTRACTCL = new ToolInfo("FLVExtractCL.exe")
        {
            description = "FLVExtractCL"
        };

        public static ToolInfo GMKVEXTRACTGUI = new ToolInfo("gMKVExtractGUI.exe")
        {
            description = "gMKVExtractGUI"
        };

        public static ToolInfo LAME = new ToolInfo("lame.exe")
        {
            description = "lame"
        };

        public static ToolInfo MKVMERGE = new ToolInfo("mkvmerge.exe")
        {
            description = "mkvmerge"
        };

        public static ToolInfo MP4BOX = new ToolInfo("MP4Box.exe")
        {
            description = "MP4Box"
        };

        public static ToolInfo NEROAACENC = new ToolInfo("neroAacEnc.exe")
        {
            description = "neroAacEnc"
        };

        public static ToolInfo QAAC = new ToolInfo("qaac.exe")
        {
            description = "qaac"
        };

        public static ToolInfo REFALAC = new ToolInfo("refalac.exe")
        {
            description = "refalac"
        };

        public static ToolInfo X264_32_10 = new ToolInfo("x264_32-10bit.exe")
        {
            description = "x264_32-10bit"
        };

        public static ToolInfo X264_32_8 = new ToolInfo("x264_32-8bit.exe")
        {
            description = "x264_32-8bit"
        };

        public static ToolInfo X264_64_10 = new ToolInfo("x264_64-10bit.exe")
        {
            description = "x264_64-10bit"
        };

        public static ToolInfo X264_64_8 = new ToolInfo("x264_64-8bit.exe")
        {
            description = "x264_64-8bit"
        };

        public static ToolInfo X265_8 = new ToolInfo("x265-8bit[gcc].exe")
        {
            description = "x265-8bit"
        };

        public static ToolInfo X265_64_8 = new ToolInfo("x265_64-8bit[gcc].exe")
        {
            description = "x265_64-8bit"
        };

        public static ToolInfo X265_64_10 = new ToolInfo("x265_64-10bit[gcc].exe")
        {
            description = "x265_64-10bit"
        };

        public static ToolInfo X265_64_12 = new ToolInfo("x265_64-12bit[gcc].exe")
        {
            description = "x265_64-12bit"
        };

        public static ToolInfo FFPLAY = new ToolInfo("ffplay.exe")
        {
            description = "ffplay"
        };

        #endregion ToolInfo instances


        public class ToolInfo
        {
            public ToolInfo(string fileName)
            {
                this.fileName = fileName;
            }

            public string fileName { get; private set; }
{'fraction_non_alphanumeric': 0.08597995411182224, 'fraction_numerical': 0.049510928631807755, 'mean_word_length': 1.4663490172721858, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 2, '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': '3279885', 'n_tokens_mistral': 2741, 'n_tokens_neox': 2380, 'n_words': 500}