static void Main(string[] args) { Init(); //string docPath = "C:\\git\\BotTheDocsProject\\DocProcessor\\MicrosotFlowBasics.docx"; string docPath = "C:\\git\\BotTheDocsProject\\DocProcessor\\MicrosoftFlowDocs.docx"; if (System.IO.File.Exists(docPath)) { try { Console.WriteLine($"Converting document {docPath}"); System.IO.Stream strm = System.IO.File.OpenRead(docPath); SupportSearch.Helper.WordConverter converter = Container.Resolve <WordConverter>(); converter.ConvertDocToHtml("HomeControlUserManual", strm); Console.WriteLine("Conversion finished! Press any key to quit.."); Console.ReadLine(); } catch (Exception ex) { Console.WriteLine("Error converting document:"); Console.WriteLine(ex.ToString()); Console.ReadLine(); } } else { Console.WriteLine("Input document does not exist!"); Console.ReadLine(); } }
public static void Run([BlobTrigger("docs/{name}", Connection = "SupportDocsConnection")] Stream myBlob, string name, TraceWriter log) { log.Info($"C# Blob trigger function Processed blob\n Name: \n Size: {myBlob.Length} Bytes"); System.DateTime startTime = DateTime.Now; SupportSearch.Helper.WordConverter converter = Container.Resolve <WordConverter>(); converter.ConvertDocToHtml(name, myBlob); log.Info($"Finished processing word file {name} in {System.DateTime.Now.Subtract(startTime).ToString()}."); }