Пример #1
0
        private static int ReportNotMappedItems(ConsoleArgs consoleArgs)
        {
            ChiliAutomation chili  = new ChiliAutomation();
            var             output = consoleArgs.Destination;

            if (!Path.IsPathRooted(output))
            {
                output = Path.Combine(Environment.CurrentDirectory, output);
            }

            return(chili.ReportNotMappedWikiFiles(output));
        }
Пример #2
0
        /// <summary>
        /// Publish items to chili page
        /// </summary>
        /// <param name="cmdArgs"></param>
        /// <returns></returns>
        private static int PublishChiliItems(ConsoleArgs cmdArgs)
        {
            var input = string.Empty;

            if (string.IsNullOrEmpty(cmdArgs.User))
            {
                WriteToOutput("Username not specified", OutputType.Error);
                return(3);
            }
            if (string.IsNullOrEmpty(cmdArgs.Password))
            {
                WriteToOutput("Password not specified", OutputType.Error);
                return(4);
            }
            if (string.IsNullOrEmpty(cmdArgs.Destination))
            {
                WriteToOutput("Input path not specified", OutputType.Error);
                return(6);
            }
            input = cmdArgs.Destination;
            if (!Path.IsPathRooted(input))
            {
                input = Path.Combine(Environment.CurrentDirectory, input);
            }

            var chili = new ChiliAutomation();

            if (!chili.Login(cmdArgs.User, cmdArgs.Password))
            {
                WriteToOutput("Login failed or maybe site down.", OutputType.Error);
                chili.logout();
                return(8);
            }

            chili.UpdateDocs(input);

            chili.logout();


            return(0);
        }
Пример #3
0
        /// <summary>
        /// Publish items to chili page
        /// </summary>
        /// <param name="cmdArgs"></param>
        /// <returns></returns>
        private static int PublishChiliItems(ConsoleArgs cmdArgs)
        {
            var input = string.Empty;
            if (string.IsNullOrEmpty(cmdArgs.User))
            {
                WriteToOutput("Username not specified", OutputType.Error);
                return 3;
            }
            if (string.IsNullOrEmpty(cmdArgs.Password))
            {
                WriteToOutput("Password not specified", OutputType.Error);
                return 4;
            }
            if (string.IsNullOrEmpty(cmdArgs.Destination))
            {
                WriteToOutput("Input path not specified", OutputType.Error);
                return 6;
            }
            input = cmdArgs.Destination;
            if (!Path.IsPathRooted(input))
            {
                input = Path.Combine(Environment.CurrentDirectory, input);
            }

            var chili = new ChiliAutomation();
            if (!chili.Login(cmdArgs.User, cmdArgs.Password))
            {
                WriteToOutput("Login failed or maybe site down.", OutputType.Error);
                chili.logout();
                return 8;
            }

            chili.UpdateDocs(input);

            chili.logout();


            return 0;
        }
Пример #4
0
        private static int ReportNotMappedItems(ConsoleArgs consoleArgs)
        {
            ChiliAutomation chili = new ChiliAutomation();
            var output = consoleArgs.Destination;
            if (!Path.IsPathRooted(output))
            {
                output = Path.Combine(Environment.CurrentDirectory, output);
            }

            return chili.ReportNotMappedWikiFiles(output);
        }