Ejemplo n.º 1
0
        static void Main()
        {
            Console.WriteLine("Enter the number of the item you wish to run:");
            Console.WriteLine();
            Console.WriteLine("1) Use Paratext key terms to attempt localization of character IDs");
            Console.WriteLine("2) Remove verse bridges from control file (currently removes comments)");
            Console.WriteLine("3) Generate comparison file against FCBH template");
            Console.WriteLine("4) Add references to CharacterDetail file");
            Console.WriteLine("5) BiblicalTerms.Processor.Process()");
            Console.WriteLine("6) CharacterListProcessing.Process()");
            Console.WriteLine();

            string line = Console.ReadLine();

            switch (line)
            {
            case "1": TermTranslator.Processor.Process(); break;

            case "2": VerseBridgeHelper.RemoveAllVerseBridges(); break;

            case "3": FCBH.Processor.Process(); break;

            case "4": CharacterDetailProcessing.GenerateReferences(); break;

            case "5": BiblicalTerms.Processor.Process(); break;

            case "6": CharacterListProcessing.Process(); break;
            }
        }
Ejemplo n.º 2
0
        static void Main()
        {
            Console.WriteLine("Enter the number of the item you wish to run:");
            Console.WriteLine();
            Console.WriteLine("1) Use Paratext key terms to attempt localization of character IDs");
            Console.WriteLine("2) Remove verse bridges from control file (currently removes comments)");
            Console.WriteLine("3) Generate comparison file against FCBH template");
            Console.WriteLine("4) Add references to CharacterDetail file");
            Console.WriteLine("5) BiblicalTerms.Processor.Process()");
            Console.WriteLine("6) CharacterListProcessing.Process()");
            Console.WriteLine("7) Output ranges of consecutive verses with single character");
            Console.WriteLine("8) Diff new version of DG against previous -- need to set breakpoint in CompareIgnoringQuoteMarkDifferences method");
            Console.WriteLine("9) Generate standard reference texts from Excel spreadsheet");
            Console.WriteLine("10) Link standard reference texts to English");
            Console.WriteLine("11) Generate character mapping FCBH<->Glyssen (output in Resources/temporary)");
            Console.WriteLine("12) Obfuscate proprietary reference texts to make testing resources (output in GlyssenTests/Resources/temporary)");
            Console.WriteLine();

            string selection     = Console.ReadLine();
            bool   errorOccurred = false;

            switch (selection)
            {
            case "1": TermTranslator.Processor.Process(); break;

            case "2": VerseBridgeHelper.RemoveAllVerseBridges(); break;

            case "3": FCBH.Processor.Process(); break;

            case "4": CharacterDetailProcessing.GenerateReferences(); break;

            case "5": BiblicalTerms.Processor.Process(); break;

            case "6": CharacterListProcessing.Process(); break;

            case "7": CharacterDetailProcessing.GetAllRangesOfThreeOrMoreConsecutiveVersesWithTheSameSingleCharacterNotMarkedAsImplicit(); break;

            case "8": DiffDirectorGuide(); break;

            case "9": errorOccurred = !ReferenceTextUtility.GenerateReferenceTexts(false, false); break;

            case "10": errorOccurred = !ReferenceTextUtility.LinkToEnglish(); break;

            case "11": ReferenceTextUtility.GenerateReferenceTexts(false, true); break;

            case "12": ReferenceTextUtility.ObfuscateProprietaryReferenceTextsToMakeTestingResources(); break;
            }

            if (errorOccurred)
            {
                Console.WriteLine("Review errors above, then press any key to close.");
                Console.ReadLine();
            }
        }
Ejemplo n.º 3
0
        static void Main()
        {
            Console.WriteLine("Enter the number of the item you wish to run:");
            Console.WriteLine();
            Console.WriteLine("1) Use Paratext key terms to attempt localization of character IDs");
            Console.WriteLine("2) Remove verse bridges from control file (currently removes comments)");
            Console.WriteLine("3) Generate comparison file against FCBH template");
            Console.WriteLine("4) Update CharacterDetail file (make references correspond to CharacterVerse file)");
            Console.WriteLine("5) BiblicalTerms.Processor.Process()");
            Console.WriteLine("6) CharacterListProcessing.Process()");
            Console.WriteLine("7) Output ranges of consecutive verses with single character");
            Console.WriteLine("8) Diff new version of DG against previous");
            Console.WriteLine("9) Generate reference texts from Excel spreadsheet");
            Console.WriteLine("10) Link reference texts to English");
            Console.WriteLine("11) Generate character mapping FCBH<->Glyssen (output in Resources/temporary)");
            Console.WriteLine("12) Obfuscate proprietary reference texts to make testing resources (output in GlyssenTests/Resources/temporary)");
            Console.WriteLine("13) Generate reference text book title and chapter label summary");
            Console.WriteLine("14) Create new English reference text (see comments in the Mode enum in ReferenceTextUtility). May append OT or NT.");

            string selection              = Console.ReadLine();
            string outputType             = "errors";
            bool   waitForUserToSeeOutput = false;

            ReferenceTextUtility.OnMessageRaised += (msg, error) => { Console.WriteLine(msg); };

            try
            {
                switch (selection)
                {
                case "1": TermTranslator.Processor.Process(); break;

                case "2": VerseBridgeHelper.RemoveAllVerseBridges(); break;

                case "3": FCBH.Processor.Process(); break;

                case "4": CharacterDetailProcessing.GenerateReferences(); break;

                case "5": BiblicalTerms.Processor.Process(); break;

                case "6": CharacterListProcessing.Process(); break;

                case "7": CharacterDetailProcessing.GetAllRangesOfThreeOrMoreConsecutiveVersesWithTheSameSingleCharacterNotMarkedAsImplicit(); break;

                case "8":
                    DiffDirectorGuide();
                    outputType             = "differences";
                    waitForUserToSeeOutput = true;
                    break;

                case "9":
                    ReferenceTextUtility.ProcessReferenceTextDataFromFile(ReferenceTextUtility.Mode.Generate);
                    waitForUserToSeeOutput = true;
                    break;

                case "10": ReferenceTextUtility.LinkToEnglish();
                    waitForUserToSeeOutput = ReferenceTextUtility.ErrorsOccurred;
                    break;

                case "11":
                    ReferenceTextUtility.ProcessReferenceTextDataFromFile(ReferenceTextUtility.Mode.CreateCharacterMapping, ReferenceTextProxy.GetOrCreate(ReferenceTextType.English));
                    waitForUserToSeeOutput = true;
                    break;

                case "12": ReferenceTextUtility.ObfuscateProprietaryReferenceTextsToMakeTestingResources();
                    break;

                case "13":
                    ReferenceTextUtility.ProcessReferenceTextDataFromFile(ReferenceTextUtility.Mode.CreateBookTitleAndChapterLabelSummary);
                    waitForUserToSeeOutput = ReferenceTextUtility.ErrorsOccurred;
                    break;

                case "14":
                case "14NT":
                case "14OT":
                    var testamentStr = selection.Replace("14", String.Empty);
                    ReferenceTextUtility.Testament testament;
                    switch (testamentStr)
                    {
                    case "NT": testament = ReferenceTextUtility.Testament.NT; break;

                    case "OT": testament = ReferenceTextUtility.Testament.OT; break;

                    default: testament = ReferenceTextUtility.Testament.WholeBible; break;
                    }
                    ReferenceTextUtility.ProcessReferenceTextDataFromFile(ReferenceTextUtility.Mode.GenerateEnglish, null, testament);
                    outputType             = "output";
                    waitForUserToSeeOutput = true;
                    break;
                }
            }
            catch (Exception e)
            {
                Console.WriteLine(e);
                waitForUserToSeeOutput = true;
            }

            if (waitForUserToSeeOutput)
            {
                Console.WriteLine($"Review {outputType} above, then press Enter to close.");
                Console.ReadLine();
            }
        }