<commit_before>﻿namespace Unlimitedinf.Fileserve
{
    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Text;
    using System.Threading.Tasks;

    class Program
    {
        static void Main(string[] args)
        {
        }
    }
}<commit_msg>begin cli work<commit_after>﻿namespace Unlimitedinf.Fileserve
{
    using System;
    using System.Collections.Generic;
    using System.Linq;

    internal sealed class Program
    {
        private enum Commands
        {
            ConfigFileAdd,
            ConfigFileDel,
            ConfigFileEdit,
            ConfigFileView,
            ConfigLinkAdd,
            ConfigLinkDel,
            ConfigLinkView,
            ConfigUserAdd,
            ConfigUserDel,
            ConfigUserEdit,
            ConfigUserView,
            Help
        };

        private static Dictionary<string, Dictionary<string, Dictionary<string, Action>>> cli = new Dictionary<string, Dictionary<string, Dictionary<string, Action>>>
        {
            { "config", new Dictionary<string, Dictionary<string, Action>>
            {
                { "file", new Dictionary<string, Action>
                {
                    { "add", () => Run(Commands.ConfigFileAdd) },
                    { "del", () => Run(Commands.ConfigFileDel) },
                    { "edit", () => Run(Commands.ConfigFileEdit) },
                    { "view", () => Run(Commands.ConfigFileView) }
                } },
                { "link", new Dictionary<string, Action>
                {
                    { "add", () => Run(Commands.ConfigLinkAdd) },
                    { "del", () => Run(Commands.ConfigLinkDel) },
                    { "view", () => Run(Commands.ConfigLinkView) }
                } },
                { "user", new Dictionary<string, Action>
                {
                    { "add", () => Run(Commands.ConfigUserAdd) },
                    { "del", () => Run(Commands.ConfigUserDel) },
                    { "edit", () => Run(Commands.ConfigUserEdit) },
                    { "view", () => Run(Commands.ConfigUserView) }
                } }
            } }
        };

        static void Main(string[] args)
        {
            // Asking for help somewhere, so just provide whole list
            if (args.Contains("help") || args.Length == 0)
            {
                Run();
            }
        }

        private static void Run(Commands command = Commands.Help)
        {
            const string exeName = "fileserve";

            switch (command)
            {
                case Commands.Help:
                    Console.WriteLine(exeName);
                    foreach (string module in cli.Keys.OrderBy((key) => key))
                    {
                        Console.WriteLine("  " + module);
                        foreach (string submodule in cli[module].Keys.OrderBy((key) => key))
                        {
                            Console.WriteLine("    " + submodule);
                            foreach (string action in cli[module][submodule].Keys.OrderBy((key) => key))
                            {
                                Console.WriteLine("      " + action);
                            }
                        }
                    }
                    break;
            }
        }
    }
}
{'fraction_non_alphanumeric': 0.11147737488762362, 'fraction_numerical': 0.00029967036260113877, 'mean_word_length': 1.2268178785857238, 'pattern_counts': {'":': 0, '<': 14, '<?xml version=': 0, '>': 28, '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': '3177183', 'n_tokens_mistral': 822, 'n_tokens_neox': 795, 'n_words': 156}