예제 #1
0
        public static void Main(string[] args)
        {
            var options = new Options();
            bool success = Parser.Default.ParseArguments(args, options);
            if (!success)
            {
                Console.WriteLine(options.GetUsage());
            }

            string schemaFolder = options.SchemaFile;
            if (string.IsNullOrEmpty(schemaFolder))
            {
                schemaFolder = "./";
            }

            foreach (var VARIABLE in schemaFolder)
            {

            }

            var formatter = new JsonDocFormatter();
            if (options.Marcdown)
            {
                // formatter.AsMarkdown()
            }
            Console.ReadKey();
        }
예제 #2
0
        public static void Main(string[] args)
        {
            //            args =
            //                "jsondoc -s D:/project/GuiZhouAbc2/doc/数据规范 -o D:/project/GuiZhouAbc2/doc/数据规范/index.md -m ".Split(' ');
            var options = new Options();
            bool success = Parser.Default.ParseArguments(args, options);
            if (!success)
            {
                Console.WriteLine(options.GetUsage());
                return;
            }

            if (options.Marcdown)
            {
                string markdown = AsMarkdown(new DirectoryInfo(options.SchemaFolder ?? "./"));
                if (!string.IsNullOrEmpty(markdown))
                {
                    File.WriteAllText(options.OutputFile ?? "doc.md", markdown);
                }
            }

            // Console.ReadLine();
        }