public static void LaunchArgumentsToMarkdown()
        {
            Dictionary <FieldInfo, CommandLineArgumentAttribute> launchArguments = CommandLineParser.GetCommandLineArguments();

            if (launchArguments.Count == 0)
            {
                Debug.LogError("There are no launch arguments!");
                return;
            }

            MarkdownTableGenerator generator = new MarkdownTableGenerator("Launch Arguments List", "Argument", "Description");

            foreach (KeyValuePair <FieldInfo, CommandLineArgumentAttribute> argument in launchArguments)
            {
                generator.AddOption($"`{argument.Value.Name}`", argument.Value.Description);
            }

            generator.SaveMarkdown("launch-arguments");
        }
Example #2
0
        public static void ConsoleConVarListToMarkdown()
        {
            Dictionary <ConVar, FieldInfo> conVars = ConsoleBackend.GetConVars();

            if (conVars == null)
            {
                Debug.LogError("Console system doesn't have any commands! Either its not active or something went wrong.");
                return;
            }

            MarkdownTableGenerator generator = new MarkdownTableGenerator("ConVar List", "Command", "Summary", "Graphics Only");

            foreach (ConVar command in conVars.Keys)
            {
                generator.AddOption($"`{command.Name}`", command.Summary, command.GraphicsOnly ? "✔" : "❌");
            }

            generator.SaveMarkdown("convar-list");
        }