Ejemplo n.º 1
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                FreeConsole();
                Application.Run(new UIForm());
            }
            else
            {
                if (args.Length != 2)
                {
                    Console.WriteLine("Usage: wpXml2Jekyll [wordpress export file] [output folder]");
                    Environment.Exit(1);
                }
                var wordpressXmlFile = args[0];
                var outputFolder     = args[1];

                var posts = new PostImporter().ReadWpPosts(wordpressXmlFile);
                int count = new PostWriter().WritePost(posts, outputFolder);
                Console.WriteLine("Saved " + count + " posts");
            }
        }
Ejemplo n.º 2
0
        static void Main(string[] args)
        {
            if (args.Length == 0)
            {
                Application.EnableVisualStyles();
                Application.SetCompatibleTextRenderingDefault(false);
                FreeConsole();
                Application.Run(new UIForm());
            }
            else
            {
                if (args.Length != 2)
                {
                    Console.WriteLine("Usage: wpXml2Jekyll [wordpress export file] [output folder]");
                    Environment.Exit(1);
                }
                var wordpressXmlFile = args[0];
                var outputFolder = args[1];

                var posts = new PostImporter().ReadWpPosts(wordpressXmlFile);
                int count = new PostWriter().WritePostToMarkdown(posts, outputFolder);
                Console.WriteLine("Saved " + count + " posts");
            }
        }