private static void DoCoreTask(Options options)
        {
            Console.WriteLine(Environment.NewLine);

            if (!File.Exists(options.InputFile))
            {
                Console.WriteLine("Error : File Not Found, Exiting");
                Environment.Exit(1);
            }

            ePubFixer.Variables.Filename = options.InputFile;
            ePubFixer.Variables.CreateHtmlTOC = options.CreateHtmlTOC;
            ePubFixer.Variables.TextInChapters = options.RetrieveChapterText;
            int optCount = 0;

            if (options.CreateTOC)
            {
                optCount++;
                TOC toc = new TOC();
                toc.UpdateFile();
                Console.WriteLine("TOC has been created");
            }

            if (optCount == 0)
                Console.WriteLine("No Options Selected, see help\n\n\n" + options.GetUsage());
        }
Beispiel #2
0
        private static void DoCoreTask(Options options)
        {
            Console.WriteLine(Environment.NewLine);

            if (!File.Exists(options.InputFile))
            {
                Console.WriteLine("Error : File Not Found, Exiting");
                Environment.Exit(1);
            }

            ePubFixer.Variables.Filename = options.InputFile;
            ePubFixer.Variables.CreateHtmlTOC = options.CreateHtmlTOC;
            ePubFixer.Variables.TextInChapters = options.RetrieveChapterText;
            int optCount = 0;

            if (options.CreateTOC)
            {
                optCount++;
                TOC toc = new TOC();
                toc.UpdateFile();
                Console.WriteLine("TOC has been created");
            }

            if (optCount == 0)
                Console.WriteLine("No Options Selected, see help\n\n\n" + options.GetUsage());
        }