public void Run(string[] args) { if (args.Length == 0) { ShowHelp(); return; } m_filters = new DocumentFilters(); m_filters.Initialize("{ENTER LICENSE KEY}", "."); List <string> fileList = new List <string>(); for (int i = 0; i < args.Length; i++) { String arg = args[i]; if (String.Compare(arg, "-h", true) == 0 || String.Compare(arg, "--help", true) == 0) { ShowHelp(); return; } else { fileList.Add(arg); } } foreach (string filename in fileList) { ProcessFile(filename, m_filters.GetExtractor(filename)); } m_stdout.Close(); }
public void Run(string[] args) { if (args.Length == 0) { ShowHelp(); return; } m_filters = new DocumentFilters(); m_filters.Initialize("{ENTER LICENSE KEY}", "."); List <string> fileList = new List <string>(); for (int i = 0; i < args.Length; i++) { String arg = args[i]; if (String.Compare(arg, "--html", true) == 0) { m_html = true; } else if (String.Compare(arg, "--text", true) == 0 || String.Compare(arg, "-t", true) == 0) { m_html = false; } else if (String.Compare(arg, "--subfiles", true) == 0 || String.Compare(arg, "-s", true) == 0) { m_subFiles = true; } else if (String.Compare(arg, "--output", true) == 0 || String.Compare(arg, "-o", true) == 0) { m_outputFile = args[++i]; } else if (String.Compare(arg, "-h", true) == 0 || String.Compare(arg, "--help", true) == 0) { ShowHelp(); return; } else { fileList.Add(arg); } } if (m_outputFile != null) { m_stdout = new StreamWriter(File.Open(m_outputFile, FileMode.Create), Encoding.UTF8); } foreach (string filename in fileList) { ProcessFile(filename, m_filters.GetExtractor(filename)); } m_stdout.Close(); }
public void Run(string[] args) { if (args.Length == 0) { ShowHelp(); return; } m_filters = new DocumentFilters(); m_filters.Initialize("{ENTER LICENSE KEY}", "."); List <string> fileList = new List <string>(); for (int i = 0; i < args.Length; i++) { String arg = args[i]; if (String.Compare(arg, "--output", true) == 0 || String.Compare(arg, "-o", true) == 0) { m_outputFolder = args[++i]; } else if (String.Compare(arg, "--async", true) == 0 || String.Compare(arg, "-a", true) == 0) { m_async = true; } else if (String.Compare(arg, "--inline-images", true) == 0) { m_inlineImages = true; } else if (String.Compare(arg, "--options", true) == 0) { m_options = args[++i]; } else if (String.Compare(arg, "-h", true) == 0 || String.Compare(arg, "--help", true) == 0) { ShowHelp(); return; } else { fileList.Add(arg); } } foreach (string filename in fileList) { ProcessFile(filename, m_filters.GetExtractor(filename)); } m_stdout.Close(); }
public void Run(string[] args) { //if (args.Length == 0) //{ // ShowHelp(); // return; //} m_filters = new DocumentFilters(); m_filters.Initialize(PerceptiveDocumentFiltersLicense.LICENSE_KEY, "."); string sourceDir = @"C:\Users\Administrator.ESS-102466\Desktop\PureHTML"; //List<string> fileList = new List<string>(); List <string> fileList = Directory.GetFiles(sourceDir).ToList <string>(); for (int i = 0; i < args.Length; i++) { String arg = args[i]; if (String.Compare(arg, "--output", true) == 0 || String.Compare(arg, "-o", true) == 0) { m_outputFolder = args[++i]; } else if (String.Compare(arg, "-h", true) == 0 || String.Compare(arg, "--help", true) == 0) { ShowHelp(); return; } //else //{ // fileList.Add(arg); //} } foreach (string filename in fileList) { ProcessFile(filename, m_filters.GetExtractor(filename)); } m_stdout.Close(); }