Пример #1
0
        public static Control CreateDefaultLabelFor(string parameterName, Core.Automation.Commands.ScriptCommand parent)
        {
            var variableProperties = parent.GetType().GetProperties().Where(f => f.Name == parameterName).FirstOrDefault();

            var propertyAttributesAssigned = variableProperties.GetCustomAttributes(typeof(Core.Automation.Attributes.PropertyAttributes.PropertyDescription), true);



            Label inputLabel = new Label();

            if (propertyAttributesAssigned.Length > 0)
            {
                var attribute = (Core.Automation.Attributes.PropertyAttributes.PropertyDescription)propertyAttributesAssigned[0];
                inputLabel.Text = attribute.propertyDescription;
            }
            else
            {
                inputLabel.Text = parameterName;
            }



            inputLabel.AutoSize  = true;
            inputLabel.Font      = new Font("Segoe UI Light", 12);
            inputLabel.ForeColor = Color.White;
            inputLabel.Name      = "lbl_" + parameterName;
            return(inputLabel);
        }
Пример #2
0
        /// <summary>
        /// Returns a new 'Top-Level' command.
        /// </summary>
        public ScriptAction AddNewParentCommand(Core.Automation.Commands.ScriptCommand scriptCommand)
        {
            ScriptAction newExecutionCommand = new ScriptAction()
            {
                ScriptCommand = scriptCommand
            };

            Commands.Add(newExecutionCommand);
            return(newExecutionCommand);
        }
Пример #3
0
        public static ComboBox CreateStandardComboboxFor(string parameterName, Core.Automation.Commands.ScriptCommand parent)
        {
            var inputBox = new ComboBox();

            inputBox.Font = new Font("Segoe UI", 12, FontStyle.Regular);
            inputBox.DataBindings.Add("Text", parent, parameterName, false, DataSourceUpdateMode.OnPropertyChanged);
            inputBox.Height = 30;
            inputBox.Width  = 300;
            inputBox.Name   = parameterName;


            return(inputBox);
        }
Пример #4
0
        public static List <AutomationCommand> GenerateCommandsandControls()
        {
            var commandList = new List <AutomationCommand>();

            var commandClasses = Assembly.GetExecutingAssembly().GetTypes()
                                 .Where(t => t.Namespace == "taskt.Core.Automation.Commands")
                                 .Where(t => t.Name != "ScriptCommand")
                                 .Where(t => t.IsAbstract == false)
                                 .Where(t => t.BaseType.Name == "ScriptCommand")
                                 .ToList();


            var userPrefs = new ApplicationSettings().GetOrCreateApplicationSettings();

            //Loop through each class
            foreach (var commandClass in commandClasses)
            {
                var    groupingAttribute = commandClass.GetCustomAttributes(typeof(Core.Automation.Attributes.ClassAttributes.Group), true);
                string groupAttribute    = "";
                if (groupingAttribute.Length > 0)
                {
                    var attributeFound = (Core.Automation.Attributes.ClassAttributes.Group)groupingAttribute[0];
                    groupAttribute = attributeFound.groupName;
                }

                //Instantiate Class
                Core.Automation.Commands.ScriptCommand newCommand = (Core.Automation.Commands.ScriptCommand)Activator.CreateInstance(commandClass);

                //If command is enabled, pull for display and configuration
                if (newCommand.CommandEnabled)
                {
                    var newAutomationCommand = new AutomationCommand();
                    newAutomationCommand.CommandClass = commandClass;
                    newAutomationCommand.Command      = newCommand;
                    newAutomationCommand.DisplayGroup = groupAttribute;
                    newAutomationCommand.FullName     = string.Join(" - ", groupAttribute, newCommand.SelectionName);
                    newAutomationCommand.ShortName    = newCommand.SelectionName;

                    if (userPrefs.ClientSettings.PreloadBuilderCommands)
                    {
                        //newAutomationCommand.RenderUIComponents();
                    }

                    //call RenderUIComponents to render UI controls
                    commandList.Add(newAutomationCommand);
                }
            }

            return(commandList);
        }
Пример #5
0
        /// <summary>
        /// adds a command as a nested command to a top-level command
        /// </summary>
        public ScriptAction AddAdditionalAction(Core.Automation.Commands.ScriptCommand scriptCommand)
        {
            if (AdditionalScriptCommands == null)
            {
                AdditionalScriptCommands = new List <ScriptAction>();
            }

            ScriptAction newExecutionCommand = new ScriptAction()
            {
                ScriptCommand = scriptCommand
            };

            AdditionalScriptCommands.Add(newExecutionCommand);
            return(newExecutionCommand);
        }
Пример #6
0
        public static Control CreateDefaultInputFor(string parameterName, Core.Automation.Commands.ScriptCommand parent, int height = 30, int width = 300)
        {
            var inputBox = new TextBox();

            inputBox.Font = new Font("Segoe UI", 12, FontStyle.Regular);
            inputBox.DataBindings.Add("Text", parent, parameterName, false, DataSourceUpdateMode.OnPropertyChanged);
            inputBox.Height = height;
            inputBox.Width  = width;

            if (inputBox.Height != 30)
            {
                inputBox.Multiline = true;
            }

            inputBox.Name = parameterName;
            return(inputBox);
        }
Пример #7
0
        public static Control CreateDropdownFor(string parameterName, Core.Automation.Commands.ScriptCommand parent)
        {
            var inputBox = new ComboBox();

            inputBox.Font = new Font("Segoe UI", 12, FontStyle.Regular);
            inputBox.DataBindings.Add("Text", parent, parameterName, false, DataSourceUpdateMode.OnPropertyChanged);
            inputBox.Height = 30;
            inputBox.Width  = 300;
            inputBox.Name   = parameterName;

            var variableProperties         = parent.GetType().GetProperties().Where(f => f.Name == parameterName).FirstOrDefault();
            var propertyAttributesAssigned = variableProperties.GetCustomAttributes(typeof(Core.Automation.Attributes.PropertyAttributes.PropertyUISelectionOption), true);

            foreach (Core.Automation.Attributes.PropertyAttributes.PropertyUISelectionOption option in propertyAttributesAssigned)
            {
                inputBox.Items.Add(option.uiOption);
            }

            return(inputBox);
        }
Пример #8
0
        private void cboSelectedCommand_SelectionChangeCommitted(object sender, EventArgs e)
        {
            //clear controls
            flw_InputVariables.Controls.Clear();

            //find underlying command item
            var selectedCommandItem = cboSelectedCommand.Text;

            //get command
            var userSelectedCommand = commandList.Where(itm => itm.FullName == selectedCommandItem).FirstOrDefault();

            //create new command for binding
            selectedCommand = (Core.Automation.Commands.ScriptCommand)Activator.CreateInstance(userSelectedCommand.CommandClass);


            //Todo: MAKE OPTION TO RENDER ON THE FLY

            //if (true)
            //{
            //    var renderedControls = selectedCommand.Render(null);
            //    userSelectedCommand.UIControls = new List<Control>();
            //    userSelectedCommand.UIControls.AddRange(renderedControls);
            //}


            //update data source
            userSelectedCommand.Command = selectedCommand;

            //bind controls to new data source
            userSelectedCommand.Bind(this);

            //add each control
            foreach (var ctrl in userSelectedCommand.UIControls)
            {
                flw_InputVariables.Controls.Add(ctrl);
            }


            //resize controls
            frmCommandEditor_Resize(null, null);
        }
Пример #9
0
        public static List <Control> CreateDataGridViewGroupFor(string parameterName, Core.Automation.Commands.ScriptCommand parent, Forms.frmCommandEditor editor)
        {
            var controlList = new List <Control>();
            var label       = CreateDefaultLabelFor(parameterName, parent);
            var gridview    = CreateDataGridView(parent, parameterName);
            var helpers     = CreateUIHelpersFor(parameterName, parent, new Control[] { gridview }, editor);

            controlList.Add(label);
            controlList.AddRange(helpers);
            controlList.Add(gridview);

            return(controlList);
        }
Пример #10
0
        public static List <Control> CreateDefaultDropdownGroupFor(string parameterName, Core.Automation.Commands.ScriptCommand parent, Forms.frmCommandEditor editor)
        {
            //Todo: Test
            var controlList = new List <Control>();
            var label       = CreateDefaultLabelFor(parameterName, parent);
            var input       = CreateDropdownFor(parameterName, parent);
            var helpers     = CreateUIHelpersFor(parameterName, parent, new Control[] { input }, editor);

            controlList.Add(label);
            controlList.AddRange(helpers);
            controlList.Add(input);

            return(controlList);
        }
Пример #11
0
        public static List <Control> CreateUIHelpersFor(string parameterName, Core.Automation.Commands.ScriptCommand parent, Control[] targetControls, UI.Forms.frmCommandEditor editor)
        {
            var variableProperties = parent.GetType().GetProperties().Where(f => f.Name == parameterName).FirstOrDefault();
            var propertyUIHelpers  = variableProperties.GetCustomAttributes(typeof(Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper), true);
            var controlList        = new List <Control>();

            if (propertyUIHelpers.Count() == 0)
            {
                return(controlList);
            }

            foreach (Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper attrib in propertyUIHelpers)
            {
                taskt.UI.CustomControls.CommandItemControl helperControl = new taskt.UI.CustomControls.CommandItemControl();
                helperControl.Padding    = new System.Windows.Forms.Padding(10, 0, 0, 0);
                helperControl.ForeColor  = Color.AliceBlue;
                helperControl.Font       = new Font("Segoe UI Semilight", 10);
                helperControl.Name       = parameterName + "_helper";
                helperControl.Tag        = targetControls.FirstOrDefault();
                helperControl.HelperType = attrib.additionalHelper;

                switch (attrib.additionalHelper)
                {
                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowVariableHelper:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("VariableCommand");
                    helperControl.CommandDisplay = "Insert Variable";
                    helperControl.Click         += (sender, e) => ShowVariableSelector(sender, e);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFileSelectionHelper:
                    //show file selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("ClipboardGetTextCommand");
                    helperControl.CommandDisplay = "Select a File";
                    helperControl.Click         += (sender, e) => ShowFileSelector(sender, e, editor);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowFolderSelectionHelper:
                    //show file selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("ClipboardGetTextCommand");
                    helperControl.CommandDisplay = "Select a Folder";
                    helperControl.Click         += (sender, e) => ShowFolderSelector(sender, e, editor);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowImageRecogitionHelper:
                    //show file selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("OCRCommand");
                    helperControl.CommandDisplay = "Capture Reference Image";
                    helperControl.Click         += (sender, e) => ShowImageCapture(sender, e);

                    taskt.UI.CustomControls.CommandItemControl testRun = new taskt.UI.CustomControls.CommandItemControl();
                    testRun.Padding   = new System.Windows.Forms.Padding(10, 0, 0, 0);
                    testRun.ForeColor = Color.AliceBlue;

                    testRun.CommandImage   = UI.Images.GetUIImage("OCRCommand");
                    testRun.CommandDisplay = "Run Image Recognition Test";
                    testRun.ForeColor      = Color.AliceBlue;
                    testRun.Tag            = targetControls.FirstOrDefault();
                    testRun.Click         += (sender, e) => RunImageCapture(sender, e);
                    controlList.Add(testRun);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowCodeBuilder:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("RunScriptCommand");
                    helperControl.CommandDisplay = "Code Builder";
                    helperControl.Click         += (sender, e) => ShowCodeBuilder(sender, e, editor);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowMouseCaptureHelper:
                    helperControl.CommandImage   = UI.Images.GetUIImage("SendMouseMoveCommand");
                    helperControl.CommandDisplay = "Capture Mouse Position";
                    helperControl.ForeColor      = Color.AliceBlue;
                    helperControl.Click         += (sender, e) => ShowMouseCaptureForm(sender, e);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowElementRecorder:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("ClipboardGetTextCommand");
                    helperControl.CommandDisplay = "Element Recorder";
                    helperControl.Click         += (sender, e) => ShowElementRecorder(sender, e, editor);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.GenerateDLLParameters:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("ExecuteDLLCommand");
                    helperControl.CommandDisplay = "Generate Parameters";
                    helperControl.Click         += (sender, e) => GenerateDLLParameters(sender, e);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowDLLExplorer:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("ExecuteDLLCommand");
                    helperControl.CommandDisplay = "Launch DLL Explorer";
                    helperControl.Click         += (sender, e) => ShowDLLExplorer(sender, e);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.AddInputParameter:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("ExecuteDLLCommand");
                    helperControl.CommandDisplay = "Add Input Parameter";
                    helperControl.Click         += (sender, e) => AddInputParameter(sender, e, editor);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowHTMLBuilder:
                    helperControl.CommandImage   = UI.Images.GetUIImage("ExecuteDLLCommand");
                    helperControl.CommandDisplay = "Launch HTML Builder";
                    helperControl.Click         += (sender, e) => ShowHTMLBuilder(sender, e, editor);
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowIfBuilder:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("VariableCommand");
                    helperControl.CommandDisplay = "Add New If Statement";
                    break;

                case Core.Automation.Attributes.PropertyAttributes.PropertyUIHelper.UIAdditionalHelperType.ShowLoopBuilder:
                    //show variable selector
                    helperControl.CommandImage   = UI.Images.GetUIImage("VariableCommand");
                    helperControl.CommandDisplay = "Add New Loop Statement";
                    break;

                    //default:
                    //    MessageBox.Show("Command Helper does not exist for: " + attrib.additionalHelper.ToString());
                    //    break;
                }

                controlList.Add(helperControl);
            }

            return(controlList);
        }
Пример #12
0
        public void ExecuteCommand(Core.Script.ScriptAction command)
        {
            //get command
            Core.Automation.Commands.ScriptCommand parentCommand = command.ScriptCommand;

            //update execution line numbers
            LineNumberChanged(parentCommand.LineNumber);

            //handle pause request
            if (parentCommand.PauseBeforeExeucution)
            {
                ReportProgress("Pausing Before Execution");
                IsScriptPaused = true;
            }

            //handle pause
            bool isFirstWait = true;

            while (IsScriptPaused)
            {
                //only show pause first loop
                if (isFirstWait)
                {
                    CurrentStatus = EngineStatus.Paused;
                    ReportProgress("Paused at Line " + parentCommand.LineNumber + " - " + parentCommand.GetDisplayValue());
                    ReportProgress("Paused on Line " + parentCommand.LineNumber + ": " + parentCommand.GetDisplayValue());
                    ReportProgress("[Please select 'Resume' when ready]");
                    isFirstWait = false;
                }

                //wait
                System.Threading.Thread.Sleep(2000);
            }

            CurrentStatus = EngineStatus.Running;

            //handle if cancellation was requested
            if (IsCancellationPending)
            {
                return;
            }


            //bypass comments
            if (parentCommand is Core.Automation.Commands.CommentCommand || parentCommand.IsCommented)
            {
                ReportProgress("Skipping Line " + parentCommand.LineNumber + ": " + parentCommand.GetDisplayValue().ConvertToUserVariable(this));
                return;
            }

            //report intended execution
            ReportProgress("Running Line " + parentCommand.LineNumber + ": " + parentCommand.GetDisplayValue());


            //handle any errors
            try
            {
                //determine type of command
                if ((parentCommand is Core.Automation.Commands.BeginNumberOfTimesLoopCommand) || (parentCommand is Core.Automation.Commands.BeginContinousLoopCommand) || (parentCommand is Core.Automation.Commands.BeginListLoopCommand) || (parentCommand is Core.Automation.Commands.BeginIfCommand) || (parentCommand is Core.Automation.Commands.BeginMultiIfCommand) || (parentCommand is Core.Automation.Commands.BeginExcelDatasetLoopCommand) || (parentCommand is Commands.TryCommand) || (parentCommand is Core.Automation.Commands.BeginLoopCommand) || (parentCommand is Core.Automation.Commands.BeginMultiLoopCommand))
                {
                    //run the command and pass bgw/command as this command will recursively call this method for sub commands
                    parentCommand.RunCommand(this, command);
                }
                else if (parentCommand is Core.Automation.Commands.SequenceCommand)
                {
                    parentCommand.RunCommand(this, command);
                }
                else if (parentCommand is Core.Automation.Commands.StopTaskCommand)
                {
                    IsCancellationPending = true;
                    return;
                }
                else if (parentCommand is Core.Automation.Commands.ExitLoopCommand)
                {
                    CurrentLoopCancelled = true;
                }
                else if (parentCommand is Core.Automation.Commands.NextLoopCommand)
                {
                    CurrentLoopContinuing = true;
                }
                else if (parentCommand is Core.Automation.Commands.SetEngineDelayCommand)
                {
                    //get variable
                    var setEngineCommand = (Core.Automation.Commands.SetEngineDelayCommand)parentCommand;
                    var engineDelay      = setEngineCommand.v_EngineSpeed.ConvertToUserVariable(this);
                    var delay            = int.Parse(engineDelay);

                    //update delay setting
                    this.engineSettings.DelayBetweenCommands = delay;
                }
                else
                {
                    //sleep required time
                    System.Threading.Thread.Sleep(engineSettings.DelayBetweenCommands);

                    //run the command
                    parentCommand.RunCommand(this);
                }
            }
            catch (Exception ex)
            {
                ErrorsOccured.Add(new ScriptError()
                {
                    LineNumber = parentCommand.LineNumber, ErrorMessage = ex.Message, StackTrace = ex.ToString()
                });

                //error occuured so decide what user selected
                if (ErrorHandler != null)
                {
                    switch (ErrorHandler.v_ErrorHandlingAction)
                    {
                    case "Continue Processing":

                        ReportProgress("Error Occured at Line " + parentCommand.LineNumber + ":" + ex.ToString());
                        ReportProgress("Continuing Per Error Handling");

                        break;

                    default:

                        throw ex;
                    }
                }
                else
                {
                    throw ex;
                }
            }
        }
Пример #13
0
        /// <summary>
        /// Returns a path that contains the generated markdown files
        /// </summary>
        /// <returns></returns>
        public string GenerateMarkdownFiles()
        {
            //create directory if required
            var docsFolderName = "docs";

            if (!System.IO.Directory.Exists(docsFolderName))
            {
                System.IO.Directory.CreateDirectory(docsFolderName);
            }

            //get all commands
            var commandClasses = Assembly.GetExecutingAssembly().GetTypes()
                                 .Where(t => t.Namespace == "taskt.Core.Automation.Commands")
                                 .Where(t => t.Name != "ScriptCommand")
                                 .Where(t => t.IsAbstract == false)
                                 .Where(t => t.BaseType.Name == "ScriptCommand")
                                 .ToList();


            var           highLevelCommandInfo = new List <CommandMetaData>();
            StringBuilder sb;
            string        fullFileName;

            //loop each command
            foreach (var commandClass in commandClasses)
            {
                //instantiate and pull properties from command class
                Core.Automation.Commands.ScriptCommand instantiatedCommand = (Core.Automation.Commands.ScriptCommand)Activator.CreateInstance(commandClass);
                var groupName        = GetClassValue(commandClass, typeof(Core.Automation.Attributes.ClassAttributes.Group));
                var classDescription = GetClassValue(commandClass, typeof(Core.Automation.Attributes.ClassAttributes.Description));
                var usesDescription  = GetClassValue(commandClass, typeof(Core.Automation.Attributes.ClassAttributes.UsesDescription));
                var commandName      = instantiatedCommand.SelectionName;

                sb = new StringBuilder();

                //create string builder to build markdown document and append data
                sb.AppendLine("<!--TITLE: " + commandName + " Command -->");
                sb.AppendLine("<!-- SUBTITLE: a command in the " + groupName + " group. -->");

                sb.AppendLine("[Go To Automation Commands Overview](/automation-commands)");

                sb.AppendLine(Environment.NewLine);
                sb.AppendLine("# " + commandName + " Command");
                sb.AppendLine(Environment.NewLine);

                //append more
                sb.AppendLine("## What does this command do?");
                sb.AppendLine(classDescription);
                sb.AppendLine(Environment.NewLine);

                //more
                sb.AppendLine("## When would I want to use this command?");
                sb.AppendLine(usesDescription);
                sb.AppendLine(Environment.NewLine);

                //build parameter table based on required user inputs
                sb.AppendLine("## Command Parameters");
                sb.AppendLine("| Parameter Question   	| What to input  	|  Sample Data 	| Remarks  	|");
                sb.AppendLine("| ---                    | ---               | ---           | ---       |");

                //loop each property
                foreach (var prop in commandClass.GetProperties().Where(f => f.Name.StartsWith("v_")).ToList())
                {
                    //pull attributes from property
                    var commandLabel       = GetPropertyValue(prop, typeof(Core.Automation.Attributes.PropertyAttributes.PropertyDescription));
                    var helpfulExplanation = GetPropertyValue(prop, typeof(Core.Automation.Attributes.PropertyAttributes.InputSpecification));
                    var sampleUsage        = GetPropertyValue(prop, typeof(Core.Automation.Attributes.PropertyAttributes.SampleUsage));
                    var remarks            = GetPropertyValue(prop, typeof(Core.Automation.Attributes.PropertyAttributes.Remarks));

                    //append to parameter table
                    sb.AppendLine("|" + commandLabel + "|" + helpfulExplanation + "|" + sampleUsage + "|" + remarks + "|");
                }

                sb.AppendLine(Environment.NewLine);



                sb.AppendLine("## Developer/Additional Reference");
                sb.AppendLine("Automation Class Name: " + commandClass.Name);
                sb.AppendLine("Parent Namespace: " + commandClass.Namespace);
                sb.AppendLine("This page was generated on " + DateTime.Now.ToString("MM/dd/yy hh:mm tt"));


                sb.AppendLine(Environment.NewLine);

                sb.AppendLine("## Help");
                sb.AppendLine("[Open/Report an issue on GitHub](https://github.com/saucepleez/taskt/issues/new)");
                sb.AppendLine("[Ask a question on Gitter](https://gitter.im/taskt-rpa/Lobby)");



                //create kebob destination and command file nmae
                var kebobDestination = groupName.Replace(" ", "-").Replace("/", "-").ToLower();
                var kebobFileName    = commandName.Replace(" ", "-").Replace("/", "-").ToLower() + "-command.md";

                //create directory if required
                var destinationdirectory = docsFolderName + "\\" + kebobDestination;
                if (!System.IO.Directory.Exists(destinationdirectory))
                {
                    System.IO.Directory.CreateDirectory(destinationdirectory);
                }

                //write file
                fullFileName = System.IO.Path.Combine(destinationdirectory, kebobFileName);
                System.IO.File.WriteAllText(fullFileName, sb.ToString());

                //add to high level
                var serverPath = "/automation-commands/" + kebobDestination + "/" + kebobFileName.Replace(".md", "");
                highLevelCommandInfo.Add(new CommandMetaData()
                {
                    Group = groupName, Description = classDescription, Name = commandName, Location = serverPath
                });
            }

            sb = new StringBuilder();
            sb.AppendLine("<!--TITLE: Automation Commands -->");
            sb.AppendLine("<!-- SUBTITLE: an overview of available commands in taskt. -->");
            sb.AppendLine("## Automation Commands");
            sb.AppendLine("| Command Group   	| Command Name 	|  Command Description	|");
            sb.AppendLine("| ---                | ---           | ---                   |");


            foreach (var cmd in highLevelCommandInfo)
            {
                sb.AppendLine("|" + cmd.Group + "|[" + cmd.Name + "](" + cmd.Location + ")|" + cmd.Description + "|");
            }

            sb.AppendLine("This page was generated on " + DateTime.Now.ToString("MM/dd/yy hh:mm tt"));

            sb.AppendLine(Environment.NewLine);


            sb.AppendLine("## Help");
            sb.AppendLine("[Open/Report an issue on GitHub](https://github.com/saucepleez/taskt/issues/new)");
            sb.AppendLine("[Ask a question on Gitter](https://gitter.im/taskt-rpa/Lobby)");

            //write file
            fullFileName = System.IO.Path.Combine(docsFolderName, "automation-commands.md");
            System.IO.File.WriteAllText(fullFileName, sb.ToString());


            return(docsFolderName);
        }