Example #1
0
        public static bool TestPandocPresent()
        {
            Pandoc test = new Pandoc();

            test.Start();
            return(test.GetExitCode() == 0);
        }
Example #2
0
 public void ConvertFiles()
 {
     Parallel.ForEach(files, (item) =>
     {
         PandocFile input  = item.Item1;
         PandocFile output = item.Item2;
         Console.WriteLine("Converting file: " + input.ProvideCompletePath());
         Directory.CreateDirectory(Path.GetDirectoryName(output.ProvideCompletePath()));
         Pandoc process = new Pandoc(input.ProvideCompletePath(), output.ProvideCompletePath(), "", Environment.CurrentDirectory);
         process.Start();
         process.GetOutput();
         if (process.GetExitCode() != 0)
         {
             Console.WriteLine("Error converting file {0}", input.ProvideCompletePath());
         }
     });
 }